Flipbooks and the Google Analytics Tag in Google Tag Manager

Setting up a Google Analytics Tag in Google Tag Manager is easy! The tag will work great for your Hub, but if you want data for your Flipbooks, a few extra steps are involved.

The following steps will guide you through creating a custom variable for Flipbook tracking in your GTM account, then creating a custom trigger and adding that to your Google Analytics tag... why don't we just get started... 

Step 1 - create a Custom Variable in your GTM account

Open 'Variables' in your Google Tag Manager account. It will be in the menu on the left side of your screen.

Under the 'User-Defined Variables' heading, you should see a red 'New' button. Click that button to create the new variable (you might have to scroll down to get to this section).

Name the variable (copy and paste this): flipbookVirtualPageUrl.

Under 'Choose Type', select 'Data Layer Variable'.

Then under 'Configure Variable', enter this for the 'Data Layer Variable Name' (copy and paste): flipbookVirtualPageUrl.

You should also see a drop down box under a 'Data Layer Version' heading. Choose 'Version 2' in that box.

Click 'Create Variable'. Now if you select that variable from your list of User-Defined Variables, it will look something like this:

Step 2 - create a trigger in GTM called: 'flipbook Virtual Pageview Trigger'

Now in your account, click 'Triggers' in the menu on the left. Click the red 'New' button to create a new trigger and call it 'flipbook Virtual Pageview Trigger'.

Under 'Choose Event', select 'Custom Event'.

Under 'Fire On', put this in the 'Event name' box: flipbookVirtualPageView.

You'll see some selections where you can configure when the trigger should be fired. Choose 'Event' for the first drop down box, 'equals' for the second, and in the third, copy and paste this: flipbookVirtualPageView.

Step 3 - Add the 'flipbookVirtualPageView' trigger to the Google Analytics tag

Now go to the 'Tags' section in your Google Tag Manager account, and look for the Google Analytics tag (we're assuming you already have that set up).

Open the 'Configure Tag' section (click it).

Go under 'More settings' and open the heading 'Fields to Set'. Here we're going to tell Google Analytics to track Flipbook pages in your account.

Under 'Field Name', choose the 'page' option in the drop down list.

Under 'Value', enter the following: {{flipbookVirtualPageUrl}}.

Click 'Continue'.

Step 4 - Update the 'Fire On' the Google Analytics Tag

In addition to 'All Pages', you'll want to select the 'More' button so you can configure the GA Tag to fire on Flipbook pages.

When you click 'More', you should be shown a pop-up box that says 'Choose from existing Triggers'. The trigger you created in Step 1 will be in this list.

Check the box beside it so it's green with a white check mark inside and click 'Save'.

Now you should see two boxes underneath the triggers that will fire the GA Tag: All Pages, and the flipbook Virtual Pageview Trigger.

Click the 'Save Tag' button and be sure to publish your changes so the GA tag can start tracking as soon as possible.

Things that are Good to Know

You can call the trigger whatever you want, it's just important that they match when and where they need to.

Need help? Contact us!

Previous Article
How to Integrate your Account with Google Tag Manager
How to Integrate your Account with Google Tag Manager

A guide to integrating your Hub with Google Tag Manager

Next Article
Integrate your Hub with Google Analytics, AdWords, AdRoll, DoubleClick and more!
Integrate your Hub with Google Analytics, AdWords, AdRoll, DoubleClick and more!

With Google Tag Manager, you can now integrate your Hub with a number of third-party services!

Need help with your Google Analytics integration?

Contact Us