# ThriveCart Integration

#### To integrate ThriveCart with GoAffPro SDK integration:

Open the setup wizard: <https://app.goaffpro.com/wizard>

{% hint style="info" %}
The setup wizard will open up automatically when you open the GoAffPro admin panel for the first time.
{% endhint %}

Here, select **Thrive Cart**.

<figure><img src="https://1200686697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LdPzLtyP46oY7cyXnkw%2Fuploads%2Fj4FPeeIiwJZLeqlw0trN%2FScreenshot%202023-11-20%2016125409.png?alt=media&#x26;token=6829e588-3530-48f8-ae9f-fb2466e360b1" alt=""><figcaption><p>Select Thrive Cart</p></figcaption></figure>

This will open up the Thrive Cart integration steps.

<figure><img src="https://1200686697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LdPzLtyP46oY7cyXnkw%2Fuploads%2FwXzh6n6SgFfytbQPG8Cb%2Fimage.png?alt=media&#x26;token=761eebac-e822-4fc8-96c5-8ccbdb1a5db7" alt=""><figcaption><p>Thrive Cart integration</p></figcaption></figure>

Add the following code in your store's header area:

```
<script type="text/javascript" src="https://api.goaffpro.com/loader.js?shop=your-unique-store-public-key"></script>
```

{% hint style="info" %}
Please make sure to replace the <mark style="background-color:blue;">your-unique-store-public-key</mark> from the code, with the public key from your account (from the Settings > Advanced > Third Party Tracking section).
{% endhint %}

<figure><img src="https://1200686697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LdPzLtyP46oY7cyXnkw%2Fuploads%2FX6CmppgvsuaeevRaM1mR%2Fimage.png?alt=media&#x26;token=981c58c8-27ec-4a8d-861e-2fac91efe030" alt=""><figcaption><p>Add the code in your store header area</p></figcaption></figure>

Finally, add the following code in your Success/Thank you page:

```
<script type="text/javascript">
var goaffproOrder = {
    id:_thrive_order.order.id,
    number:_thrive_order.order.invoice_id,
    total: _thrive_order.order.total/100,
    tax: _thrive_order.order.tax/100,
    shipping: _thrive_order.order.shipping,
    currency:_thrive_order.order.currency,
    customer: {
        first_name: _thrive_order.customer.name,
        email:_thrive_order.customer.email
    },
}
goaffproTrackConversion(goaffproOrder);
</script>
```

<figure><img src="https://1200686697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LdPzLtyP46oY7cyXnkw%2Fuploads%2FIz8ZNyxmRFscKkrscNlk%2Fimage.png?alt=media&#x26;token=8f542b61-450f-4600-9826-a4253813edf9" alt=""><figcaption><p>Copy &#x26; paste the code in your Success/Thank you page</p></figcaption></figure>
