AdWords
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
star_border
Reply

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.

 

<script>
			(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
			(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
			m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
			})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

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

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

 

Cheers!

 

1 Expert replyverified_user
Marked as Best Answer.
Solution
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!

Pete
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.

 

http://screencast.com/t/TPTfLoJ6

 

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