Tracking Order Amounts: Advanced
How to set up ConversionRuler Commerce Tracking snippets.
To pass financial information to our servers you will need to modify the “order snippet”. This will generally require some coding in the technology that your shopping cart uses.
The Tracking Snippet page allows you edit your snippet to add values you have configured.
The basic change you need to make is filling in the ORDER_AMOUNT and ORDER_NUMBER values:
cramount = 'ORDER_AMOUNT',
crtext = 'ORDER_NUMBER';
Microsoft Active Server Pages Example
For example, if you are using Microsoft Active Server Pages, your snippet may look like this:
cramount = '<%= oRS("subtotal") %>',
crtext = '<%= oRS("order_id") %>';
If you are using PHP in your server, you snippet may appear like this:
cramount = '<?= $order['subtotal'] ?>',
crtext = '<?= $order['id'] ?>';
When your pages generate, the final page should look like this for an order of $199.99 with order number 2369:
cramount = '199.99',
crtext = '2369';
cramount = CAOrderSubTotal,
crtext = CAOrderID;
All variables are optional, so to just include the order amount:
var cramount = '199.99';
And, as a final example, you can pass up to four different amounts and strings with each action:
var cramount0 = "USD $33.55";
var cramount1 = "$5.34";
var cramount2 = "$2.33";
var cramount3 = "$512.23";
var crtext0 = "ORD1850-6923942639234";
var crtext1 = "email@example.com";
var crtext2 = "2009-05-30 44:33:22";
var crtext3 = "affiliate5434";
Order amounts may include special characters such as $ or € - our servers will strip away all of the non-numerical information.
Using different variables which mean the same thing
If, for some reason, you define cramount and cramount0 on your page, then cramount will be recorded, and cramount0 is not recorded.
var cramount = "USD $33.55";
var cramount0 = "USD $330000324.55";
__CR.track('3'); // Records $33.55 only
For more help
We have installed order tracking in hundreds of shopping carts so if you are stuck, feel free to contact us!