Google Analytics - how do I track e-commerce transactions in QC ?
minimus
2007-09-15 21:28
Hello
Could anyone help me in getting QC works with Google Analytics. I mean for tracking e-commerce transactions, as described on page: http://www.google.com/support/analytics/bin/answer.py?answer=27203&topic=7282
I guess it is a very useful tool for anyone with web shop.
Many thanks in advance
» Quick.Cart v1.x
merci
2007-09-17 08:57
minimus - we have a description how to add statistic code to Q.C, you can see it here: http://opensolution.org/Quick.Cart/docs/?id=tips#how_to_add_statistic_code_to_shop_pages I hope it will help you...
merci - That description is about how to track visitors. It doesn't include the webshop tracking part.
"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.
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:
Where should I put those codes mentioned above? I suppose that right page for those would be "order summary" page, but I haven't found it yet from quick.cart code.
merci
2007-09-18 09:11
kranken - sorry, I misunderstand you. If about tracking transactions in Google Analytics I don't have experience with that, so I don't know how it works. If you need file where the final information after completing order is displayed, you should open templates/messages.tpl block ORDER_SAVED (it is for version 1.4) or templates/orders_summary.tpl (for version 2.x)
minimus
2007-09-18 22:08
Yes, I mean Ecommerce tracking part of Google Analytics, not just a simple visitor tracking(it works okey as Merci described in the link). I need more details... I guess from messages.tpl you can pass UTM:T, but how to pass UTM:I (items in transaction)? I noted also there is a problem of passing data and char '|' from messages.tpl (I'm not a PHP programmer, so hard to say what is a problem). To make it working I just replaced char'|' with ¦ - see my code as below, but still no data passed to Google. Maybe it needs UTM:I part, too?
It would be cool to make QC working with Google Ecommerce analytics.
merci
2007-09-19 09:22
minimus - in version 1.4 it is hard to do as in the and of transaction there is only message that it is finished, but list of ordered items isn't displayed, in version 2.x it will be easier to pass UTM:I as at the end it displays also list of items.
minimus
2007-09-20 14:14
AFAIK in 1.4 there is sendOrderToClient and also show printable order, so passing UTM:I to be also possible without problem for anyone with PHP knowledge. Anyway I still don't know what is wrong with UTM:T passing to google(my script above), then UTM:I is the next step.
I have added this code to my site page.tpl just before </body> tag and it was working fine. It does not contail all information (tax and country) but it show customers orders. And it does not contain UTM:I part yet.