login
Forgot?
Login with Facebook

Don't have an account? Register one now!

Need javascript tracking for Bing Cashback for my shop cart

Bids 
1
Avg Bid
$30 USD
CLOSED
  • Project ID:

    534997
  • Project Type:

    Fixed
  • Budget:

    $30-$250 USD

Project Description:

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();
jf_item.mpi = 'ITEM_PRODUCT_ID';
jf_item.price = 'ITEM_PRICE';
jf_item.quantity = ITEM_QUANTITY;
jf_purchased_items.push (jf_item);
NEXT PURCHASED ITEM
//-->
</script>
<script type='text/javascript' src=
'https://ssl.bing.com/cashback/javascripts/1x1tracking.js'>
</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 OrderFinished.asp 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.

Additional Project Description:

10/23/2009 at 19:12 EDT:
Here is the code I wrote. The JavaScript fires, but the variables are not rendered. What am I doing wrong?

Here are instructions about these variables for my shopping cart:
http://store.volusion.com/kb_results.asp?ID=339

<! Begin cashback Tracking Pixel Code -->
<script type='text/javascript'>
<!--
var jf_merchant_id =
'WjZYb2NrMWJyNlRUxjQT09Cg';
var jf_merchant_order_num = 'Order[0]';
var jf_purchased_items = new Array();
// adding cart items
for (var i=0; i < OrderDetails.length; i++)
{
// add cart item
var jf_item = new Object();
jf_item.mpi = 'OrderDetails[i][2]';
jf_item.price = 'OrderDetails[i][5]';
jf_item.quantity = OrderDetails[i][6];
jf_purchased_items.push (jf_item);
}
//-->
</script>
<script type='text/javascript' src=
'https://ssl.bing.com/cashback/javascripts/1x1tracking.js'>
</script>
<!-- End cashback Tracking Pixel Code -->



Skills required:

ASP, eCommerce, Javascript

Project posted by:

Liguidsoul United States
(26 Reviews)

Last seen:

If you are the project creator or one of the bidders, please Log In for more options.


All Bids ()

janjerell Philippines
janjerell
Philippines From Philippines     Offline
  Foundation LimeExchange Member
  Foundation EUFreelance.com Member
$30 in 0 days 
0
over 2 years ago
5.0

2.8

4 Reviews
85% Completion Rate
Please check PM