Gaudicia, >I just started looking into JQuery and I have a few questions. Mostly >about how to make tagging my links with google analytics tracking >faster. > >I want to be able to track my outgoing links, which I've read is >possible, but I really haven't see anything about tracking third party >booking engines. > >So basically what I want is this. > >If I have links linking to my domain or an eCommerce or booking >engine, I don't want those links to be tagged as outgoing. However, >if the link is to a booking engine/eCommerce I want them to be tagged >like this: > ><a href=" https://www.securecart.com/?store=parameters" >onclick="pageTracker._link(this.href); return false;">Purchase Now</a> >or like this <a >href="javascript:openWindow(pageTracker._getLinkerUrl('http:// >bookingengine.com'))">Booking Engine</a>
What you're looking to do is very easy: $("a").click(function (){ pageTracker._link(this.href); return false; }); <a href="https://www.securecart.com/?store=parameters">Purchase Now</a> Or if you only wanted to track specific links: $("a.track").click(function (){ pageTracker._link(this.href); return false; }); <a href="https://www.securecart.com/?store=parameters" class="track">Purchase Now</a> Also, I'm not sure how Google Analytics link tracking works, but just remember that if JS is disabled, no tracking will occur. -Dan