Upload data through Google Tag Manager
With Sitefinity Insight, you can easily integrate Google Tag Manager (GTM) to collect data and track specific user behavior. In case you are already working with the Tag Manager, you can use your existing triggers and create custom HTML tags to enable Sitefinity Insight to collect data when your tags fire. For more information, see Google Tag Manager.
NOTE: Using Google Tag Manager, you can collect data with Sitefinity Insight from any system, not just from Sitefinity CMS.
: Register a Google Tag Manager account and create a container. For more information, see the Setup and install Tag Manager
Prepare pages to track
To track a new or existing page, you need to inject the Google Tag Manager code in all pages you want to track. This code is responsible for firing your tags.
In case you are working with a Sitefinity CMS instance, you can:
- Track all pages on a site by putting the Google Tag Manager code in the Master page.
- Track individual pages by placing the script in the
<head> section of the page. To do so, navigate to Actions » Title & Properties » Advanced options » Page templates » HTML included in the <head> tag.
An example of tracking interactions in a Sitefinity site with the help of Google Tag Manager is clicks on page elements that are within the
Configure Google Tag Manager
To enable Sitefinity Insight to track clicks, for example, you need to configure the following:
The trigger fires all of its related tags anytime a visitor clicks on a page element within the
For more information, see Tag Manager Triggers Google documentation.
- Custom HTML tag
The tag code is executed when the trigger is fired and enables Sitefinity Insight to receive data upon visitors clicking on the specified elements.
For more information, see Tag Manager Custom tags Google documentation.
Use custom tag to track page visits
Your custom HTML tag needs to have content similar to the following:
Test the integration
To test whether Sitefinity Insight receives interaction data and verify the integration is properly configured, you can just open a tracked page in a browser and complete the tracked interaction, for example, click on an element within the specified class. You can look at the Network tab of the browser Developer tools and verify there are requests to the Sitefinity Insight API servers.
Next, you can look at your data center in Sitefinity Insight and see the tracked interactions in the Journey timeline of known contacts.