I have put the tracking code with my id on every page of website.
But upon checking for cookies, I can see no cookie is being set by gtag.js.
According to https://developers.google.com/analytics/devguides/collection/gtagjs/cookies-user-id , the js code should automatically set the cookie.
P.S.- I am using Google Analytics for the first time. Total Noob.
Any ideas?
Indeed, gtag.js uses the _ga and _gid cookies to distinguish unique users, and uses the _gat cookie to throttle the request rate. More details about cookies you can see here:
https://developers.google.com/analytics/devguides/collection/gtagjs/cookie-usage
To check actual cookies, please use plugin like EditThisCookies (plugin to Chrome).
To check your GA implementation, please use Google Tag Assistant (also plugin to Chrome). Tag Assistant will validate if your analytics is working or not.
There is a need of more details about your website and GA implementation. For example, do you implement GA via Tag Manager? What is your website address? etc. Without such details it is difficult to investigate your case.
Related
I'm not sure if this is the right stack to ask this in so if not please let me know!
I am trying to get a handle on what cookies are used on a site and what they are for. When I initially did a cookie scan I noticed a cookie names NID which was set by google.
I have tried to research this cookie and can see it is used by Google for advertising purposes.
But I am confused about why and where this is being set, the site I am looking at does not use advertising anywhere, although it does use embedded YouTube videos.
Can anyone shed any light on when and why this cookie is set?
according to Google
Most Google users will have a preferences cookie called ‘NID’ in their browsers. A browser sends this cookie with requests to Google’s sites. The NID cookie contains a unique ID Google uses to remember your preferences and other information, such as your preferred language (e.g. English), how many search results you wish to have shown per page (e.g. 10 or 20), and whether or not you wish to have Google’s SafeSearch filter turned on.
For me, the cookie was hammered incessantly by the url https://www.google.com/s2/favicons?domain=example.org Which was being used by CookieBro & FeedBro RSS feeder browser addons for retrieving icons associated with various domains. The cookie can be dropped by either an addon or by google itself.
I used cookie log via cookiebro addon for firefox & chrome to detect these cookies in realtime, its one of a kind. However I did not realize it was cookiebro dropping them until the next step below.
To see what background connection is occuring when these cookies are placed, enter the following firefox url: about:cache?storage=disk&context= and you will see when and where the google url being connected to.
It is said this cookie is for targeting & ADS and the google's settings are integrated to make the cookie inconvenient to delete for Google users.
I don't know if this is the right exchange to ask in, but if it isn't please point me in the right direction.
I'm searching for some information from Google on the _dc_gtm_UA-XXXXXXXX-X cookie, where the X's are the GA code.
But I can't find any official documentation.
Can anyone provide som official documentation?
Update: The Google Analytics' Cookie Usage Developer documentation informs about this cookie now:
_gat (1 minute TTL) Used to throttle request rate. If Google Analytics is deployed via Google Tag Manager, this cookie will be named _dc_gtm_<property-id>.
I could not find official documentation either, but here's a wild guess, from right to left:
_UA-XXXXXXXX-X is your Google Analytics (GA) property ID, or account number.
_gtm is Google Tag Manager (GTM), which means that GA was not integrated directly but injected via GTM.
_dc is DoubleClick, which most likely means that your Google Analytics account has been connected to your Google DoubleClick Campaign Manager (DCM).
(The DCM help page about cookies mentions __gads as cookie name prefix though.)
...so _dc_gtm_UA-XXXXXXXX-X is your Google Analytics ID, injected via Google Tag Manager, so that DoubleClick Campaign Manager can consume it -- presumably to associate and track the performance of ad campaigns via Analytics.
This cookie only seems to appear on sites that integrate GA via GTM.
Its value always appears to be 1.
Various random websites on the net present (exactly) the following explanation in their cookie policy:
_dc_gtm: used to help identify the visitors by either age, gender, or interests by DoubleClick - Google Tag Manager.
So that text appears to copied or auto-generated from an official resource, but is not referenced anywhere.
Some sites additionally present a link to Google Analytics' Cookie Usage Developer documentation, but that does not list the cookie name.
Note that this _dc_gtm_UA-... cookie is a first-class cookie; i.e., it is set for the domain of your website.
When a visitor of your website requests additional pages/files/resources on your website domain, then this cookie will be sent along with every request.
Therefore, ensure to adjust your HTTP reverse-proxy (e.g., Varnish) configuration accordingly, so that this pure client-side cookie does not cause subsequent client requests to miss your cache. Most website backend applications do not need this cookie.
Google normally uses two underscores as prefix for all cookies that are only relevant on the client-side; not sure why they diverged from that emerging standard here.
I am using universal analytics on my website via Google Tag Manager with data layer e-commerce tracking enabled.
The referral addresses are appearing to be coming from the payment providers (e.g. secure.arcot5.com)
I have included all my URLS in to the autolinker and after some testing the _ga cookie value appears to be consistent all the way through the booking process but it appears differently on the page after the secure payment takes place.
This suggests the session is being treated as a new one, hence the referral address issue I am having.
I have been trying to set a cookie on the entry page which equals the _ga cookie value but currently I am unable to retreive it on the confirmation page.
Has anyone got any ideas for a possible solution?
You will most definitely save my life!
Dan
Have you read this article? There could be a couple of pointers in there however I'm not sure what you have and haven't tried
Accurately reporting referrer from payments made with PayPal in Google Analytics
When visiting this site:
https://campus.ayy.fi
and submitting the login http POST request,
I found in cookie collection two google analytics related keys: __utma, __utmz.
I searched into the html code and js script for that page and didn't find any evidence that google analytics script is embedded (e.g. "ga.js").
So my question is why there are still google analytics cookies in the request and who added them?
Thank you!
Well after visiting the website mentioned I coudn´t idenfity any http requests to google analytics and also no evidence of the GA code installed on the page.
My assumption is that the "cookie collection" you are reffering to is the collection of cookies on your machine, and if that website has had any GA code installed before and you visited the page, the cookies will stay on your machine for some time (as long as 2 years for _utma and 6 months for _utmz).
The easiest way to check that is to clean your cookies and open the webpage once again. If you really want to digg in, you can use HTTPFox (enable it, click "start" when you visit the page and in the search field type "utm"). In this way, you can see every request beign sent by the webpage. (Although I did use this proccess and there really are no requests to GA).
-Augusto Roselli
Web Analytics - dp6
I use Google Analytics on my site, and I want to read __umtz cookie to get referring link. I made some research and I wrote such code:
$refer=explode('utmcsr=',$_COOKIE['__utmz']);
if(count($refer)>1) $refer=explode('|',$refer[1]);
$refer=addslashes($refer[0]);
The problem is, this is not always working, sometimes I get junk as result. What I am doing wrong? Maybe someone have a good description of this cookie?
Check my Google Analytics Cookie Parser.
Google Analytics PHP Cookie Parser is a PHP Class that you can use to obtain data from GA cookies such as campaign, source, medium, etc. You can use this parser to get this data on your contact forms or CRM.
Just updated to version 1.2 with minor bugfixes and more info, number of pages viewed in current visit.
You could use $_SERVER['HTTP_REFERER'] to get the Referer.
Overall it is a bad idea to use other's people's cookies to get data unless you know exactly how they work, and when they update, or you use an API that THEY have made available.
Lets say the Google decides to revamp the cookie altogether so that the Referer information isn't available on the cookie, your system would break. It is best to get data directly from your own sources rather than someone else's.