AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
2.8K members online now
2.8K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Enhanced link attribution implementation

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello,

I am trying to set up link attribution, and I was wondering if you could help with some questions.

 

Questions:

1. I set link attribute in google analytics and google tag manager to true, is that all or do I still need to modify the tracking code to add in ga('required', 'linkid');? Does GTM take care of having to add in that code?

 

Page where I found code snippet:

http://www.inboundmarketingagents.com/inbound-marketing-agents-blog/3-easy-steps-to-enabling-google-...

 

2. I currently have a page with 2 links going to the same page and one of the links does have a unique id. When I go to the in page chrome extension I see a range for that link with the id like 52-1000 clicks. If it has an id shouldn't it show the exact amount?

 

3. Lastly this page is using angular and the id is probably dynamically placed, does that not matter or do I need to do anything to accommodate angular?

 

Thank you kindly,

1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author EPC Product
March 2017

Re: Enhanced link attribution implementation

[ Edited ]
Participant ✭ ✭ ✭
# 2
Participant ✭ ✭ ✭

Hi,

1. I set link attribute in google analytics and google tag manager to true, is that all or do I still need to modify the tracking code to add in ga('required', 'linkid');? Does GTM take care of having to add in that code?

 

If you've implemented GA via GTM, you only need to click Advanced Configuration and select true from the enable enhanced link attribution dropdown in GTM. Here you can learn more about that: https://support.google.com/tagmanager/answer/6107124?hl=en

 

2. I currently have a page with 2 links going to the same page and one of the links does have a unique id. When I go to the in page chrome extension I see a range for that link with the id like 52-1000 clicks. If it has an id shouldn't it show the exact amount?

 

If Analytics is still unable to find a unique ID, then you see a range. Take a look at those results after giving the links you want to track a unique ID. If after a few days of making the code changes you don't see a difference (you’re not seeing the reports with the results you expect) GA is likely having trouble pinpointing your elements and is showing ranges of clicks.

 

3. Lastly this page is using angular and the id is probably dynamically placed, does that not matter or do I need to do anything to accommodate angular?

Each of the links on your page should have a unique element ID. If your link does not have a unique ID, GA looks up to three levels higher in the DOM structure for a unique ID (i.e. the element’s parent’s parent). If Analytics is still unable to find a unique ID, then you see a range.

 

If you're using AngularJS, I recommend reading those 2 articles as well:

1) Track URL Fragments As Pageviews

2) Integrating AngularJS and Google Tag Manager

Let me know if it helps @EPC Product .

 

Cheers,

Taavi

View solution in original post

Marked as Best Answer.
Solution
Accepted by topic author EPC Product
March 2017

Re: Enhanced link attribution implementation

[ Edited ]
Participant ✭ ✭ ✭
# 2
Participant ✭ ✭ ✭

Hi,

1. I set link attribute in google analytics and google tag manager to true, is that all or do I still need to modify the tracking code to add in ga('required', 'linkid');? Does GTM take care of having to add in that code?

 

If you've implemented GA via GTM, you only need to click Advanced Configuration and select true from the enable enhanced link attribution dropdown in GTM. Here you can learn more about that: https://support.google.com/tagmanager/answer/6107124?hl=en

 

2. I currently have a page with 2 links going to the same page and one of the links does have a unique id. When I go to the in page chrome extension I see a range for that link with the id like 52-1000 clicks. If it has an id shouldn't it show the exact amount?

 

If Analytics is still unable to find a unique ID, then you see a range. Take a look at those results after giving the links you want to track a unique ID. If after a few days of making the code changes you don't see a difference (you’re not seeing the reports with the results you expect) GA is likely having trouble pinpointing your elements and is showing ranges of clicks.

 

3. Lastly this page is using angular and the id is probably dynamically placed, does that not matter or do I need to do anything to accommodate angular?

Each of the links on your page should have a unique element ID. If your link does not have a unique ID, GA looks up to three levels higher in the DOM structure for a unique ID (i.e. the element’s parent’s parent). If Analytics is still unable to find a unique ID, then you see a range.

 

If you're using AngularJS, I recommend reading those 2 articles as well:

1) Track URL Fragments As Pageviews

2) Integrating AngularJS and Google Tag Manager

Let me know if it helps @EPC Product .

 

Cheers,

Taavi

Enhanced link attribution implementation

[ Edited ]
Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Thank you Taavi, that was super helpful!