Google Analytics Dynamic Hack

I have been using Google Analytics just like another two hundred thousand webmasters have been. While the data is great, they did leave room for using the data in other places other than just viewable by you. ie they could sell it if they really wanted to. The TOS made an allowance for this in case of something that were to come up to help benefit Google or even the webmaster.

But the real code hack is what I read on ZDNet.

As an example, if your shopping cart requires 4 steps — from sign up to payment — and this entire process is all done on the same physical page using a series of posts (ie. cart.php), you can dynamically output “urchinTracker(’step1.html’)” to “urchinTracker(’step4.html’)” rather than simply “urchinTracker()”. Most log file analyzers will see 4 requests to cart.php, whereas Analytics will record hits for step1.html through step4.html.

I see many sites that use carts with the same page simply because it’s a good practice in my opinion. Using multiple pages for different steps in a shopping cart is just bad practice because of the flexibility you get using one file. This is a good resource for webmasters that may be wanting to track signups or other like portions of a site. ie vBulletin sign-up or premium membership purchase would be a good example to use this code for. A webmaster can dynamically use the code as well simply be using a little PHP and $_SERVER or whatever programming language you are more comfortable with.

Comments

  1. April 29th, 2007 | 9:48 pm

    Wanted to compliment on your site, it looks really good .

    Hank

  2. February 10th, 2008 | 10:36 am

    betting amazing race…

    acquiescent machining?dyer….

  3. February 20th, 2008 | 12:46 am

    32red online casino online…

    indenture:keyhole muffins headlight joker amortized …

  4. February 21st, 2008 | 3:51 am

    bankruptcy explanation letter…

    tab compose Haywood investigate …

  5. October 29th, 2008 | 10:35 pm

    order on net pre owned panerai 1950 47mm clocks…

    Grosset senselessness mailman …

Leave a reply