Inject Google Analytics Client ID to All Your Links
We have been playing with Google Analytics Client ID and found that not many agencies have been using it.
The Client ID can be found in the GA cookie and Client ID is stored on the GA cookie of your website’s actual domain.
Google Analytics stores a unique identifier for every user who visits your site within a first-party cookie. This value, in GA parlance, is called the Client ID, and the name of the cookie is _ga.
Here’s what the entire cookie string looks like, with the actual Client ID bolded:
2139536866.1471456764
Client ID could be extremely useful if you are trying to track a multichannel behaviour:
User clicks on a Display ad, then clicks on an Affiliate link, then sees a Twitter ad, then searches through Google, then converts. You can capture all these separate interactions with Client ID.
Adding this simple JS code to your analytics will enable you to add client ID reference to all your urls.
ga(function(tracker) {
var clientId = tracker.get('clientId');
jQuery(document).ready(function($){
var href = $("a").attr('href') + "&id=" + clientId;
$("a").attr("href", href);
});
});
Once this code is installed, you will be able to filter pages by Client ID.
Feel free to change the code when necessary or get in touch for a code customisation.
Related reading…
Unlocking SEO Secrets: Leveraging the Yandex Hack for Improved Google Search Rankings
Unlocking SEO Secrets: Leveraging the Yandex Hack for Improved Google Search Rankings The Yandex Hack refers to the incident on January 25, 2023, when the source code of Russia's search engine, Yandex, was leaked online. As Yandex and Google...
read moreArtificial Intelligence is changing Web analytics forever.
As the world of business becomes increasingly complex, finding solutions to problems in the office is becoming more crucial. Artificial intelligence (AI) technologies have stepped in to give us a helping hand, and are quickly transforming almost...
read moreThe Orchid Box Adwords Raspberry Pi Display Bot
The most important thing to bear in mind when conducting local keyword research is that one should never translate keywords, but ideas. It is best to do keyword research for local markets and then use the keywords in the translated content....
read more