Google Tag Manager

Whenever users interact with BOON, a Google Tag Manager (GTM) dataLayer event is pushed. This allows easy tracking of the ways in which users interact with the integration using your existing analytics setup.

Note

Events are only pushed to the dataLayer if it is set on the window when the event occurs. It is important that the dataLayer is correctly initialised before the relevant events occur, otherwise they will not be tracked.

Event Names

The following events are pushed to the GTM dataLayer, with the prefix boon..

Event

Description

sessionStarted

A new BOON session was started for the user

viewedProfileBuilder

User viewed the profile builder interface

startedProfileBuider

User clicked the ‘start’ button on the profile builder

itemsRecommended

User finished the profile builder and got recommeded a set of items

viewedRecommendations

User viewed their set of recommended items

Event Format

BOON dataLayer events use the standard GTM event format. A timestamp is also included when the event occurs as well as a variable (boon.viewMode), with a string value of either inline or modal depending on how BOON is displayed. An example of a BOON viewedProfileBuilder dataLayer event is shown below:

{
    event: "boon.viewedProfileBuilder",
    boon.viewMode: "inline",
    boon.viewedProfileBuilderTime: 1602239976448
}

Example Setup

Custom triggers and tags can be used to surface the GTM dataLayer events in Google Analytics, allowing segmentation of users and conversion tracking.

Here is a minimal example of how to setup this up:

  1. In GTM, create a new trigger

  2. Name the trigger something clear like “BOON Event Trigger”

  3. Start configuration by selecting “Custom Event”

  4. Tick the box to use RegEx matching then copy and paste ^boon\. into the field

  5. Leave other settings as default and save the trigger

  6. Create a new tag

  7. Name the tag something clear like “BOON Event Tag”

  8. Start configuration by selecting “Google Analytics: Universal Analytics”

  9. Set tracking type to “Event”

  10. Set category to “BOON”, and action to {{Event}} (or use the variable selection interface to select the “Event” variable). Leave other fields blank or set to values to help with user segmentation (such as the value of boon.viewMode)

  11. Select your Google Analytics Settings variable

  12. Configure triggering with the trigger just created

  13. Leave other settings as default and save the tag

  14. Preview and test the changes before publishing

These events will now soon appear in Google Analytics with category “BOON” and the dataLayer event name as the action.