How google analytics get a new vistor - google-analytics

I want to know if I delete my cookies or I change the browser google anlytics will show +1 vistor or I must change the ip too ?

GA visitors are based on cookie, not IP.

Related

Google Analytics track to Initial Referrer

A user clicks on a referring link to visit our eCommerce website, but does not yet place an order. Then the user goes back directly to our website at a later point and places an order. How can we set up in google analytics / tag manager that the initial referrer should stay the referrer for this user?
Example: A customer visited example.com and clicked on a link to our website. Then the customer bookmarked our website url. Then at a later point, the customer visits our website through the bookmark or through a Google search. How do we track that example.com was the original referrer for this customer?
Thank you for your help.
If the user returns with the bookmark, the previous source will automatically result as a consequence of the standard Google Analytics attribution model. While if accessed from organic search this will overwrite the previous source.
What you can do to save the first source is to install a cookie on the user's browser so that the first time it saves the source in a custom dimension, while if the cookie already exists it does not save it.

Manually setting the Google Analytics Client ID

I have a sub-domain that I am unable to put GTM or GA tracking code on. I have GA on the main domain.
I can retrieve the _ga cookie and get the Client ID but but if a user has not been to the main website they won't have one.
My question is:
Can I set a cookie called _ga (in the same format as GA sets it) and will this get picked up by GA if the user then goes back to the main website?
This article seems to be what you need:
Cookie Settings And Subdomain Tracking In Universal Analytics
https://www.simoahava.com/analytics/cookie-settings-and-subdomain-tracking-in-universal-analytics/

Tracking Pageviews based on Referrer

My goal is to track a user session when a visitor is sent from a specific website.
I would expect visitor from 2 websites: a.com and b.com
I would want trigger a tag 1 if referrer contained a.com
and trigger tag 2 if referrer contained b.com. Once a user lands on my site, they would be expected to travel around many pages on my domain. I still would need to track that session even though the HTTP Referer is no longer matching a.com.
My goal is to track how many of these sessions get sent from a.com, how many from b.com and how many reach of each reach a thank page at /thankyoupage
How would this be configured ?
Would this require session scope and if so, how would this be configured ?
If you just want to see this in Google Analytics you can create a segment with referrer a.com or b.com (mind that in GA the referrer is a traffic channel and only filled if there are not campaign parameters present on the landing page url). So for Analytics you do not need extra work. Traffic channels are automatically in session scope (as a change in channel starts a new session).
If you want to fire a tag conditionally based on the referrer it get's a tad more complicated. GTM does not maintain sessions, and does not, by itself, transfer information between page views. So you need to store the info yourself.
You would use the built-in referrer variable in a trigger that fires a tag if the referrer does not match your own domain. You would use that to fire a custom html tag with a Javascript function that sets a cookie. You then set a cookie with the referrer.
On your thankyou page you use the built-in cookie variable to read your cookie. If the cookie contains a.com or b.com respectively you use that for triggers that fire the appropriate tags (pageview trigger, fire on some pageviews, filter "[your cookie variable] equals a.com" (or b.com)). Since cookies are domain specific this only works when your thankyou page is on the same domain.
I don't think you need to do any configuration for this.
For referral traffic, you can see the acquisition report. It should show up with a source as a.com and b.com.
for reaching the thank you page, I'd suggest you set up goals based on the arrival of the thank you page.
As per my understanding, you want to have cross-domain tracking and want to track below thing:
Page 1of a.com --> Page 2 of a.com --> Page 1 of b.com --> page2 of b.com
By default whenever the domain changes User's GA ID is changed. So for a.com and for b.com GA will treat the same user as different, so by default, you cannot track such things.
To track above scenario GA should consider that the user on both the site is same And to do that GA provides Cross Domain tracking using Linker
https://developers.google.com/analytics/devguides/collection/analyticsjs/linker

User ID Clearing

This is not SEO related but somewhat merely client related.
There is a website in particular that uses Google Analytics tracking to uniquely identify each one of their users.
This website has a blocking system that is preventing me from viewing some of their content, which I'd like to view.
I figured out that the website uses the Google Analytics cookie to somehow identify me.
Is there a way I can somehow spoof the client-ID from Google Analytics to basically make a new identity for myself? Thanks community.
GA has two ids that could identify a user, clientId and userId. The client id is set by the javascript tracking code. To delete that you would simply have to delete the _ga cookie. You will get a new ID randomly generated that does not identify you other than in the sense that multiple pageviews with that clientId will be treated as coming from the same user.
The userId is set by the server when a user logs in (to connect all sessions of that user, however it must not personally identify the user in question), so at that point the website already has to know you to set a userid.
It seems more than unlikely (and technologically not even feasible) to use Google Analytics to limit access to a website. For starters, Google provides an opt-out plugin for Analytics that would make such a system rather ineffectual, and I'm not quite sure how such a system would work.
To yet answer your question, you can change the clientId by manipulating the _ga cookie and replace the value therein, and you could spoof the userID e.g. by using a browser plugin that allows you to manipulate http requests. However I don't think this will let you bypass any access protection.

Shibboleth being passed as referrer in Analytics

Been searching for an answer for this for a while but nothing that I can find that is useful.
Basically in the organisation I work in we use Shibboleth for user authentication.
We probably have 200+ sites & Shibboleth works effectively for these.
However, one site in particular is protected using Shibboleth (if the user is not a valid user they have to sign up for an account in this process also) which is causing an issue with our Analytics (Google Analytics). The referrer to the site is ALWAYS the shibboleth authenticator.
What we need is a facility to track conversions on this site based on source/campaign the user arrived from. The proposed solution right now is to use a Tag Manager product to fire off specific tags based on a combination the referrer or campaign. This one single site is used for a multitude of things (all prospective leads to EPR) but we need different information based on how the user landed on that page.
We are tracking all the interaction points that lead up to this (i.e. tracking potential leads) but a lot drop out during the signup process and right now we do not have actual conversion data, meaning the Marketing etc is being spent based on highest traffic source rather than which source or campaign is most effective.
The problem is when a user signs in, signs up using Shibboleth, Shibboleth sets a new cookie for that session. In Google Analytics all the referrer to this site are from the authenticator.
Is there some configuration issue with GA that I am overlooking for this scenario or is there something that can be done with Shibboleth so that the initial referrer (rather than the authenticator) being passed as the referrer which in turn would facilitate the rule creation of the Tag Manager to fire off the required tags
If you use Universal Analytics, you might be able to overcome using the new Referral Exclusion:
You can exclude specific domains from being recognized as referral
traffic sources in your Analytics reports. A common use for this
feature is to exclude traffic from a third-party shopping cart to
prevent customers from being counted in new session and as a referral
when they return to your order confirmation page after checking out on
the third-party site.
Google Analytics recognizes the URL you use to set up a new property
in your account and automatically excludes this domain from your
referral traffic, so you won’t see self-referrals in your Analytics
reports.
https://support.google.com/analytics/answer/2795830?hl=en
Another option might be to pass a parameter across the login page when you request an authentication. If you set your fields in the request correctly, you could have Shibboleth send your user back to any page or with any query string, such as adding ?source=original_page_name. After authentication, these parameters should be available to manipulate or pass on to GA. This won't actually spoof your referrers, but it will get you the data you need.

Resources