- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
10-24-2017 01:31 AM - edited 10-24-2017 01:35 AM
Hello,
I want to use the Document Referrer option of a Google Universal Analytics tag as described into the Google Analytics Developers documentation. My goal is to map a cookie variable to override the referrer captured by the GUA tag (because of a redirection on the site landing page that prevents GUA tag to fire).
But unfortunately I don't see this option into the "campaign" mapping options of the Tealium GUA tag. Is there any valid option to setup my request?
Many thanks in advance for the precious help!
Kind Regards,
Julien.
Solved! Go to Solution.
10-25-2017 02:01 AM - last edited on 10-25-2017 07:07 AM by kathleen_jo
What you can do for now is to edit the Google Analytics tag template, @JulienLegras. Look for these 3 lines and add the 4th:
"campaignMedium" : {"name" : "campaignMedium", "type" : "exists", "reset" : true},
"campaignContent" : {"name" : "campaignContent", "type" : "exists", "reset" : true},
"campaignKeyword" : {"name" : "campaignKeyword", "type" : "exists", "reset" : true},
"referrer" : {"name" : "referrer", "type" : "exists", "reset" : true},
Then look for these 3 lines, and add the 4th:
if (u.data.campaignMedium) {u.all("set", "campaignMedium", u.data.campaignMedium);}
if (u.data.campaignContent) {u.all("set", "campaignContent", u.data.campaignContent);}
if (u.data.campaignKeyword) {u.all("set", "campaignKeyword", u.data.campaignKeyword);}
if (u.data.ref) {u.all("set", "referrer", u.data.ref);}
The last line contains "ref" and should be the name of the corresponding datalayer parameter. In my case I have a "ref" query parameter I use for this.
11-03-2017 05:22 AM
So the way to do this without modifying the template is through a mapping.
There is an option for Custom Set Command:
This will allow you to map the anything you want onto the set command.
Adrian
11-06-2017 02:02 AM - last edited on 11-06-2017 02:22 AM by kathleen_jo
Hi @AndreScholten and @adrian_browning,
Thanks a lot for your help on this. Indeed, the "Custom Set Command" mapping is the easiest solution, but it wasn't obvious for me to look into the "Standard" mapping category (I went through the "Campaign" category where I didn't found the "set.referrer" documented into GA developers guide).
Anyway, that is good to know and thanks again.
Julien.
Copyright All Rights Reserved © 2008-2023