Google Analytics - Revenue Tracking for Actinic v8 and v9 November 22, 2007 11:33 by Rob Williams

We have developed this code over a period of a couple of weeks, and are donating it free to any Actinic users who would like to enable Google E-Commerce tracking within Analytics. Once this code is enabled the information that you can mine from Analytics is absolutely top notch.

I am willing to give you this code for nothing – but (there is always a but!) I want a decent link back from your site to me, there – not too painful was it?. To make it easy I have listed five different links here and would ask you to look at your nearest printer and choose the relevant code for that manufacturer, if your printer is not listed, use the last one:

Got a HP Printer? Copy and insert on your page:

 HP Inkjet Cartridges 

Got an Epson Printer? Copy and insert on your page:

 Epson Ink Cartridges 

Got a Canon Printer? Copy and insert on your page:

 Canon Ink Cartridges 

Got a Lexmark Printer? Copy and insert on your page:

 Lexmark Ink 

Not Sure? Copy and insert on your page:

 Printer Ink 

On to the code...

This guide assumes you have already installed analytics on the rest of your site. If not, the article How do I add tracking code to my website? should help you out.

Enable e-commerce tracking

Enable E-Commerce Tracking in Analytics

Install the scripts

Download the main roi script from http://www.stinkyinkshop.co.uk/roi-example.js and rename it to roi.js make sure you adjust all the items in the OPTIONS section to match your own site.

Download jQuery from http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.2.1.min.js rename it to jquery.js

Place roi.js and jquery.js into your actinic 'site' directory.

Set Actinic Page Type to 'Receipt'

Set Actinic Page type to Receipt

Place the following changes into thesection of 'Receipt Page Layout'




Wrap Actinic Variables with span tags.

The roi script needs a way of referencing each of the Actinic variables, we can do this by wrapping each of them with a span tag and giving them a class. This could easily work with another shopping cart system as long you have a way of accessing the receipt templates.

.receipt_order_id in 'Receipt Order Number' layout

The order number field in Actinic




.receipt_total in 'Total Row' layout

The total field in Actinic




.receipt_tax in 'Tax 1 Row' layout

The tax field in Actinic




.receipt_shipping in 'Shipping Charge Row' layout

The shipping field in Actinic




.receipt_town & .receipt_county in 'Receipt Invoice Address Details' layout

The state field in Actinic




.receipt_line, .receipt_price in 'Product Line Row' layout

The .receipt_line class has to be added so the roi script can loop through each product row.

The product line table row in Actinic




.receipt_reference, .receipt_name, .receipt_quantity in 'Cart Product Details' layout

The product line table row in Actinic




.receipt_category & .receipt_country_code

If you have a way of setting .receiptcategory & .receiptcountry_code values they will be automatically used instead of the default variables set in the roi script.

All Done!

Update your site and wait 24 hours for Google to start showing your stats.

Share



Version: 2.5.10