Print Page | Close Window

Google Analytics

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=310
Printed Date: 30-April-2024 at 5:06pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Google Analytics
Posted By: Teena
Subject: Google Analytics
Date Posted: 12-July-2006 at 4:22pm

Has anyone integrated Google Analytics with Product Cart?

Any help would be great.

 

 

 




Replies:
Posted By: netprofits
Date Posted: 12-July-2006 at 5:06pm

We have not used Google Analytics with Product Cart but you should be able to add your tracking code to the footer.asp page to allow you to track all Product Cart pages. Google actual mentions in their explanation of setting up the tracking code that it can be added to a common include file or template. So the footer.asp is probably the best place for it. If you have static pages on your web site that don't use the Product Cart footer, you would need to paste your tracking code into those pages separately.



-------------
NetProfits Internet Consulting

Certified ProductCart Developer

http://www.nicwebdesign.com" rel="nofollow - Our Site


Posted By: netprofits
Date Posted: 12-July-2006 at 5:08pm
Most web hosting services will include stats with your web site account. You may want to check if you have that before taking the time to setup Google Analytics.

-------------
NetProfits Internet Consulting

Certified ProductCart Developer

http://www.nicwebdesign.com" rel="nofollow - Our Site


Posted By: Teena
Date Posted: 12-July-2006 at 5:18pm

Actually I should have been more clear.  The Google tracking code in the header or footer is no problem.

What I really meant was has anyone set up Google Analytics Ecommerce Tracking with Product Cart?

It would require some code manipulation due to the there not being any <body> tags on the ordercomplete.asp page.

Google gives more and deeper information than my hosting company.

 



Posted By: netprofits
Date Posted: 12-July-2006 at 5:29pm

The body tag is in the header.asp page. You could copy header.asp to a new file like header2.asp and then modify the ordercomplete.asp to include header2.asp instead of header.asp and change the body tag in the header2.asp file to have the code you need. Just make sure you finish all you modifications to header.asp first or you will need to backwrite changes to header2.asp.

If you are familiar with ASP you could just write code in header.asp to detect the page name and then insert your Google code in the body tag when you detect the ordercomplete.asp page.



-------------
NetProfits Internet Consulting

Certified ProductCart Developer

http://www.nicwebdesign.com" rel="nofollow - Our Site


Posted By: Teena
Date Posted: 12-July-2006 at 6:36pm

Netprofits - if I'm folliwing you, all I have to do is create a second header, i.e., header2.asp that includes the body onLoad call and then put that include in the orderComplete.asp file.  Do I have that right?

Also,  wondering if you could help - the first Form is Google's directions; The second one are the variables I believe cooridnate in Product Cart - can you verify that I have the I have replaced Googles's [  ] with the correlating db item from Product Cart?    Thanks for your help.

<body onLoad="javascript:__utmSetTrans()">

<form style="display:none;" name="utmform">
<textarea id="utmtrans">UTM:T|[order-id]|[affiliation]|
[total]|[tax]| [shipping]|[city]|[state]|[country] UTM:I|[order-id]|[sku/code]|[productname]|[category]|[price]|
[quantity] </textarea>
</form>

<form style="display:none;" name="utmform">
<textarea id="utmtrans">UTM:T| idOrder |
total | taxAmount | shipmentDetails | city | stateCode | countryCode
UTM:I| idOrder | sku | description| unitPrice|
quantity]</textarea>
</form>

 

 



Posted By: netprofits
Date Posted: 13-July-2006 at 7:52am

We have not used the Google Ecommerce analytics but your entries look correct with the following exceptions:
1. You have an extra closing bracket after the quantity field.
2. Shipment details would need to be parsed to get just the shipping amount.
3. You can't just use those field names, you actually have to populate the hidden form with real values from the confirm page.
4. The UTM:I section should be repeated for each item in the order.



-------------
NetProfits Internet Consulting

Certified ProductCart Developer

http://www.nicwebdesign.com" rel="nofollow - Our Site


Posted By: thrion
Date Posted: 14-July-2006 at 9:22pm
Hi Teena,

We use GA and are working at the richer ecommerce tracking you are talking about, I'll let you know when we get it all worked out.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net