Naresh
Naresh

Reputation: 2781

Latest analytics.js not generating __UTMZ cookies

The old lagacy ga.js is generating __UTMZ cookie but latest analytics.js not generating __UTMZ cookies. What is the reason behind it and how can i get __UTMZ cookie value from analytics.js

Upvotes: 0

Views: 785

Answers (1)

Eike Pierstorff
Eike Pierstorff

Reputation: 32770

The "classic" GA version set cookies because much information, including campaign attribution, was precomputed on the client side, stored in cookies between pageviews and sent with every request to the Google Analytics server.

With Universal Analytics there is no more client side processing, all information is evaluated on the Google servers. This was necessary to make good on the "universal" part of the name - Universal Analytics runs on clients that do not execute Javascript, so precomputing information on the client was not an option.

So Universal Analytics does not set utm* cookies (it uses a single cookie to store the client id), you cannot make it do so (in any meaningful fashion), and if you want to extract campaign information you have to save it yourself in cookies (and then you cannot be quite sure that this matches the attribution in the GA interface).

Upvotes: 2

Related Questions