If you are using Google Tag Manager (GTM), you can leverage the Ceros integration with GTM to send page view, click, and hover events to a tag configured in a GTM container.
Skip to Tag Manager container setup
This allows you to send your Ceros metrics (i.e. page views, clicks, hovers) back to Google Analytics or any other analytics platform you are currently using, enabling you to keep all of your analytics in one place. If you are already managing your tags through GTM, you can continue to do so with Ceros.
Things to keep in mind
- When a Ceros experience is shared as a standalone experience either using the view.ceros.com URL or a vanity URL, the GTM script is loaded within the experience, and pageviews, clicks and/or hover events will be sent to Google Analytics. This functionality is built in, and there is no need to manually add the GTM script.
- If a Ceros experience is embedded, Ceros will NOT fire a pageview. Pageviews will come from the parent page, and Ceros will send click and/or hover events to the GTM instance on the parent page.
- Embedded Ceros experiences, the integration relies on a correct and standard implementation of the GTM script on the parent page. If that is not present, is present but not configured properly, or the container ID used on the parent page does not match what’s used in the integration settings, events will still be sent, but they will not go anywhere.
What is sent via GTM?
Example Pageview Event Sent to the Data Layer:
cerosPageTitle: "Overview Page"
- event: This identifies the source of the page view event (Ceros) and is used as a trigger value for custom tags in the GTM container. This value cannot be changed.
- cerosPagePath: The relative path and query params of the page URL.
- cerosPageLocation: The full page URL (including query params).
- CerosPageTitle: The title of the page set in the Ceros Studio.
Example Click/Hover Event Sent to the Data Layer:
cerosLabel: "Hotspot Label Example - Download CTA"
- event: This identifies the source of the event (Ceros) and is used as a trigger value for custom tags in the GTM container. This value cannot be changed.
- cerosCategory: This value is used as a top-level grouping of the click/hover events. The default is “ceros-event, but this can be changed in the integration options.
- cerosAction: This is the name of the event being sent. The defaults are “ceros-click” and “ceros-hover” for click and hover events, respectively. These values can be changed in the integration options.
- cerosLabel: This is the name of the object in the studio (typically a hotspot) that triggers the event.
Whether the Ceros experience is embedded or standalone, you must have tags, triggers and variables set up within the Tag Manager container in order for events to pass to Google Analytics. With the integration turned on, Ceros will always send events, but if there are no tags set up, those events will not go anywhere. This guide will explain how to set up Tag Manager for Ceros events.
Setting up your GTM integration in Ceros:
- Copy your GTM Container ID from Tag Manager.
If embedding, the container ID used here must match what’s used on the parent page.
- To set up the integration at the Account Level, in the Ceros Admin, select your name from the drop down and navigate to Account > Integrations.
To set it up at the Experience Level, click the gear icon on the experience within a project.
- Toggle on the integration for Google Tag Manager
- Paste in your Container ID
- If the experience will be standalone, toggle on Track Page Views for Standalone Experiences.
Page view events will not be sent if the experience is embedded.
- Identify your Event Category, this will be used as the top-line grouping of the click/hover events. You can leave it as the default “ceros-event” unless you need to use a different category name.
- Toggle on Track Clicks, Track Hovers, or both. You can also enter your own Click Event Action and Hover Event Action values, but most people tend to use the defaults. These values will be sent back to identify your click and hover events
- Make sure that when creating your Ceros experience, each interaction is on a hotspot that is labeled with a specific name—the names of your hotspots are going to be the event values that identify what is being clicked and hovered over, so it’s very important to have unique names on these.
- Click Save.
That’s all you need to do on the Ceros side. Next, we’ll go over how to set up Tag Manager to fire tags on Ceros events.
Getting Ceros Events from GTM
Step 1: Set up Ceros Event Variables
- Go to Variables and select New under “User-Defined Variables”
- Click Variable configuration and select Data Layer Variable
- Create variables for cerosAction, cerosLabel, and cerosCategory.
Below is an example of what cerosAction would look like. Repeat for cerosLabel and cerosCategory as well.
Step 2: Set Up Ceros Trigger(s)
- Go to Triggers, select New
- Click Trigger Configuration select Custom Event
- Give this a name and make sure “All Custom Events” is selected
This trigger, when added to a tag, will fire the tag on any Ceros event, whether it’s a click or a hover, but you can also set up triggers for clicks and hovers individually by setting up a condition for each. Below is an example for a trigger that only fires for clicks.
Step 3: Set Up the Ceros Tag(s)
- Go to Tag and select New
- Click Tag Configuration and select Google Analytics: Universal Analytics
- On the drop-down for Track Type select Event
- For Category, Action, and Label select the Variables you created
- Value can stay empty unless you do have a value for the event
- On the drop-down for Google Analytics Settings select your Variable for your Google Analytics
- Click on Triggering and select the Custom Event you created in step 2
- Make sure you name and save your new tag
- Preview and check that events are being sent back to your Google Analytics dashboard
Your tag setup should be similar to below:
To set up a tag that fires only on a hover or only on a click, you would create those tags the same way but use the individual triggers.
If you have any further questions about Google Tag Manager, feel free to ping our support team in the chat widget in the studio. And be sure to check out this article to learn more about setting up your Google Analytics Integration.
Tips & Best Practices
- If you are leveraging the Ceros Eloqua or Marketo integration, the integrations also load the Eloqua or Marketo Munchkin tracking scripts automatically.
If you are already loading those scripts on all pages through Tag Manager, it would be a good idea to suppress those triggers on Ceros pages as it’s possible inflated metrics could occur since the script would be loaded on the page twice, and it’s just not necessary for them to be loaded twice.
- It may be a good idea to prevent any third-party tracking or other Custom HTML tags from firing on Ceros preview pages during design unless you need to test something.
The Tag Manager integration will not fire a pageview or Ceros click/hover event when the experience is in preview, but other “on pageview,” “on window ready” or “on DOM ready” triggers will fire and could result in inflated metrics as the Ceros preview window live-updates when edits are made, which refreshes the window and could potentially fire the tags hundreds of times while the experience is being worked on.
- It could also be good practice to only turn on the integration when the experience officially goes live, in the event that the experience is published before the actual “go live” date.