We are attempting to use a tracking system by to track clicks, conversions and cost per item sold. They require that we embed the following javascript into our receipt page.
<script type='text/javascript'>
<!--
var orderSubTotal = '192.50';
var orderTotal = '202.50';
var orderNum = 'yhst-49893418605636-486';
var numOfItems = '4';
var items = new Array('Performance Booster','Energy Juice');
var ids = new Array('perfbo','enjuice');
var codes = new Array('06-001','09-003');
var qtys = new Array('3','1');
var price = new Array('47.5','50');
var custKey = '00101020020333';
var name = 'John Smith;
var address1 = '123 West Broad St';
var address2 = 'Suite B';
var csz= 'Dublin, oh 43016';
var phone = '123-555-1212';
var email = 'johnqsmith11223@yahoo.com';
var _csCaptureFormData=false;
-->
</script>
using the following variables.
orderSubTotal Order total excluding tax or shipping
orderTotal Order total including tax and shipping
orderNum Unique ID for this order
numOfItems Total number of items orderd
items Array of short item descriptions
ids Array of unique item id’s
codes Array of unique manufacturer codes for the items.
qtys Array of quantities for each item
price Array of prices for a single quantity of each item
name Full customer name
address1 Customer mailing address line 1
address2 Customer mailing address line 2
csz City state and zip formatted postal style
phone Customer phone number
email Customer email address
tax Total tax amount
shipping Total shipping amount
I have no idea how to build the arrays that are required and I was wondering if actinic had a javascript loop or something to build those arays?
Thanks,
Gary
<script type='text/javascript'>
<!--
var orderSubTotal = '192.50';
var orderTotal = '202.50';
var orderNum = 'yhst-49893418605636-486';
var numOfItems = '4';
var items = new Array('Performance Booster','Energy Juice');
var ids = new Array('perfbo','enjuice');
var codes = new Array('06-001','09-003');
var qtys = new Array('3','1');
var price = new Array('47.5','50');
var custKey = '00101020020333';
var name = 'John Smith;
var address1 = '123 West Broad St';
var address2 = 'Suite B';
var csz= 'Dublin, oh 43016';
var phone = '123-555-1212';
var email = 'johnqsmith11223@yahoo.com';
var _csCaptureFormData=false;
-->
</script>
using the following variables.
orderSubTotal Order total excluding tax or shipping
orderTotal Order total including tax and shipping
orderNum Unique ID for this order
numOfItems Total number of items orderd
items Array of short item descriptions
ids Array of unique item id’s
codes Array of unique manufacturer codes for the items.
qtys Array of quantities for each item
price Array of prices for a single quantity of each item
name Full customer name
address1 Customer mailing address line 1
address2 Customer mailing address line 2
csz City state and zip formatted postal style
phone Customer phone number
email Customer email address
tax Total tax amount
shipping Total shipping amount
I have no idea how to build the arrays that are required and I was wondering if actinic had a javascript loop or something to build those arays?
Thanks,
Gary
Comment