views:

1214

answers:

2

Has anyone else had any problems using google's Domain Tracking API, I am specifically talking about the _link() method.

The documentation is here

The example provided shows that the _link() method should be used in the onclick event like this:

<a href="http://www.newsite.com" onclick="pageTracker._link('http://www.newsite.com');return false;">Go to our sister site</a>

However, this essentially just makes the link...do nothing (most probably because of the 'return false').

My understanding is that the pageTracker._link() method is 'supposed' to add additional parameters to the url and do it's own document.location style redirect.

Any ideas / catches / previous posts??

+1  A: 

Sorry for the obvious question, but did you enable linking on the target page:

You must also enable linking on the target site (pageTracker._setAllowLinker(true);) in order for link to work properly.

Damir Zekić
+2  A: 

Apparently a miss-interpretation of the documentation:

You must also enable linking on the target site

So lets clarify also

  • pageTracker._setAllowLinker(true); is set on the ORIGINATING page
  • pageTracker._setAllowLinker(true); is set on the TARGET page

I only had it enabled on the target page, as the docs indicate.

Brendan Kowitz