Forum Moderators: open
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct="UA-111111";
urchinTracker();
</script>
<body onLoad="javascript:__utmSetTrans()">
<form style="display:none;" name="utmform">
<textarea id="utmtrans">
UTM:T¦order-id¦total¦tax¦shipping¦city¦state¦country
UTM:I¦order-id¦sku/code¦productname¦category¦price¦
quantity </textarea>¦order-id¦
[edited by: jatar_k at 8:49 pm (utc) on Aug. 24, 2006]
I'm dealing with the same thing. :-) Here is the way it's supposed to work:
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct="YOUR ACCOUNT";
__utmSetTrans();
urchinTracker('/Order_Successful');
</script>
<form style="display:none;" name="utmform">
<textarea id="utmtrans">
UTM:T¦123345¦32.85¦0.00¦6.96¦Anytown¦OR¦USA
UTM:I¦123345¦WIDG-G¦green widget¦widgets¦9.95¦1
UTM:I¦123345¦WIDG-B¦blue widget¦widgets¦10.95¦1
UTM:I¦123345¦WIDG=R¦red widget¦widgets¦11.95¦1
</textarea>
Note that the VERTICAL PIPE is suposed to be a regular pipe, it is this board software that does this -> ¦
Some things to note:
First, I do not like putting **anything** in body onLoad. Look how I've put it in the Javascript section right after the line identifying my account. This causes it to execute inline and should still work (I hope. :-) ) as long as it comes after the src= which loads their module.
Look how for each item ORDERED it builds a list. You don't need all your products, just what's being ordered. You must do this as the order is placed.
You may leave some values blank, but the more blanks you have, the more inaccurate your analytics will be.
Note in particular this line:
urchinTracker('/Order_Successful');
My current issue with G.A. is that they state the goal is the final step in your ordering process, such as a thank_you.html page. But if you use the post method for your checkout forms, your ordering script will always be the same page through all steps of the funnel and goal - order.cgi.
The above step is Google's instruction via email for a post method checkout system. At each step of the funnel, create a custom output and put it on the page output:
Funnel step one:
<script type="text/javascript">
_uacct="YOUR ACCOUNT";
urchinTracker('/Add_To_Cart');
</script>
Funel step two:
<script type="text/javascript">
_uacct="YOUR ACCOUNT";
urchinTracker('/Enter_Your_Information');
</script>
and your final GOAL, not part of the funnel:
<script type="text/javascript">
_uacct="YOUR ACCOUNT";
urchinTracker('/Order_Successful');
</script>
So in the above example, the final GOAL URL in your Analytics settings is Order_Successful, and funnel step one is Add_To_Cart, funnel step two is Enter_Your_Information.
Unfortunately I'm stil having problems getting my test orders to show up but this is what they've told me. :-)
...Analytics Specialists
have reviewed your account and found that your code is correct. The issue lies with the setup of the goal. Please switch the 'Match Type' at the
bottom of the specific goal page to 'Regular Expression,' and use the following URL in the fields:^/Order_Successful
^/Enter_Your_Information
^/Add_to_Cart
We get sales daily, let's see if it works. :-)