Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Inserting code for Google Analytics tracking across domains
Bewildered
Member

Posts: 10
Registered: 3/23/2007
Member Is Offline
posted on 9/22/2008 at 08:49 PM Reply With Quote
Inserting code for Google Analytics tracking across domains


I'm using Tigra Menu Gold on a multi-domain site, and I want Google Analytics to track users across the domains. This is described on...

http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=55503

Item 2 on this page says...

2. Next, you'll need to add the _link function to any links between the domains. Please note that your analytics tracking code and calls to _gat._getTracker (shown in Step 1) must be placed on the page above the call to _link. If your current links look like:

<a href="https://www.secondsite.com/?login=parameters"> Login Now</a>

change them to:

<a href="https://www.secondsite.com/?login=parameters" onclick="pageTracker._link(this.href); return false;">Login Now</a>

Basically, they are saying that in addition to the href attribute, the A tag should contain this attribute...

onclick="pageTracker._link(this.href); return false;"

Of course, The Tigra menu doesn't use A tags or href attributes. The code in Items.js for a typical button in my Tigra menu is like this...

[['<img src=http://mysite.com/menu_files/bgmnav-about-off.jpg>', '<img src=http://mysite.com/menu_files/bgmnav-about-on.jpg>','<img src=http://mysite.com/menu_files/bgmnav-about-on.jpg>'], 'http://mysite.com/about-sitesubject.cfm', {'sw':75},
['About Us', 'http://mysite.com/about-sitesubject.cfm'],
['Our Mission', 'http://mysite.com/sitesubject-mission.cfm'],
['Our Approach', 'http://mysite.com/sitesubject-approach.cfm'],
['Industries & Clients', 'http://mysite.com/sitesubject-industry-client-experience.cfm'],
],

So my question is, how would I add...

onclick="pageTracker._link(this.href); return false;"

...to the links in this code as instructed by Google?

(I notice that the Tigra files -- menu.dom.js, menu.js, menu.opr.js, and menu.lay.js -- all contain "onclick". So I'm guessing that I need to tuck the Google onclick in with the onclick that's already in these files. Exactly how do I do that?)

Thank you.
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 9/22/2008 at 10:17 PM Reply With Quote

Tigra Menu Gold does use <a href="..."> (you can find that code in menu.dom.js, menu.lay.js and menu.opr.js) but onclick is already taken.

try replacing
onclick="return menus[\'',this.TM1O.id,'\'].exec(\'',this.id,'\',0)"
with
onclick="pageTracker._link(this.href); return false;"
in all three files
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page Product Page
Functionality demos Functionality demos
Multiple
Cross-framed
Select-boxes
Effects
Design demos Design demos
Icons & arrows
Idea!
Hi there!
Matrix
MS Style
XP Style
Dots
3D-Buttons
Product Documentation Documentation
Documenation Page
Change Log
Menus Comparison Table
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004