2.9K members online now
2.9K members online now
Dive into advanced features like Remarketing, Flexible Bid Strategies, AdWords Editor, and AdWords Scripts
Guide Me

Enhanced Link Attribution Levels

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello all,


I've been trying to setup Enhanced Link Attribution properly with little success. I've written custom code to add Unique ID's to the elements but I need to change the max levels the plugin looks up the DOM to 15. Here's the plugin details.


This is what I have now.


			(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

			ga('create', 'UA-18458581-1', { 'cookieDomain': '' } );
			ga('require', 'linkid', ‘levels’: 15', 'linkid.js');
			ga('send', 'pageview');

Any and all help is appreciated. I'm using All In One SEO - WordPress Plugin which might explain the 'linkid.js'.




1 Expert replyverified_user
Marked as Best Answer.
Accepted by topic author Rafi P
December 2015

Re: Enhanced Link Attribution Levels

Top Contributor
# 2
Top Contributor
Hi Rafi P,

I'm guessing your script is throwing an error or not running. There's a syntax error in the line that's in red. You are using open and close single quotes around the string levels. Javascript won't recognize that. You also have an extra apostrophe after 15 And, 'linkid.js' appears to be unnecessary in the statement.

It should be something like this:

ga('require', 'linkid', {'levels': 15});

Best of Luck!

petebardo -- Deadhead doing AdWords

Re: Enhanced Link Attribution Levels

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi Pete,


I had removed the 'linkid.js' but wasn't sure how it was supposed to look. Thanks!

Unfortunately, links on my website are still showing the same percentages. I manually added unique ids to two of the elements, which show the same number of clicks as the /features/ page.


You'd think it would be easier to add link attribution...