Welcome to WebmasterWorld Guest from 54.205.74.11

Forum Moderators: DixonJones & mademetop

Tracking outbound links as part of a Google Analytics Campaign

   
9:49 am on Aug 17, 2011 (gmt 0)

5+ Year Member



Hi everyone,

How can one track outbound links as part of a Google Analytics campaign? I see it is possible for Goals.

I have added the code below to the Google Analytics script:

pageTracker._trackPageview('/Campaign Name/http://www.example.com/?src=icecream');


Can one use spaces in the above listed
Campaign Name
?

I have added
?src=icecream
to have some form of control over the "inflated" page view stats, but not sure whether this is necessary.

How can one catch the following params:

utm_source
utm_medium
utm_term
utm_campaign

Thanks in advance.
10:24 am on Aug 17, 2011 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Check:
[docs.google.com...]

Some people say it is bug but check this:
utm_campaign=Bing%2B-%20Campaign%20One.

It looks like the very first space is converted to %2B, all other spaces on the same field are converted to %20.
11:44 am on Aug 17, 2011 (gmt 0)

5+ Year Member



Thank you, toplisek. I have used "%2B". I cannot currently access the Google Spreadsheet, but will check later. Thanks for the link.

Where will these stats be listed in Google Analytics and can it be added to a Campaign?
12:04 pm on Aug 17, 2011 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



As I understand all Google statistics is compliant. These means you can set Goal and this will be seen inside ALL tools. Set Goal and track (try).

Steps at the top tracked page (not landing):
1. Redirection

<?php

header("Location:http://www.mytrackedsite.html ");
die;

?>

2. Landing page and htaccess redirection
RewriteRule ^ads/([0-9]+)\.html$ ads/$mytrackedpage.php?utm_source=PCworld&utm_medium=cpm&utm_campaign=bing [L]
11:38 pm on Aug 17, 2011 (gmt 0)



So by "outbound links" do you mean incoming referrals from other sites to yours, or visitors exiting your site via links you have created?

If it's the first one, and you have control over the inbound link's URL structure you can use Google's URL builder to pass whatever params you want. Saying that, depending on how many links you are trying to track, this solution may not scale well, in which case I'd put together a script on your end to pick up the use of a generic param say yoursite.com/?referral and store the referrer data as a custom variable for later segmentation.

If it's the latter, I'd include an onclick event on outbound links to generate an Event.
11:04 am on Aug 23, 2011 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



ads?6115&utm_source=MYDOMAIN+Newsletter+Content&utm_medium=newsletter&utm_content=MYDOMAIN+Newsletter+(19702)+XVFGP98mmk&utm_campaign=Premium+Content+Yearly+Subscription
Check this sample.
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month