WebMetro
866.922.4632
info@WebMetro.com
Get a Quote
866.922.4632

  Digital Marketing Factor

Time to Start Upgrading to the NEW Google Analytics Tracking Code

Over the past few months, our clients have been asking if they should transition to the New Google Analytics (GA) tracking code.   Our answer was to wait until Google Analytics starts to set the default tracking code to download to be the NEW GA code.  As you will see when you log in to download any GA tracking scripts, Google is now doing that. This is great news as Google now appears to be comfortable with the new scripts and most of the major issues with the new scripts have been worked out.

The following is a visual of where you would download the NEW Tracking Code:

If you do not upgrade to the new GA tracking code you will not have access to new features which the new code provides.  In addition, the Legacy tracking code will not receive anymore feature updates.

Here are some great new features that the new GA code provides:

Event Tracking:

More convenient set up for tracking ecommerce transactions:

The are three basic methods to use when setting up ecommerce tracking on your receipt page. You can view detailed information for all three.

  • _addTrans(orderId, affiliation, total, tax, shipping, city, state, country)
  • _addItem(Item, sku, name, category, price, quantity)
  • _trackTrans()

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol ) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-xxxxx-x");
pageTracker._addTrans(
"1234", // order ID - required
"Womens Apparel", // affiliation or store name
"11.99", // total - required
"1.29", // tax
"15.00", // shipping
"San Jose", // city
"California", // state or province
"USA" // country
);

// add item might be called for every item in the shopping cart
// where your ecommerce engine loops through each item in the cart and
// prints out _addItem for each
pageTracker._addItem(
"1234", // order ID - required
"DD44", // SKU/code
"T-Shirt", // product name
"Olive Medium", // category or variation
"11.99", // unit price - required
"1" // quantity - required
);

pageTracker._trackTrans(); //submits order info in hidden form after page load

</script>

NOTE: if you are transitioning to the new code you must change your e-commerce scripts to use the above code.  If you’re using the Legacy Code, your “urchin.js” e-commerce tracking code would like this within a hidden form field:

Example
<form style="display:none;" name="utmform">
<textarea id="utmtrans">
UTM:T|34535|Main Store|111108.06|8467.06|10.00|San Diego|CA|USA
UTM:I|34535|XF-1024|Urchin T-Shirt|Shirts|11399.00|9
UTM:I|34535|CU-3424|Urchin Drink Holder|Accessories|20.00|2
</textarea>
</form>
<script type="text/javascript">
__utmSetTrans();
</script>

Other features and benefits of using the new GA code:

  • Faster, smaller source file
  • Automatic detection of HTTPS
  • Increased namespace safety
  • Enjoying new features and reports as they roll out

If you haven’t transitioned to the New Google Analytics code, it’s a great time to start.  Need help with transitioning to the new code, contact us!

 

Currently rated 4.0 by 3 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Related posts

Add comment


 

  Country flag





Live preview

January 8. 2009 09:28

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway. © Copyright 2009

Internet Marketing | Pay per Click Advertising | Search Engine Optimization | Shopping Portal Marketing | Yahoo Paid Inclusion
eCommerce Development | Website Design & Development | Internet Consulting | Web Analytics | Content Management | Affiliate Marketing
© WebMetro. All Rights Reserved

Global Internet resources