Shopping Cart Forum

Go Back   eShop Forums - eCommerce Help Forum for Shopping Cart Owners. > Tech Corner > PHP/HTML/CSS/JavaScript and Servers
Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
PHP/HTML/CSS/JavaScript and Servers Pick up tips and exchange info on the technical side of having a web presence.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 30-09-2008, 06:55 AM
Lawrence Lawrence is offline
Forum Admin
 
Join Date: Aug 2007
Location: Kenley, Surrey, UK
Posts: 1,347
Thanks: 3
Thanked 87 Times in 87 Posts
Default Google Analytics eCommerce Tracking Module

I've just found this on 8 Awesome Google Analytics Hacks, Tips and Tricks. It's how to configure the Google Analytics ecommerce module. To turn it on, go to the account settings, and change the ecommerce Website button from "No" to "Yes", then on your receipt page, add the following code with the fields below being filled from the order confirmation page.

HTML Code:
<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._trackPageview();
pageTracker._addTrans(
"1234", // The ID for the whole transaction
"Mountain View", // The affiliate name, if there is one. If not, put as your name
"11.99", // Total transaction value
"1.29", // Tax
"5.99", // Shipping charges
"San Jose", // City
"California", // State
"USA" // Country
);
 
pageTracker._addItem(
"1234", // The ID for this single part of the order
"DD44", // Product SKU
"T-Shirt", // Product Name
"Green Medium", // Category
"11.99", // Price
"1" // Quantity
);
 
pageTracker._trackTrans();
// –></script>
To put this into practice, you would do something like this (on a PHP site).

PHP Code:
pageTracker._addItem(<?php echo "$order_id , $name , $total , $tax , $shipping , $city , $state , $country"?>);
 
etc
There're more great Google Analytics tips like this one on http://searchlightdigital.com/8-awes...ips-and-tricks

Thanks to Nass on UKBFs for originally posting the link here.
__________________
Lawrence
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 20-10-2009, 02:48 AM
hcm2009 hcm2009 is offline
Junior Member
 
Join Date: Oct 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Lawrence View Post
I've just found this on 8 Awesome Google Analytics Hacks, Tips and Tricks. It's how to configure the Google Analytics ecommerce module. To turn it on, go to the account settings, and change the ecommerce Website button from "No" to "Yes", then on your receipt page, add the following code with the fields below being filled from the order confirmation page.

HTML Code:
<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._trackPageview();
pageTracker._addTrans(
"1234", // The ID for the whole transaction
"Mountain View", // The affiliate name, if there is one. If not, put as your name
"11.99", // Total transaction value
"1.29", // Tax
"5.99", // Shipping charges
"San Jose", // City
"California", // State
"USA" // Country
);
 
pageTracker._addItem(
"1234", // The ID for this single part of the order
"DD44", // Product SKU
"T-Shirt", // Product Name
"Green Medium", // Category
"11.99", // Price
"1" // Quantity
);
 
pageTracker._trackTrans();
// –></script>
To put this into practice, you would do something like this (on a PHP site).

PHP Code:
pageTracker._addItem(<?php echo "$order_id , $name , $total , $tax , $shipping , $city , $state , $country"?>);
 
etc
There're more great Google Analytics tips like this one on http://searchlightdigital.com/8-awes...ips-and-tricks

Thanks to Nass on UKBFs for originally posting the link here.
Such a very amazing link!
________________
Watch Anime Online
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 22-10-2009, 10:53 PM
Topshopper Topshopper is offline
E-Commerce Provider
 
Join Date: Jun 2009
Location: UK
Posts: 84
Thanks: 2
Thanked 1 Time in 1 Post
Default

Thanks for the link
__________________
Mike

TopShopper Shopping Carts
http://www.topshopper.net
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
google analytics


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add Google Analytics to every page on your osCommerce store Lawrence Zen Cart & osCommerce 12 09-02-2009 02:29 AM
New module to zoom your images Magic Toolbox Magento 0 15-10-2008 08:56 PM
Google Analytics Problem.. Arkwright Zen Cart & osCommerce 10 14-01-2008 09:01 AM
Problem with Shipping Module BillH Zen Cart & osCommerce 2 24-10-2007 04:48 PM
google analytics Tinkerbell PHP/HTML/CSS/JavaScript and Servers 1 27-08-2007 04:03 PM

Google
Home - Top

Edible Graphics, Affordable E-Commerce, Web Shops & Custom Form Scripts
Gadgets online
tech news, product reviews, the latest home and business technology, the latest in digital imaging


Content Relevant URLs by vBSEO 3.0.0