Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Google Analytics to track outbound links

Options
  • 06-07-2010 12:42am
    #1
    Registered Users Posts: 368 ✭✭


    Hi,

    Just wondering if there's any Google experts out there can help with a serious problem I'm having. I've a price comparison site set up and working 100% where links to products are shown along with short descriptions - clicking on the links then opens external sites in a new window.

    None of which is showing up in Google Analytics. If I take out the bit that launches the new window
    <a href="http://www.externalsite.com/" target="_new"....
    

    then it works fine. I've tried various differing methods as detailed by Google in their ever changing documentation but am getting nowhere.

    Any suggestions appreciated - particularly from those who may have come across this before.

    Many thanks

    ZB


Comments

  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    Are you saying that if you take out target="_new" then the links show up in GA? Sometimes _new is confused with _blank (which has been deprecated IIRC).

    Either way, I think it is better practice to have neither and let the user decide where they want the content in a new window or in the existing window. Hopefully, this is sort out your problem too.


  • Registered Users Posts: 368 ✭✭zaphodbeeb


    Evil Phil wrote: »
    Are you saying that if you take out target="_new" then the links show up in GA? Sometimes _new is confused with _blank (which has been deprecated IIRC).

    I've tried both _blank and _new.
    Either way, I think it is better practice to have neither and let the user decide where they want the content in a new window or in the existing window. Hopefully, this is sort out your problem too.

    You may be right - but that decision isn't up to me. The idea is that you can see a list of (say for example cars) then click on each one and view in another window [the referring site] - close that window and still see the list that sent you there in the first place ...


  • Registered Users Posts: 4,780 ✭✭✭JohnK


    As far as I'm aware if you're tracking a click to a new window you need to track the click using javascript in the onclick event of the link, similar to this article http://www.google.com/support/googleanalytics/bin/answer.py?answer=55527


  • Registered Users Posts: 368 ✭✭zaphodbeeb


    JohnK wrote: »
    As far as I'm aware if you're tracking a click to a new window you need to track the click using javascript in the onclick event of the link, similar to this article http://www.google.com/support/googleanalytics/bin/answer.py?answer=55527

    Thanks for that. As I said though, I've tried many methods including the above and they work SO LONG AS the link to the external site opens in the same window.

    This as I mentioned, is not what I need. I need the link to open in a new window.

    Does anyone know of a method by which you can actually *gasp* TALK to a Google person who can help? Do these people actually exist ahahaha :-)


  • Registered Users Posts: 4,780 ✭✭✭JohnK


    Can you post the html of your page so? This is the code that I've just pulled off one of my sites and this tracks perfectly

    <a href="http://www.google.com&quot; onclick="pageTracker._trackPageview('/URL/YOU/WANT/TO/TRACK/');" target="_blank">blah</a>


  • Advertisement
  • Registered Users Posts: 368 ✭✭zaphodbeeb


    Many thanks. As regards posting the URL of the site, I'll check. :-) Not up to me.

    I notice that the URL you have as an example is on the same site - I presume it could be an external link....

    Thanks again - will try that and update this tomorrow.


  • Registered Users Posts: 4,780 ✭✭✭JohnK


    So far as GA is concerned anything you're tracking will be a page of your site so in the above example GA would think the URL is http://www.mysite.com/URL/YOU/WANT/TO/TRACK/
    Might be easier to spot the outbound links by tracking them as something like /OUTBOUND/www.example.com and /OUTBOUND/www.google.com etc. so you can easily find them for reports


  • Registered Users Posts: 368 ✭✭zaphodbeeb


    Something like...


    <a href="http://www.externalsite.com&quot; onclick="pageTracker._trackPageview('/OUTBOUND/External_Site/');" target="_blank">blah</a>


    Thanks for the help!


  • Registered Users Posts: 4,780 ✭✭✭JohnK


    Yeah that should do it.


Advertisement