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

Health Cloud Brings Healthcare Transformation
Health Cloud Brings Healthcare Transformation

Following swiftly after last week's successful launch of Financial Services Cloud, Salesforce has announced the second installment in its series Read more

Salesforce OEM AppExchange
Salesforce OEM AppExchange

Expanding its reach beyond CRM, Salesforce.com has launched a new service called AppExchange OEM Edition, aimed at non-CRM service providers. Read more

The Salesforce Story
The Salesforce Story

In Marc Benioff's own words How did salesforce.com grow from a start up in a rented apartment into the world's Read more

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

Health Cloud Brings Healthcare Transformation
Health Cloud Brings Healthcare Transformation

Following swiftly after last week's successful launch of Financial Services Cloud, Salesforce has announced the second installment in its series Read more

Salesforce OEM AppExchange
Salesforce OEM AppExchange

Expanding its reach beyond CRM, Salesforce.com has launched a new service called AppExchange OEM Edition, aimed at non-CRM service providers. Read more

The Salesforce Story
The Salesforce Story

In Marc Benioff's own words How did salesforce.com grow from a start up in a rented apartment into the world's Read more

author avatar
wp-shannan