Starting from the Pro plan, tracking pixel can be embedded in your account. Here is a short introduction and three examples on how to configure Google Tag Manager:


Content



  • 1. Create a Google Tag Manager (GTM) container
    (Google Docs here)

  • 2. Activate Google Tag Manager for your Pageflows

  • 3. Set up Google Tag Manager to forward Pageflow's custom events to analytics tracker

  • 3.1 Example: Google Analytics


Further configuration options


  • 3.1.1 Time spent on a Pageflow page

  • 4. Pageflow's events and their data layer variables




1. Create a Google Tag Manager (GTM) container





  • Ignore installation instructions



2. Activate Google Tag Manager for your Pageflows


  • On Pageflow's admin dashboard, click ‚Settings‘
  • Scroll down to 'Google Tag Manager'
  • Enter your Google Tag Manager container id (formatted as 'GTM-XXXXXXX')







3. Set up Google Tag Manager to forward Pageflow's custom events to analytics tracker


  • Choose your container and create tags according to what you require



3.1 Example: Google Analytics


Add a basic Google Analytics page tracking tag if you do not already have one. Just follow the four steps given in Google's docs.




  • Add Pageflow's 'path' data layer variable:



On your GTM workspace, e.g. 'Default Workspace" navigate to 'Variables' and click the 'New' button in 'User-Defined Variables'



  • In 'Variable Configuration', choose variable type 'Data Layer Variable' 
  • For name, set 'path'. Set Data Layer Version 2, and no default value
  • Save variable as 'Pageflow - path'



  • Add Pageflow-specific triggers



Common examples for Pageflow triggers would be 


  • 'GA - Trigger - Button Clicks' 
  • 'GA - Trigger - Page Changes'  
  • 'GA - Trigger - Media Events'.



On your GTM workspace, e.g. 'Default Workspace', navigate to 'Triggers' on the left-hand navigation. Then, for example add:


GA - Trigger - Button Clicks

  •  Choose trigger type 'Click - All Elements'
  •  Choose 'This trigger fires on Some Clicks'
  •  Choose 'Pageflow - path' 'contains' 'button'
  •  Save trigger as 'GA - Trigger - Button Clicks'



GA - Trigger - Page Changes


  • Choose trigger type 'Custom Event'
  • Set event name 'transition_page|open_landing_page'
  • Check 'Use regex matching'
  • Pick 'All custom events'
  • Save trigger as 'GA - Trigger - Page Changes'



GA - Trigger - Media Events


  • Choose trigger type 'Custom Event'
  • Set event name '\S*_(audio|video)$'
  • Check 'Use regex matching'
  • Pick 'All custom events'
  • Save trigger as 'GA - Trigger - Media Events'




Add a Google Analytics tag that tracks Pageflow events. For example, we'll create a tag that uses our example triggers from the previous step:



  • On your GTM workspace, e.g. 'Default Workspace', navigate to 'Tags' on the left-hand navigation.
  • Choose tag type 'Universal Analytics - Google Analytics'Choose tracking type 'Event'


As tracking parameters:


  • Type 'Pageflow' into the Category field and '{{Event}} onto {{Pageflow - path}}' into the Action fieldLeave label and value empty
  • Choose for ‚Non-Interaction Hit‘ 'false'
  • Choose ‚Select Settings Variable'
  • Check 'Enable overriding settings in this tag'
  • Insert your Google Analytics tracking id
  • In Advanced Settings, choose for 'Tag firing options' 'Unlimited'
  • Apply triggers 'GA - Trigger - Button Clicks', 'GA - Trigger - Page Changes' and 'Media Event'
  • Save tag as ‚GA - Event Tag - Pageflow'



  • Submit your changes, and publish them e.g. to Live environment



Further configuration options 


3.1.1 Time spent on a Pageflow page


The 'Pageflow - path' variable from the Google Analytics example can also be used with a Timer Trigger and a session timer tag. For helpful information on how to achieve this, see Google Tag Manager docs and Google Tag Manager Web GUI.



4. Pageflow's events and their data layer variables



All events that Pageflow itself provides to GTM data layer are covered by the Google Analytics example. For completeness, they are


  • gtm.click
  • open_landing_page
  • transition_page
  • (play|pause|pos|eof)_(video|audio)


All of those events also provide a 'path' variable to the data layer, that is used to keep track of user behavior within the single page of a Pageflow. This is entirely different from GTM's built-in 'Page Path' variable! The media events covered by regex '\S*_(audio|video)$' also provide some media variables. Among them:


  • bitrate
  • currentTime
  • duration
  • fileName
  • volume


Depending on your goal, the values of those variables may be useful for tracking user behaviour.