Hi,
The following describes what I have done to get Google Analytics working with Actinic. Use it at your own risk and keep in mind that if you've edited your template files the following may not be 100% compatible.
1) Place the following code in Act_BrochurePrimary.html, Act_Primary.html and Act_PrimaryCheckout.html using your own Google Analytics number where indicated. This code needs to go in the <HEAD> section.
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "YOUR GOOGLE ANALYTICS NUMBER";
urchinTracker();
</script>
2) Place the following code in Act_ReceiptPrimary.html using your own Google Analytics number where indicated. This code needs to go in the <HEAD> section. Note that receipt.html is a non-existent file.
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "YOUR GOOGLE ANALYTICS NUMBER";
urchinTracker('receipt.html');
</script>
3) Edit the Onload control in the <BODY> tag of Act_ReceiptPrimary.html to include javascript:__utmSetTrans().
For example:
OnLoad="NETQUOTEVAR:ONLOAD"
should look like this afterwards...
OnLoad="NETQUOTEVAR:ONLOAD ; javascript:__utmSetTrans() ;"
4) Place the following code at the bottom of Act_ReceiptPrimary.html. This needs to go just before the </BODY> tag.
<form style="display:none" name="utmform">
<textarea id="utmtrans"></textarea>
</form>
<script language="JavaScript" type="text/javascript">
<!--
var realprice = NETQUOTEVAR:ACTINICORDERTOTAL / 100;
var line1 = 'UTM:T|NETQUOTEVAR:THEORDERNUMBER|affiliation|' + realprice + '|tax|shipping|city|state|NETQUOTEVAR:INVOICECOUNTRY';
var line2 = 'UTM:I|NETQUOTEVAR:THEORDERNUMBER|NETQUOTEVAR:PRODUCTREFERENCE|NETQUOTEVAR:PRODUCTNAME|category|price|quantity';
document.getElementById('utmtrans').value = line1 + '\n' + line2;
//-->
</script>
5) Now you need to set up your Receipt goal in Google Analytics. You can call it what you like. I call mine 'Receipt'.
Goal Name: Receipt
Goal URL: /receipt.html
...check the ACTIVE GOAL checkbox to ON
Step 1 URL: http://www.yoursite.com/cgi-bin/ca000001.pl
Step 1 Name: Basket
...the Step 1 part is optional but it's useful to know that someone went to their basket. If you use this, tick the REQUIRED STEP checkbox. Don't forget to change www.yoursite.com to your own site.
NOTE: If your cgi-bin directory has a different name you'll need to change this accordingly. Also if your script number is different you'll need to change this too. (eg ca000002.pl).
Set Match Type to HEAD
Set Goal value to 0
Lastly you need to go into your Google Analytics Profile Settings and set E-COMMERCE WEBSITE to YES.
That's it. Leave it a day or two while Google collects data then check to see if it's working.
Added 20/07/06:
______________________________________________________________
WARNING: If you are using your own secure server (not Actinic's Shared SSL) for the checkout pages, additional steps may be required. Your visitors may be presented with security warnings if you do not complete these additional steps. Further details can be found in the Google Analytics Help:
http://www.google.com/support/analyt...y?answer=26915
Be sure to test your checkout process carefully after making any changes.
Dave
The following describes what I have done to get Google Analytics working with Actinic. Use it at your own risk and keep in mind that if you've edited your template files the following may not be 100% compatible.
1) Place the following code in Act_BrochurePrimary.html, Act_Primary.html and Act_PrimaryCheckout.html using your own Google Analytics number where indicated. This code needs to go in the <HEAD> section.
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "YOUR GOOGLE ANALYTICS NUMBER";
urchinTracker();
</script>
2) Place the following code in Act_ReceiptPrimary.html using your own Google Analytics number where indicated. This code needs to go in the <HEAD> section. Note that receipt.html is a non-existent file.
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "YOUR GOOGLE ANALYTICS NUMBER";
urchinTracker('receipt.html');
</script>
3) Edit the Onload control in the <BODY> tag of Act_ReceiptPrimary.html to include javascript:__utmSetTrans().
For example:
OnLoad="NETQUOTEVAR:ONLOAD"
should look like this afterwards...
OnLoad="NETQUOTEVAR:ONLOAD ; javascript:__utmSetTrans() ;"
4) Place the following code at the bottom of Act_ReceiptPrimary.html. This needs to go just before the </BODY> tag.
<form style="display:none" name="utmform">
<textarea id="utmtrans"></textarea>
</form>
<script language="JavaScript" type="text/javascript">
<!--
var realprice = NETQUOTEVAR:ACTINICORDERTOTAL / 100;
var line1 = 'UTM:T|NETQUOTEVAR:THEORDERNUMBER|affiliation|' + realprice + '|tax|shipping|city|state|NETQUOTEVAR:INVOICECOUNTRY';
var line2 = 'UTM:I|NETQUOTEVAR:THEORDERNUMBER|NETQUOTEVAR:PRODUCTREFERENCE|NETQUOTEVAR:PRODUCTNAME|category|price|quantity';
document.getElementById('utmtrans').value = line1 + '\n' + line2;
//-->
</script>
5) Now you need to set up your Receipt goal in Google Analytics. You can call it what you like. I call mine 'Receipt'.
Goal Name: Receipt
Goal URL: /receipt.html
...check the ACTIVE GOAL checkbox to ON
Step 1 URL: http://www.yoursite.com/cgi-bin/ca000001.pl
Step 1 Name: Basket
...the Step 1 part is optional but it's useful to know that someone went to their basket. If you use this, tick the REQUIRED STEP checkbox. Don't forget to change www.yoursite.com to your own site.
NOTE: If your cgi-bin directory has a different name you'll need to change this accordingly. Also if your script number is different you'll need to change this too. (eg ca000002.pl).
Set Match Type to HEAD
Set Goal value to 0
Lastly you need to go into your Google Analytics Profile Settings and set E-COMMERCE WEBSITE to YES.
That's it. Leave it a day or two while Google collects data then check to see if it's working.
Added 20/07/06:
______________________________________________________________
WARNING: If you are using your own secure server (not Actinic's Shared SSL) for the checkout pages, additional steps may be required. Your visitors may be presented with security warnings if you do not complete these additional steps. Further details can be found in the Google Analytics Help:
http://www.google.com/support/analyt...y?answer=26915
Be sure to test your checkout process carefully after making any changes.
Dave
Comment