Tracking Purchases in Thrivecart

How to track product sales in Thrivecart using Google Tag Manager

Download This GTM Container

Click the link below and download the JSON file to you computer

Download GTM Container

 

Import The New Container Into Your GTM Account

Tag Manager Import Image

Update the Tag Titled "00 - UPDATE ON INSTALL - FL - Base Script"

Update on Install

In order for this to track correctly to your workspace, you need to add the workspace tracking script to the page. You can add your workspace tracking script directly to the tag titled '00 -  Update on Install - FL - Base' if it's not installed elsewhere.

If the base script is already installed, either as another tag in your GTM or directly onto the page, you can just delete the '00 Update on Install...' tag.

Save and Publish the Container

In order for the changes to appear live for everyone, you need to be sure that the container is submitted/published.

Tag Manager Submit Changes

Install Your Tag Manager Container in Thrivecart

In order for our purchase tracking solution to work, we need to have our Tag Manager Container installed in Thrivecart.

Add both your GTM installation scripts directly to the All Pages: Paste tracking code to add to all of this product's pages section.

Click here for their documentation on adding scripts to their checkout pages.

 

GTM Thrivecart Install

Add a Data Layer push to your main product field in Thrivecart

Thrivecart has fields that allow you to trigger scripts for each product on the thank you page. This does require you to be using their hosted thank you pages and not a custom thank you page. 

Copy and paste the script below into the field that reads "Main product: Paste tracking code to add if the customer purchases the main product" and check the box that says "Only run this code the first time the customer gets to the success page"

<script>
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event': 'mainPurchased',
'purchased': 'mainProduct'
});
</script>

below we see an image of our data layer push installed in the main product tracking section.

Thrive Main Product Script

Check your Installation

We should now have our GTM installation script and our data layer push script both installed in our Thrivecart checkout. Next, we will want to save the changes, and run a test transaction to make sure everything is setup correctly.
Thrivecart Checkout

Note: If you have more than one pricing option (pay in full, split pay, early bird, etc.)for the main product you will see more than one script box available. To be sure to track all the possible conversions, remember to copy the code in ALL the main product script fields available

How to Map Thrivecart Purchases in Funnelytics

Because the event scripts are only triggered on the thank you page, we need to have our advanced purchase actions connected to the final thank you page.

Make sure the thank you page has the * wildcard character to account for the dynamic portion of the URL. 

Thrivecart Checkout

Configuring Your Purchase Actions in Funnelytics

Our prebuilt Tag Manager Container will send a purchase action containing the offer Name and Value of you Main Product, as well as the Name and Value of any Bump Offer, Upsell and/or Downsell.

All we need to do, is look for an Action with the name "purchase" and to assign the properties that correspond with each offer.

Thrivecart action main offer

 

If you have any questions or need further clarification with installing your script, remember to reach out to our support team anytime by clicking the support icon in the bottom-right corner of your dashboard, or emailing us at support@funnelytics.io we are always ready to assist you!