Tracking Outbound Links on Flipbooks with Google Analytics

November 17, 2014 Uberflip Customer Success

Google Analytics does not automatically track outbound link clicks because the destination URL usually does not have the tracking UA profile embedded, so we must use a bit of code to help Google track clicks as Events.

NOTE:  This method requires Page Widgets which are not currently viewable when Desktop/Mobile Flipbook pages are zoomed or in Desktop FullScreen mode (Page Widgets are hidden).

Just follow the below 2 steps and you should see your link clicks tracking almost instantly in Google Analytics.

1. Create Custom Script Page Widget

See this article on Page Widgets for more info about this tool.

 

 

You could even use a a hosted image as the clickable link using a <img> tag (remember to set width/height to "100%" so the image will fill your page editor placement box)

Within the Page Editor, position and size the placement box so it covers the website link, then add the below script within the Custom Script Page Widget.  Note that this script is for GA properties using the Universal Analytics tracker.  For Classic Analytics you would need to use a different script.   You need to change the 'UA-XXXXXXXXX-X' values to your own UA code and the labels of 'outbound' and 'click' can also be changed to fit your specific case.

Add the clickable HTML link code that references the above script to the end of the Custom Script Page Widget code, something like this:

<a href="http://www.example.com" onclick="trackOutboundLink('http://www.example.com'); return false;"><img height="100%" src="http://www.example.com/transparent.png" width="100%" /></a>

Save the Page Widget and you should be in a position to track that click within GA as an 'outbound' event

2. Google Analytics - Find Click Stats in Events

  • Login to your Google Analytics account and choose the associated Profile
  • Head to Content>Events>Overview where you will see the Event Category 'Outbound Links' (based on how you built the script above)
  • Here you will find the data for your outbound clicks
  • If you are tracking multiple outbound links, you should be able to click "view full report", drill down into "Outbound Links" and see the different links and their performance over the date period selected

 

Previous Article
How to Create Views to Separate the Data Flow While Using a Single UA Code
How to Create Views to Separate the Data Flow While Using a Single UA Code

You are able to integrate a single web property ID (UA code) within your Account on the Application. Someti...

Next Article
What is Google Analytics?
What is Google Analytics?

Google Analytics is an extremely powerful (and free!) website analytics and reporting tool that can be inte...

Need help with your Google Analytics integration?

Contact Us