Reputation: 446
Example: I have 3 sites, a.com, b.com, and c.com. How can I keep track of the traffic that starts out at a.com and ends up at c.com, using Tag Manager and Universal Analytics?
I know that using referral source is an easy enough thing to view in UA, but I really need referral referral source because UA only uses the most recent referrer, not a referrer n sites back.
Please note that this question is not just about cross-domain tracking, rather keeping track of a site visited before the current referral.
Upvotes: 1
Views: 240
Reputation: 19
Using GTM
If you use GTM (Google Tag Manager), you must create a permanent variable that contains the domains where your site might go to or be visited from.
Lets call it "myDomains". It would be like this: myDomains : permanent : "a.com,b.com,c.com" (without quotes)
After this, in your pageViews tags, you'll need to set some fields: In "more configurations", go to "fields to set" add some fields and set the following properties:
Field Name : Value
allowLinker : true
And, if you use multiple sub-domains, add the following:
cookieDomain : auto
Now, still in the "more configurations", under "Cross Domain Tracking", you will use the variable myDomains (that we created before) on the "Auto Link Domains" as this:
{{myDomains}}
Now you just have to save it and now you can track your multiple domains.
Hard-Coded
If You don't use GTM and insert the tags directly to your source code, then what you need is similar to what we did in GTM:
ga('create', 'UA-XXXXXXX-Y', 'auto', {'allowLinker': true});
ga('require', 'linker');
ga('linker:autoLink', ['a.com', 'b.com', 'c.com'] );
Note that just like we did in GTM, we:
Note: if you use the same domain but just diferent levels of sub-domains, you will just need to set the cookieDomain to auto, no need for Cross-Domain.
Further reading
Google guide for this implementation
Upvotes: 1
Reputation: 32780
I do not fully understand your use case, but you can catch the original referrer, store it somewhere (e.g. in a cookie) and then send it e.g. via the url to the following page. Then you catch the query parameter and use it in a set call:
ga('set', 'referrer', '<original referrer>');
ga('send','pageview');
For all hits following the set call GA will record the referrer as the value of ">" which you replace with your captured value.
Upvotes: 0
Reputation: 679
There is no real way to do this within the GA interface.
What you could do is create a new GA property that all these websites send data to (if you haven't already done so).
Then create a filter for this property that appends the hostname to the request URI. You can learn to so this here in the Google documentation. This will allow you to see the full URL thus allowing you see all websites.
I would then create two custom dimensions: sessionId
and hitTimeStamp
. These can deployed through Google Tag Manager. An article by Simo Ahava found here explains well how to do this.
Using SQL, you will be able to partition page
by sessionID
and order by hitTimeStamp
to give you a view on page flow across each website to c.com.
Upvotes: 0