Intechnic
Users Developers
Home / Forums / In-Portal CMS / New Features & Improvement Suggestions / In-Commerce: Google Analytics / Topic Posts

In-Portal Forum

This is a place for users of In-Portal to ask questions, discuss various topics, and interact with other members of the In-Portal Community. Please report bugs through the Bugs Team (not the Forum). If you are interested in contributing or joining one of the many Teams for In-Portal, please check out the Contribute section of the website.
 

In-Portal Forum

In-Commerce: Google Analytics (7)


Posted: 06/23/2006 4:56:35 PM

Reply Quoted  


I know it is easy to add by customizing the template, but default integration would be helpful. If not for anything else, at least for marketing.

Posted: 06/29/2006 10:43:36 AM

Reply Quoted  




[Edited By hristov on 07/03/06 9:29:37 AM]

Posted: 06/29/2006 10:51:24 AM

Reply Quoted  


I tried to develop the template, however, I run into problems. Would one of the developers help me out with a template for this.

Posted: 07/03/2006 11:23:13 AM

Reply Quoted  


hristov wrote:06/29/2006 10:43:36 AM


[Edited By hristov on 07/03/06 9:29:37 AM]


Did I post -- 16058 -- above got modded or something. I know for sure it was not empty

[Edited By hristov on 07/03/06 11:24:13 AM]

Posted: 07/03/2006 11:39:13 AM

Reply Quoted  


Due to my empty post above, I am posting the information once again. I am hoping somebody from the community as well as developers can help me with implementing a template for Google Analytics. I can implement the simple tracking -- that is simple copy and paste. I have problems with the code for the receipt.

Here is text from Google Analytics Help Center. This text is also available on Google Analytics Help Center website::


How do I track e-commerce transactions?

Google Analytics supports a client-side data collection technique for capturing e-commerce transactions. With some simple additions to your receipt page, Google Analytics can automatically detect and record transaction and product information. The required information is placed in a hidden form, which is parsed for transaction and product information. Most template-driven e-commerce systems can be modified to include this information hidden in the receipt.

Enabling E-Commerce Tracking

The first step of tracking e-commerce transactions is to enable e-commerce reporting for your website's profile. To enable e-commerce reporting, please follow these steps:

   1. Log in to your account.
   2. Click Edit next to the profile you'd like to enable.
   3. On the Profile Settings page, click edit next to Main Website Profile Information.
   4. Change the E-Commerce Website radio button from No to Yes. 

Receipt Page Format

The second step is to ensure that the tracking code is included in the receipt page in the standard fashion. This may be done using a server side include, or other template driver, or can simply be hand-coded into your HTML code:

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script>
  _uacct="UA-xxxx-x";
  urchinTracker();
</script>

Next, somewhere in the receipt below the tracking code, the following lines need to be written by your engine. Everything in brackets should be replaced by actual values, as described in the Parameter Reference, below.

<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>

NOTE: Do not include the square brackets when setting the values for the form. In addition, do not use commas to separate the thousands place in your total, tax, and shipping fields - any digits after the comma will be dropped.

Example

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

Within the hidden form, there are two types of lines: the transaction line and the item lines. For each transaction, there should be only one transaction line, which is indicated by the "T" immediately after the "UTM:". This line specifies the total for the transaction, including any taxes or shipping costs, and other information. For each item in the receipt, create an item line, which is specified by the "I". The Item lines can contain product names, codes, unit prices and quantities. There is no limit to the number of item lines per transaction.

Parameter Reference

Transaction line variables
[order-id]     Your internal unique order id number
[affiliation]     Optional partner or store affilation
[total]     Total dollar amount of the transaction
[tax]     Tax amount of the transaction
[shipping]     The shipping amount of the transaction
[city]     City to correlate the transaction with
[state/region]     State or province
[country]     Country
 
Item line variables
[order-id]     Your internal unique order id number (should be same as transaction line)
[sku/code]     Product SKU code
[product name]     Product name or description
[category]     Category of the product or variation
[price]     Unit-price of the product
[quantity]     Quantity ordered



Posted: 07/03/2006 1:50:26 PM

Reply Quoted  


Georgi,

I have forwarded your request to our developers and let you know as soon as have the answer for you.
Thank you.

Posted: 02/27/2008 4:24:37 PM

Reply Quoted  


Hi Georgy,

I just wanted to let you know that we are adding this in our April-2008 release.

Thanks for taking time and pointing this out.