Using INCLUDE to add Google Analytics script

More and more of our users are embedding the Google Analytics code using includes or external scripts. It is a smart solution that allows you to modify the various tracking codes you are using to analyze your website with on-the-fly, without having to perform a full build of your website every time. It also allows your tracking codes to be loaded fully asynchronous.

The problem

But this approach also creates some problems when you try to transfer data from UserReport to Google Analytics using custom variables. We are simple unable to detect the get_tracker object - in short, we don't know where to send your Google Analytics data. Luckily, there's a solution!

The solution

You can embed your Google Analytics User-ID into the UserReport tracking code to make sure that the custom variable information is transferred correctly from UserReport to Google Analytics.

You are able to embed the Google Analytics code using our "advanced script editor". You'll find it under Settings    Website details when logged into your UserReport account.

You'll find your unique Google Analytics website ID in the admin area of your Google Analytics account.



Powered by Zendesk