jason
26-10-2007, 18:44
Hi there!
I'm looking to track sales on my website with google analytics. We use google ppc campaigns and my intention is to start tracking ROI per keyword or phrase. I'm not too sure how its done, but I assume I have to put in a bit of code on the final shopping cart confirmation page that someone has been successful purchasing something on our site. Its obviously important the data is dynamic ie takes into account the value of the transaction.
My questions for you are as follows...
1) is it possible using bluepark?
2) do i have a "receipt page" google talks about?
3) have i found the right google explanation page (below) on how its done? (because its a bit scary!)
Any help would be appreciated.
Many thanks
Jason
How do I track e-commerce transactions?
(If you're looking for information on tracking visitor movement through your checkout pages, please read How do I use Google Analytics to track a 3rd-party shopping cart? (http://www.google.com/support/googleanalytics/bin/answer.py?answer=55532))
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:
Log in to your account.
Click Edit next to the profile you'd like to enable.
On the Profile Settings page, click edit next to Main Website Profile Information.
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 type="text/javascript">
_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.
<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>
Finally, the utmSetTrans function must be called after the form is submitted in order to record the transaction. This can be most easily accomplished through a body onLoad event within the opening <body> tag:
<body onLoad="javascript:__utmSetTrans()">
If you don't have the ability to edit the body tag, you can call the utmSetTrans function within a separate script tag as long as you ensure that the function is called after the form:
<script type="text/javascript">
__utmSetTrans();
</script> 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
I'm looking to track sales on my website with google analytics. We use google ppc campaigns and my intention is to start tracking ROI per keyword or phrase. I'm not too sure how its done, but I assume I have to put in a bit of code on the final shopping cart confirmation page that someone has been successful purchasing something on our site. Its obviously important the data is dynamic ie takes into account the value of the transaction.
My questions for you are as follows...
1) is it possible using bluepark?
2) do i have a "receipt page" google talks about?
3) have i found the right google explanation page (below) on how its done? (because its a bit scary!)
Any help would be appreciated.
Many thanks
Jason
How do I track e-commerce transactions?
(If you're looking for information on tracking visitor movement through your checkout pages, please read How do I use Google Analytics to track a 3rd-party shopping cart? (http://www.google.com/support/googleanalytics/bin/answer.py?answer=55532))
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:
Log in to your account.
Click Edit next to the profile you'd like to enable.
On the Profile Settings page, click edit next to Main Website Profile Information.
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 type="text/javascript">
_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.
<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>
Finally, the utmSetTrans function must be called after the form is submitted in order to record the transaction. This can be most easily accomplished through a body onLoad event within the opening <body> tag:
<body onLoad="javascript:__utmSetTrans()">
If you don't have the ability to edit the body tag, you can call the utmSetTrans function within a separate script tag as long as you ensure that the function is called after the form:
<script type="text/javascript">
__utmSetTrans();
</script> 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