Adding a GA4 tracking code to your Turtl Doc(s) will send events, e.g. page views, to Google Analytics 4 when the user interacts with Turtl Doc. Once those events are in your GA4, they can support various processes.
Notes:
The default GA4 tracking code is available with all Turtl plans.
Custom events setup is available with either the Unlimited plan or Professional plan with the "Custom behavioral events" module added.
Prerequisites:
A container in Google Tag Manager. GTM is used for adding, deploying, and, when necessary, updating your GA4 tag within your Turtl Docs.
Google Analytics 4 account and property. You will need the Measurement ID from GA4 to connect GA4 with GTM.
GA4 configuration tag. In the same way as it would for your website, the configuration tag acts as the bridge between your Turtl Docs and GA4 - collecting data and insights about user interactions, behavior, etc. You will need to insert GA4 "Measurement ID" inside this tag.
How do I get the tracking code?
In your GTM container, click "Admin" in the top menu, then select "Install Google Tag Manager".
Please copy both <head>
and <body>
scripts above and proceed to the next step.
What’s the process of getting the tracking code into Turtl
Once you have the previously mentioned <head>
and <body>
scripts, please send them to support@turtl.co and we will set it up as an extension for you, which can be toggled on/off on your Turtl Docs. You can also choose to apply this extension to all Turtl Docs automatically.
What events does the tracking code collect by default
By default, Google Tag Manager supports page view events.
Where do events appear in GA4
Sign in to Google Analytics.
From the left menu, select "Reports".
On the left, click "Engagement" -> "Events".
Please refer to the Google Analytics Events report article for more details on where to find events.
Note: It may take up to 24 hours before you will see this data in GA4.
How can we customize the tracking code to send custom performance events to GA4
If you are on Turtl’s Unlimited or Professional plan and have purchased the "Custom Behavioural Events" module, our engineering team can customize the previously mentioned <head>
and <body>
scripts to send through additional events that aren’t captured within the standard script.
For these custom events to be seen, they need to be created by the customer in GA4.
Custom events table with variables
Below is the suggested list of events and variables. Variables in bold belong to all events, other variables are specific to only some events.
Event name | Variables | Notes |
Chapter page turn |
| Surf page turn
|
Page turn |
| Immerse page turn |
Read Doc 30 sec |
|
|
Read Doc 1 minute |
|
|
Read Doc 2 mins |
|
|
Read Doc 3 mins |
|
|
Read Doc 4 mins |
|
|
Read Doc 5 mins |
|
|
Read Doc 8 mins |
|
|
Read Doc 10 mins |
|
|
Enter chapter |
| Enter Immerse page(s) |
Leave chapter |
| Leave immerse page(s) |
Logo click |
|
|
Contents menu click |
|
|
Download the PDF version |
| PDF download button in the Contents menu |
Open fullscreen |
|
|
Link click |
|
|
Lead capture form submission |
|
|
Personalization form submission |
|
|
Poll submission |
|
|
Share button click - email |
| Share button location custom property specifies the location where the share button was clicked:
|
Share button click - X |
| Share button location custom property specifies the location where the share button was clicked:
|
Share button click - Facebook |
| Share button location custom property specifies the location where the share button was clicked:
|
Share button click - Linkedin |
| Share button location custom property specifies the location where the share button was clicked:
|
Share button click - Xing |
| Share button location custom property specifies the location where the share button was clicked:
|
View chart |
|
|
View image |
|
|
View map |
|
|
View PDF |
|
|
Watch video |
|
|
Listen to audio |
|
|
View Matterport tour |
|
|
Tip: Please contact our support team to share your ideas if you want to track something else.
1. Create a custom event trigger
In your GTM container, navigate to "Triggers" in the left sidebar and click "New" to create a new Trigger.
Name the Trigger, e.g. "Watch video". We recommend using the same name for the trigger and the Turtl event you want to track.
Click on "Trigger Configuration".
Trigger Type: Choose "Other" -> "Custom Event" as the Trigger type.
Event Name: Copy the name of your custom event (e.g. "Watch video") from the table.
This Trigger fires on: Choose "All Custom Events".
Click "Save" to create the Trigger.
2. Create Variables
In order to capture additional data sent with the custom events, you have the option to create Variables.
In your GTM container, navigate to "Variables" in the left sidebar and click "New" to create a new variable.
Name the variable, e.g. "Page title".
Click on "Variable Configuration".
Variable Type: Choose "Page Variables" -> "Data Layer Variable".
Data Layer Variable Name: Copy the name of the Variable from this table.
Please create variables you find useful for the events you want to fire.
Click "Save" to create the Variable.
3. Create a Tag for each custom event
Notes:
Don’t confuse this Tag with the GA4 configuration tag mentioned at the beginning.
You can also add the so-called "Built-in" variables, such as the "Page URL" variable and others, if applicable.
In your GTM container, navigate to "Tags" in the left sidebar and click "New" to create a new Tag.
Name the Tag, e.g. "Watch video".
Click on "Tag Configuration".
"Choose tag type"-> "Google Analytics" -> "Google Analytics: GA4 Event".
Input your "Measurement ID": You can find the Measurement ID in your Google Analytics by going to "Admin" -> "Property Settings" > "Data collection and modification" > "Data Streams". Click on the relevant data stream and find "Measurement ID" (e.g.: G-XXXXXXXXXX) under Stream Details.
Copy the relevant "Event name" from the table and paste it into the "Event Name" input field.
Click "Event Parameters"-> "Add parameter".
Click on the battery icon on the right-hand side of the "Value" field to add a parameter (variable) from the list.
Insert a variable name under the "Event parameter" input field:
Repeat for all Variables that apply to the event.
Finally, add the trigger that corresponds to the event and click "Save".
4. Test the custom event
When you receive confirmation the custom tracking code has been added to your Doc(s), we recommend Previewing the setup in GTM. Enable GTM's "Preview" mode to test and debug your setup. This mode allows you to see if your custom event is firing correctly and if the associated tags are being triggered.
5. Publish your changes
Before publishing, review your container to ensure everything is set up correctly.
Click "Submit" to publish your changes. It may take a few minutes for the changes to take effect.
Where do the custom events appear in GA4
Note: It may take up to 24 hours before you will see this data in GA4.
Custom events appear alongside default events.
Sign in to Google Analytics.
From the left menu, select "Reports".
On the left, click "Engagement" -> "Events".