Domain Manage

Tracking outbound clicks in Google Analytics

Discussion in 'Services Wanted' started by topcat, Nov 20, 2014.

Thread Status:
Not open for further replies.
  1. topcat United Kingdom

    topcat (1) Active Member New Trader

    Joined:
    Feb 2009
    Posts:
    216
    Likes Received:
    4
    'tis the season so I've gone ahead and redesigned DeliverMeThis.co.uk.

    However, since the redesign, I've been struggling to track outbound clicks as goals.

    For example. on a product page:
    https://delivermethis.co.uk/product/1317/santa-toilet-seat-cover-rug/

    The outbound link is:
    https://delivermethis.co.uk/get/uk/santa-toilet-cover

    So I am trying to track all /get/uk/* links as goals in Google Analytics.

    I've tried a number of Wordpress plugins, but none of them seem to be adding code to the links.

    What am I missing here, any ideas? I've tried Yoast and the Google Analytics plugin.

    Thanks :)
     
  2. Domain Forum

    Acorn Domains Elite Member

    Joined:
    1999
    Messages:
    Many
    Likes Received:
    Lots
     
  3. baldidiot United Kingdom

    baldidiot (8) Active Member Known Trader

    Joined:
    Sep 2012
    Posts:
    197
    Likes Received:
    6
    You can do it using event tracking - stick this in your link code:

    onClick="_gaq.push(['_trackEvent', 'Category', 'Action']);"

    eg:

    onClick="_gaq.push(['_trackEvent', 'ProductID2789', 'Click']);"

    The 'Category' and 'Action' parameters are required for it to work, but you can also add extra info for 'Label', 'Value' etc..

    Full guide here: https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide
     
    • Like Like x 1
  4. martin-s United Kingdom

    martin-s (19) Well-Known Member Trusted Trader

    Joined:
    Jul 2012
    Posts:
    2,451
    Likes Received:
    83
    Note that if you don't open the link in a new window, the Analytics tracking can be unpredictable.

    Better to use server side tracking if you can.
     
  5. topcat United Kingdom

    topcat (1) Active Member New Trader

    Joined:
    Feb 2009
    Posts:
    216
    Likes Received:
    4
    Thanks for this.

    It's frustrating as the plugins I am using SHOULD work, but there seems to be some kind of problem with them.
     
Thread Status:
Not open for further replies.

Share This Page