Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help with Google Analytics tracking in OSCommerce


mmakris

Recommended Posts

Hi,

 

I installed Google Analytics purchase tracking code to my /checkout_success.php page, and need to replace the vars in the brackets (below) with purchase information. I've tried a few things but nothing seems to work. Thank you in advance!

 

This goes at the bottom under my general google tracking code:

 

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

 

 

Please help! Thank you :)

Link to comment
Share on other sites

  • 4 weeks later...
Hi,

 

I installed Google Analytics purchase tracking code to my /checkout_success.php page, and need to replace the vars in the brackets (below) with purchase information. I've tried a few things but nothing seems to work. Thank you in advance!

 

This goes at the bottom under my general google tracking code:

Please help! Thank you :)

 

Hi.

 

I am just installing this aswell so thought I would help.

 

As well as the data you have above, you also need the following lines of code:

 

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

 

and

 

<body onLoad="java script:__utmSetTrans()">

 

You must change _uacct to your account number provided to you by Google. The second piece of code is very important because this calls the utmSetTrans() function allowing Google to grab your data.

 

Do you have these pieces of code on your site?

 

All the information is provided here.

Link to comment
Share on other sites

Thanks for your reply. I was actually wondering how to dynamically insert oscommerce variables into the google tracking code to track each product purchase

 

 

Hi.

 

I am just installing this aswell so thought I would help.

 

As well as the data you have above, you also need the following lines of code:

 

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

 

and

 

<body onLoad="java script:__utmSetTrans()">

 

You must change _uacct to your account number provided to you by Google. The second piece of code is very important because this calls the utmSetTrans() function allowing Google to grab your data.

 

Do you have these pieces of code on your site?

 

All the information is provided here.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...