This tag stores data in both the page referrer and URL parameters within a browser cookie. This cookie proves useful, particularly on conversion pages or when user consent has been obtained, allowing the session to be correctly attributed to the relevant campaign.

Furthermore, this template offers a solution to the rogue referral issue. By enabling the “Store campaign data in a browser cookie” option, you can specify the URL parameters that trigger a cookie write. If any of these parameters are present in the page URL when the tag is activated, the page URL is recorded in the browser cookie.

persist campaign data

In scenarios where the page referrer hostname does not match the current page hostname (indicating the user’s arrival from another domain), the referrer is also stored in a cookie.

Opting for the “Push original location in dataLayer” feature results in the tag pushing the current URL into the dataLayer. This can be leveraged to address the rogue referral problem effectively.

Persist Campaign Data

For single-page sites or apps, which typically involve content loading without refreshing the page, there is a specific challenge in Google Analytics tracking when configured through Google Tag Manager. The issue arises because, with every hit using a unique tracker object, the Document Location field is updated, causing problems in attributing sessions correctly.

To resolve this, the tag template offers a comprehensive solution, ensuring proper session attribution even on single-page sites. Explore the Google Tag Manager Template Gallery at https://tagmanager.google.com/gallery/ for easy access to this template and others.

Related Posts
Salesforce Jigsaw
Salesforce Jigsaw

Salesforce.com, a prominent figure in cloud computing, has finalized a deal to acquire Jigsaw, a wiki-style business contact database, for Read more

Guide to Creating a Working Sales Plan
Public Sector Solutions

Creating a sales plan is a pivotal step in reaching your revenue objectives. To ensure its longevity and adaptability to Read more

What is a Salesforce Jumpstart?
Salesforce Quickstart

A Salesforce Jumpstart is a program designed to help businesses quickly and efficiently implement Salesforce, which is a powerful customer Read more

50 Advantages of Salesforce Sales Cloud
Salesforce Sales Cloud

According to the Salesforce 2017 State of Service report, 85% of executives with service oversight identify customer service as a Read more