View Full Version : Tracking advertising campaigns

04-19-2007, 01:48 PM
I'd like to set up some kind of tracking system to track how much traffic we're getting from various ad campaigns going to different pages on various sites. Google Analytics has a perfect system to do this for us, but it leaves its tracking parameters (?utm_campaign=34343&utm_medium=2523532&...) at the end of the URL after users are delivered to our site. I really don't want these parameters left visible since they may confuse users when they try to post links to our pages elsewhere.

I'd love a way to still use Analytics to track this without the user seeing the messy query parameters in their location bar, but after looking at it for a while I don't think that's possible.

What's the best way to set up my own tracking system to do this without upsetting the search engines with funky redirects? I'm thinking of linking all ads to mysite.com/in.php?campaignID=...., Then having in.php log the incoming visitor and redirect to the appropriate landing page. Could this cause any problems with the search engines? The actual landing pages are quality content pages with great SERP placement, so I don't want to do anything that might look shady and jeopardize their rankings.

04-19-2007, 03:28 PM
You could send them to the page with an attached query string.

For example, let's say you're sending traffic to page.php. You could attach ?x (where x is a number) to the end of the URL. I doubt that would confuse the visitor, considering it would simply be page.php?x.

Then it's coming from Google.

As far as its effect on SEO, to be honest, I don't know. My SEO knowledge is, admittedly, not up to scratch. Then again, I'm not a great programmer either; there may be a better option.

04-20-2007, 07:26 AM
Thanks, Max. I'd prefer to have no query string at all shown to the visitor, but if I'm stuck with one your idea is a lot better than having something longer and more confusing.

04-20-2007, 09:37 AM
Ok, here's my current plan. Could some of you experts please check this out and tell me if it might raise any red flags with the search engines? I'm not trying to do anything shady here, but I always get a little nervous when working with redirects...

I'm going to create a page called in.php, and have all advertisements link to it, using a query parameter to denote what ad it's coming from. For example, www.mysite.com/in.php?id=widgets .

I'll then have the in.php script look at the id variable, record the info, and do a 301 redirect header to the proper "widget" landing page. There will be many possible "id" values coming in, corresponding to many different landing pages.

My hope is that the pagerank for the ad links will continue to pass correctly to each of the landing pages, just as if each ad had linked directly to the landing page:

mysite.com/in.php?id=widgets => mysite.com/widgets.html
mysite.com/in.php?id=yoyos => mysite.com/yoyos.html

Any thoughts? Will this pass pagerank as I'm hoping? Will this set off any possible penalties?

04-21-2007, 05:19 PM
Is it possible to simply track using referrers instead of query strings? While not all requests always pass the proper referrer, for purposes of tracking ad campaign performance it should be close enough, and would eliminate any need for query strings.
Pov thai (http://www.****tube.com/categories/896/thai/videos/1)

05-11-2007, 03:47 PM
I am currently working with an affiliate company, LinkConnector, and they offer naked linking but are still able to track affiliate sales. I'll look into their coding a little more and see if I could offer some insight as to how they are getting this to work.

I have also used the analytics codes to track campaigns and it works great for tracking but like you said the URL's do get a little funky.

05-11-2007, 04:41 PM
I am currently working with an affiliate company, LinkConnector, and they offer naked linking but are still able to track affiliate sales. I'll look into their coding a little more and see if I could offer some insight as to how they are getting this to work.

Hey Paul. :)

I appreciate it. I'm guessing that they probably just track who the http referrer is, but if it's something more slick than that I'd love to check it out.

05-11-2007, 05:46 PM
Send the links to "track.php" with the Analytics string.

header("Location: http://www.example.com/");

track.php could do more than just that but for the purpose of having Analytics track it that would work, no?

05-11-2007, 06:20 PM
Andy, do you mean that the Analytics code would go inside track.php so that the visit would be tracked before the user is redirected to the true landing page? If so, this wouldn't work because the header would redirect the browser before the javascript-based Analytics code ever ran.

If I'm misunderstanding what you meant please correct me because I really want this to work!

05-11-2007, 06:59 PM
I don't use Analytics so I can't give specific code but couldn't track.php call the JS file passing the tracking code (using your eg. ?utm_campaign=34343&utm_medium=2523532&...) by using fopen() or something similar?

http://au.php.net/manual/en/wrappers.http.php, cURL

05-15-2007, 06:15 PM
Redirecting through a PHP script would still have the problem of not having search engine friendly links.

In order to preserve the search engine friendly links you already have, using HTTP_REFERER is probably the best way, although not 100% accurate. An alternative would be if you are serving images or something to the remote sites with the links, you could set a cookie along with the impression, and then check it when someone arrives at your site.
Scion T2B (http://www.toyota-wiki.com/wiki/Scion_t2B)

05-16-2007, 09:01 AM
if you have no problems with redirects from PPC than you can easily utilize analytics power.
You can catch incoming refid and make 301 redirect from "&&" page to page with clean url. Than deploy js variables with catched refid, so urchin will log em.

PM or mail me, if you have any Q's