Need javascript tracking for Bing Cashback for my shop cart
$30-250 USD
Peruutettu
Julkaistu yli 14 vuotta sitten
$30-250 USD
Maksettu toimituksen yhteydessä
Here is the Javascript code provided by Bing Cashback.
This goes on my order completed page.
This should take 5-mins for any experienced coder.
All you have to do is get it to loop for each item purchased (see code below).
<!– Begin cashback Tracking Pixel Code -->
<script type='text/javascript'>
<!--
var jf_merchant_id =
'WjZYb2NrMWJyNlRUxjQT09Cg';
var jf_merchant_order_num = 'ORDER_NUMBER';
var jf_purchased_items = new Array();
// adding cart items
FOR EACH PURCHASED ITEM...
// add cart item
var jf_item = new Object();
[login to view URL] = 'ITEM_PRODUCT_ID';
[login to view URL] = 'ITEM_PRICE';
[login to view URL] = ITEM_QUANTITY;
[login to view URL] (jf_item);
NEXT PURCHASED ITEM
//-->
</script>
<script type='text/javascript' src=
'[login to view URL]'>
</script>
<!-- End cashback Tracking Pixel Code -->
-----------------------------
Here are the variables that my shopping cart uses. Replace the items above with the correct variables. For example, you would replace ORDER_NUMBER above with Order[0]
Order-specific information can be generated by JavaScript on the [login to view URL] page within Volusion. On this page, two JavaScript arrays will be intiialized that advanced users may need to be aware of. The arrays and their contents are as follow:
Order Array Contents:
* Order[0] = Order ID
OrderDetails Array Contents:
* OrderDetails[X][0] = Order ID
* OrderDetails[X][2] = Product Code
* OrderDetails[X][5] = Product Price
* OrderDetails[X][6] = Quantity
Note that in the above example, X refers to a line item number (beginning from zero). Note that there can be multiple OrderDetails arrays - one for each item contained within an order.