ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

tracking affiliate style link

August 14, 2008 4:55pm

Subscribe [2]
  • #1 / Aug 14, 2008 4:55pm

    Joe Wolin

    206 posts

    Hello,

    I need some general direction here…

    I have a desktop application with a url to my EE site and want to track how many users come to the site through the desktop application (as opposed to other sources of traffic).

    I’m assuming the best way to do this is style the url into an affiliate looking url?

    Something like

    http://www.site.com/level1/index.php&affiliate=desktop

    If this is the case, how do you use server side processing to log the impression?  Does this interfere with 404 pages?

    Is there any way to use google analytics to track the custom hits from only this url?

    thanks…

  • #2 / Aug 15, 2008 10:57am

    James Smith

    259 posts

    yep, i would do it just like that (though it should be a question mark not an ampersand… http://www.site.com/level1/index.php?affiliate=desktop).

    Google Analytics will automatically treat that as a separate page to http://www.site.com/level1/index.php, so you could leave it at that. A better way though… you can use the “utm_source” variable name instead of your “affiliate” variable - This will automatically segment the source properly so that it appears on your dashboard pie charts with the other default sources. (I do this with RSS clickthroughs to see how many people are arriving via RSS.)

    As for server-side processing - not entirely sure what you mean here, but if you mean that you want to personalise the page based on the value of the variable you’re probably better off using a url segment so that you can do the processing from within your EE templates. I could be off the mark there though, I’ve never used url parameters in EE before - only faked it with url segments.

    James

  • #3 / Aug 15, 2008 11:34am

    Joe Wolin

    206 posts

    Ok that sounds like a great solution.

    One question…

    If someone clicks on the affiliate link and then bookmarks the link, will this call the tracking code every time the bookmark link is used?

    Is there a way to have the url remain clean for bookmarking?

    thanks..

  • #4 / Aug 15, 2008 1:03pm

    James Smith

    259 posts

    Hm, yes - that would be a slight problem - your data would not be 100% accurate.

    A simple solution might be to use a unique tracked page (including the utm_source variable) with a meta refresh to redirect to the clean url. Or you might be able to do something cunning with tiny 1px iframes.

    Otherwise you’re getting into .htaccess url rewriting which I find nauseating at the best of times.

    James

  • #5 / Aug 17, 2008 10:40pm

    Joe Wolin

    206 posts

    Thanks James,

    If I opt for the .htaccess url rewriting method, will the tracking code get picked up before it’s rewritten?

  • #6 / Aug 18, 2008 12:51pm

    James Smith

    259 posts

    Hm, I don’t know I’m afraid - I tend to stay away from htaccess as much as possible! Anyone else??

    I would just go with the meta refresh solution.

  • #7 / Aug 18, 2008 12:56pm

    Joe Wolin

    206 posts

    The meta refresh sounds like the ideal solution.  However, I’m concerned that since I have ads on my target page, that Google will frown upon seeing any significant amount of traffic coming from a redirect.  Am I’m being overly cautious here, do you think Google will care?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases