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
Import The New Container Into Your GTM Account
As a first step, please import the new container, as seen in the image below
Update the Tag Titled "00 - UPDATE ON INSTALL - FL - Base Script"
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.
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.
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"
window.dataLayer = window.dataLayer || ;
Above we see an image of our data layer push installed in the main product tracking section.
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.
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.
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.
if something is missing in the documentation or if you found some part confusing, please reach out to support team, with your suggestions for improvement.
We love hearing from you!