This guide will help Thinkific Course Creators measure which traffic sources are leading to sales, by tracking purchases with Google Analytics 4 (GA4), so they can optimise their marketing.
While Thinkific has an integration with Google Analytics 4 via an app from their App Store, it only tracks page views and does not track conversions such as purchases or sign-ups. To track Thinkific conversions and other important events with Google Analytics 4, Google Tag Manager (GTM) needs to be used.
Table of Contents
Add Google Tag Manager to Thinkific
If your are not yet using Google Tag Manager on your Thinkific site, this section will guide you through its implementation.
Google Tag Manager is a tag management system that allows you to quickly and easily setup measurement codes (tags) on you website such as GA4, Meta Pixel, Google Ads Conversions, etc.
There are two methods to add Google Tag Manager to Thinkific:
- In your site’s Theme Code.
- In your site’s Footer Code.
There are some drawbacks to adding GTM to the Footer, so this guide will not cover that route. If you would like to find out more about adding GTM to the footer, it is covered in Thinkific’s documentation.
Create a Google Tag Manager Account if You Don’t Have one
If you do not have a Google Tag Manager account, you will need a Google Account, such as a GMail or Google Workspace, to create one.
Go to https://tagmanager.google.com/
If you are not already logged in the browser with a Google Account, you will be prompted to sign in with one. Once signed in, click the Create Account button to the top right.
![Click the Create Account button](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-Click-Create-Account.png)
On the next screen:
- Enter and Account Name (it can be anything you like).
- select your Country.
- Enter a Container name (it can be anything but typically it is the website the container is related to).
- Choose Web for Target platform.
- Click the Create button.
![Add New GTM Account Details](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-Add-New-Account-Details.png)
Click Yes to accept the Terms of service.
![Click Yes to accept GTM Term of Service](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-Accept-Terms-of-Service.png)
You will then be presented with the code to be added to Thinkific.
Add Google Tag Manager to Thinkific Theme Code
Copy the GTM <head> code
![Copy GTM Head Code](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-Copy-Head-Code.png)
Login to the Admin area of your Thinkific account.
- Go to DESIGN YOUR SITE > Theme Library.
- To the right of the BUILD button on your theme, click the three dots, then click EDIT CODE.
![Select edit code in Thinkific Them library](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/Thinkifc-click-edit-code-1024x507.png)
Click Layouts > default.
![Select default layout in Thinkific Theme](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/Thinkific-select-default-layout-1024x485.png)
Paste the GTM code to the top of the head tag:
- Look for the opening <head> tag.
- Put you cursor after the > of the tag.
- Press enter to create a new line.
- Paste the GTM code that was previously copied.
![Animated gif showing adding GTM head code to Thinkific theme](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/Add-GTM-Head-Code-to-Thinkific-Theme.gif)
Go back to GTM and copy the body code.
![Copy GTM body code](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-Copy-Body-Code.png)
Past the GTM code to the top of the <body> tag:
- Look for the opening <body> tag.
- Put you cursor after the > of the tag.
- Press enter to create a new line.
- Paste the GTM code that was previously copied.
- Click the SAVE button to the top right.
![Animated gif showing adding GTM body code to Thinkific theme](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/Add-GTM-Body-Code-to-Thinkific-Theme.gif)
Publish Empty GTM Container
Publish the empty GTM container in order to avoid issues that may occur when trying to test an unpublished container.
![Click Submit button in Google Tag Manager](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-Click-submit-initial.png)
- Enter a Version Name (eg Empty Container).
- Click the Publish button to the top right.
![Click Publish button to publish the GTM container](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-Publish-empty-container.png)
Add GA4 Recommended Events Data Layer to Thinkific
What is the Data Layer?
The Data Layer is a place where you can put information about your website while the user interacts with your site. If the user visits a particular page, information about that page can be put in the Data Layer. In this guide, we are going to put information about Purchases and Sing-Up in the Data Layer.
Google Tag Manager detects when information is put into the Data Layer and can use it for Triggers that then fires Tags.
Add Purchase Event Data Layer to Thinkific
Go to Settings > Code & analytics
![Go to Settings then Code & analytics](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/Thinkific-Go-to-Settings-Code-analytics-1024x527.png)
Copy the code below
<!-- GA4 Data Layer purchase event -->
<script>
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object.
window.dataLayer.push({
event: "purchase",
ecommerce: {
transaction_id: "{{order_number}}",
value: {{total_price}},
currency: "USD",
items: [
{
item_id: "{{product_id}}",
item_name: "{{product_name}}",
price: {{total_price}},
quantity: 1,
affiliation: "{{referral_code}}"
}
]
}
});
</script>
<!-- End GA4 Data Layer purchase event -->
In the Order tracking code section, paste the code and then click the SAVE button.
![Paste and save order tracking code](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/Thinkific-paste-order-tracking-code.png)
Add Sign-Up Event Data Layer to Thinkific
Copy the code below.
<!-- GA4 Data Layer sign-up event -->
<script>
window.dataLayer = window.dataLayer || [];
dataLayer.push({
event: 'sign_up',
user_id: '{{id}}'
});
</script>
<!-- End GA4 Data Layer sign-up event -->
In the Signup tracking code section, paste the code and then click the SAVE button.
![Paste and save signup tracking code](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/Thinkific-signup-tracking-code.png)
Add Google Analytics 4 to Thinkific Using Google Tag Manager
Get GA4 Measurement ID
In GA4, go to Admin > Data Streams then click on appropriate data stream (hopefully there is only one)
![Select your data stream](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GA4-click-admin-data-streams.png)
Copy the Measurement ID
![Copy measurement ID](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GA4-Copy-measurement-id.png)
Create a Constant Variable for the Measurement ID
In GTM create a constant variable for the Measurement ID. Go to Variables and click the New button.
![Click variables then new](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-variables-new.png)
Click Variable Configuration and select Constant in the Utilities section.
![Click variable configuration](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-variable-configuration.png)
![Select Constant from Utilities secction](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-select-constant.png)
Paste the Measurement ID in the Value field. Give the variable an name and then click the Save button.
![Enter measurement ID, name then save](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-paste-measruement-id-and-save.png)
Create Google Tag
- Select Tags from the left menu.
- Click New > Tag Configuration > Google Analytics > Google Tag.
- To insert a variable, click the grey icon (that look like a lego block) to the right of the Tag ID input field.
- Select the Measurement ID constant variable created previously.
![Animated gif showing selecting Google Tag](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-select-Google-Tag.gif)
- Click Configuration settings to reveal its options.
- Click the Add parameter button.
- Enter send_page_view in the Configuration Parameter field and false for the Value field.
![Set send_page_view to false](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-dont-send-page-view-parameter.png)
- Scroll to the bottom and click Triggering
- Select All Pages
![Animated gif showing selecting All Pages trigger for triggering](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-All-Pages-trigger.gif)
Enter a name and then click the Save button
![Enter tag name then save](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-name-and-save-GA4-config-tag.png)
Create Data Layer Variables
Needed to get non ecommerce parameters from the data layer.
Create Data Layer Variables for Sign-Up Parameters
- Go to Variables > New > Variable Configuration
- In the Page Variables section click Data Layer Variable
![Select Data Layer Variable](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-select-data-layer-variable.png)
- Enter user_id in the Data Layer Variable Name field.
- Enter a name for the the variable (eg. DLV data_layer_variable_name).
- Click the Save button.
![Enter Data Layer Variable Name, name the variable then click save button](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-save-dlv.png)
Create GTM Triggers
Purchase Trigger
Starting from the left menu:
- Click Triggers > New > Tag Configuration.
- Scroll to the Other section and click Custom Event.
![Animated gif showing setting custom event for Trigger Configuration](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-Custom-Trigger.gif)
- Enter purchase in the Event Name field.
- Enter a name for the tirgger (that makes it clear what it is).
- Then click the Save button to top right.
![Enter purchase as event name, name tag then save](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-GA4-Purchase-trigger.png)
Sign-Up Trigger
- Click Triggers > New > Tag Configuration.
- Scroll to the Other section and click Custom Event.
- Enter sign_up in the Event Name field.
- Enter a name for the tirgger (that makes it clear what it is).
- Then click the Save button to top right.
![Enter sign_up as event name, name tag then save](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-GA4-sign_up-trigger.png)
Create GTM Event Tags
Create Page View Event Tag
Starting from the left menu:
- Click Tags > New > Tag Configuration > Google Analytics > Google Analytics: GA4 Event.
- To insert a variable, click the grey icon (that looks like a lego block) to the right of the Measurement ID field.
- Click the Measurement ID constant variable previously created.
- Enter page_view in the Event Name field.
- Go to the bottom of the screen and click Triggering > All Pages.
![Animated gif showing creating and configuring page_view GA4 event tag](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-GA4-page_view-event.gif)
- Enter a name for the Event (for GA4 events (eg. ‘GA4 Event name_of_the_event’).
- Then click the Save button to top right.
![Name and save page_view GA4 event tag](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-GA-name-and-save-page_view-event.png)
Create Purchase Event Tag
Ensure still on the Tags screen then:
- New > Tag Configuration > Google Analytics > Google Analytics: GA4 Event.
- To insert a variable, click the grey icon (that looks like a lego block) to the right of the Measurement ID field.
- Click the Measurement ID constant variable previously created.
![Animated gif showing creating GA4 event tag and adding measurement ID](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-GA4-Purchase-Event-create-and-ad-gogle-tag.gif)
- Enter purchase in the Event Name field.
- Click on More Settings to reveal its options.
- Check the Send Ecommerce data checkbox.
- Ensure Data Layer is selected from the Data source dropdown.
![Enter purchase as Event Name and configure Send Ecommerce data from Data Layer](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-GA4-purchase-event-name.png)
- Go to the bottom of the screen and click Triggering.
- Select the purchase trigger created previously.
![Select purchase custom event](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-select-purhase-trigger.png)
- Enter a name for the Event.
- Then click the Save button to top right.
![Give purchase event tag a name and save](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-name-and-save-purchase-event.png)
Create Sign-Up Event Tag
Ensure still on the Tags screen then:
- New > Tag Configuration > Google Analytics > Google Analytics: GA4 Event.
- To insert a variable, click the grey icon (that looks like a lego block) to the right of the Measurement ID field.
- Click the Measurement ID constant variable previously created.
- Enter sign_up in the Event Name field.
![Configure GA4 sign_up event with Measurement ID and Even Name](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-sign_up-event-first-part.png)
- Click Event Parameters to see its options
- Click Add Parameter
- Enter user_id in the Event Parameter field
- To insert a variable, click the grey icon (that looks like a lego block) to the right of the Value field.
- Select the user_id data layer variable created previously.
![Animated gif showing adding user_id event parameter](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-ad-user_id-event-parameter-1.gif)
- Go to the bottom of the screen and click Triggering.
- Select the sign_up trigger created previously.
- Enter a name for the Event.
- Then click the Save button to top right.
Use Preview Mode in GTM to Verify Things are Working
Have GA4 open on a tab and go to the DebugView:
- Admin > DebugView
![Select DebugView from Admin section in GA4](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GA4-click-DebugView-1024x576.png)
Go to GTM and click the Preview button to start preview mode.
![Click Preview button in GTM](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-click-preview.png)
Tag Assistant will open:
- Enter the URL of your Thinkific site in the Websites URL field.
- Click Connect
![Enter Your Website URL and click the Connect button](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-preview-enter-url.png)
Your website should open in a new tab:
- Begin a purchase transaction on your Thinkific site (you can use a coupon to zero the cost)
- When the button to complete the order is clicked and the account setup screen loads, check Tag Assistant for the sign_up event.
![Click sign_up event in preview mode and see GA4 event tag fired for sign_up](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-preview-sign_up-temp.png)
Check debug screen in GA4 for the sign_up event
![sign_up event in GA4 debug view](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GA4-debug-sign_up-temp.png)
After credentials have bee submitted and the Thank You page loads.
- Check Tag Assistant for the purchase event.
- Check GA4 debug view for the purchase event.
![Click purchase event in preview mode and see GA4 event tag fired for purchase](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-preview-purchase-temp.png)
Switch From Thinkific GA4 App to GA4 Via GTM
Uninstall GA4 up in Thinkific
- Click INTEGRATIONS
- click the red trash can icon to Uninstall GA4
![Click delete button to uninstall GA4 in Thinkific](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/Thinkific-uninstall-GA4-1024x343.png)
Publish the GTM container:
- Click Submit to the top right.
- Enter a Version Name
- Enter a Version Description
- Click the Publish button.
![Enter Version Name, Version Description and click Publish button to publish GTM container](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GTM-publish-final-container.png)
Which Traffic Sources Are Leading to Sales?
Now that measurement is in place, the next step would be to wait till you are certain you have some sales. The data won’t be in the reports right away though, so at minimum wait till the following day to check (it could take as much as 48 hours). Then go to:
- Reports > Acquisition > Traffic acquisition.
![Go to Traffic acquisition in GA4 reports](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GA4-Traffic-acquisition.png)
This report shows Traffic source by Sessions, and by default the left most column in Session default channel group. If you desire to see things broken down UTMs Session source / medium instead, go to:
- Click the Session default channel group heading.
- Select Session source / medium.
![Animated gif showing selecting Session source / medium](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GA4-Channel-to-Source-Medium.gif)
You can also click the arrow in the heading of the Total revenue column to sort the column in descending order so you can see your traffic sources from highest to lowest sales.
The plus symbol to the right of heading of the first columns alloys you to add a second dimension. Eg. you can add Session campaign to evaluate if you have proper UTMs setup for your traffic sources (et. paid ad campaigns, etc.).
![Click down arrow to sort by total revenue](https://digitalmicroenterprise.com/wp-content/uploads/2023/10/GA4-Session-Traffic-Table-1024x269.png)
Gotchas
GTM Does Not Fire On The Checkout Page – A Thank You Page is Needed
Google Tag Manager does not load on the Checkout Page. Instead, for the purchase flow, the sign_up event happens on the screen after the checkout page where credentials are entered, while the purchase event happens on the Thank You page.
For things to work there must be a native Thinkific Thank You page in the flow. If this is missing, or there is a totally custom thank you page, it will not work.
Previews of Courses Do Not Have a Thank You Page
The checkout flow for the Preview of a course does not have a Thank You Page. Instead, the sign-up event is fired after user password is entered and then goes directly to the Course Player. Google Tag Manager does not work in the Course Player. Since the purchase event is not fired, the details of Preview Courses are not captured and sent to GA4.
This is one of the reasons it is important to capture sign-ups.
GA4 Has a 24 to 48 Hour Processing Time
GA4 has a processing time of 24 to 48 hours. Therefore you may not see any data in the reports until that time period has elapsed. Usually data will show up the following day, but when troubleshooting the reports be sure to exclude the most recent 48 hours.
Next Steps
Learn How to Get Answers to Your Questions from GA4 Reports & Explorations
Google Analytics 4 has pre-configured reports that can be used to get answers to questions about traffic on the website. We so an example of this above in the Which Traffic Sources Are Leading to Sales? section. Other examples of questions and possible reports to get the answers include
- Which pages get the most/least traffic?
- Reports > Engagement > Pages and screens
- What where the traffic sources users initially came from?
- Reports > Acquisition > User acquisition
To go deeper, Google Analytics 4 also has Explorations which are found in the Explore tab.
- Were did users go from the home page?
- Explore > Path exploration
Think about the questions you want to get the answers for related to you traffic and learn how to get the answers from the various reports and explorations.
Ensure Your Traffic is Identifiable Using UTMs
One of the most frustrating things is seeing traffic in your reports but still have no idea what the traffic is related to. Eg
- Traffic from Facebook Ads
- Which ads are leading to purchases?
- Traffic from your Instagram
- Did the traffic come from the Bio or a Story?
- Which story did traffic come from?
- Traffic from your YouTube
- Which video did traffic come from?
Adding UTM (Urchin Tracking Module) parameters to the links you have control over in external platforms is how you will be able to answer the questions above and other questions related to where your traffic came from.
Leverage the Setup to Implement Conversion Tracking for Marketing Platforms
Setting up Thinkific purchase tracking with Google Analytics 4 from scratch was a bit of a slog. Now that it is in place though, not only do you reap the benefits of having your purchase data in Google Analytics 4, but you can leverage what has been setup to do conversion tracking for other marketing platforms.
Example, if you are using Google Ads, see How to Setup Google Ads Conversion Tracking for Thinkific Purchases.
Where You Able to Track Your Thinkific Purchases with Google Analytics 4?
I know setting up measurement from scratch to get your Thinkific Purchases into Google Analytics 4 can seem overwhelming. I hope with this guide you were able to go through the process step by step and achieve successful results.
To recap, the steps were to:
- Add Google Tag Manager to Thinkific.
- Add Event Data Layer Pushes to Thinkifc.
- Add Google Analytics 4 to Thinkific Using GTM
- Create a Google Tag
- Create Data Layer Variable for the Sign-up Event
- Create Triggers for Purchase and Sign-up Events
- Create Event Tags for Page Views, Purchases and Sign-ups
- Test Preview Mode in GTM to Verify Things are Working
- Use a GA4 Report to Answer; Which Traffic Sources are Leading to Sales?
Frequently Asked Questions
Will this Track Performance Checkout Purchases?
Yes, it will track Performance Checkout purchases. The tracking does not happen on the checkout page however, but the Thank You page. Ensure you have a Thinkific Thank You page for it to work.
Will Google Tag Manager Fire in the Course Player?
No, Google Tag Manager will not fire in the Course Player, it will fire on the site pages only.
Will this Track the Price of Courses with Different Prices?
Yes, the total value of the product purchased in captured.
Will I Be Able to See the Name of What was Purchased in Google Analytics?
Yes, the Product Name is captured and will be available in Item Scoped reports in Google Analytics such as the table to the bottom of the ‘Ecommerce purchases’ report.
thank you very much, everything works perfectly.
You’re welcome Enrico!