Shopping.com ROI Tracker Implementation |
Post Reply |
Author | |
whizzinpc
Newbie Joined: 17-January-2006 Location: California Status: Offline Points: 20 |
Post Options
Thanks(0)
Posted: 03-October-2012 at 12:50pm |
Can someone let me know if this code will work on the order complete page for Shopping.com's ROI Tracker. I think I have it right except i'm not sure about the OrderID.
|
|
Guests
Guest |
Post Options
Thanks(0)
|
Hi Art,
For "Step 1" you'd want:
For "Step 2", a modification to orderComplete.asp would be necessary. What you have there won't work at all, but even if corrected, at this point in the processing it would only pick up the values for the last item in the cart. To track the ROI at the item level, this bit of the script would need to be dynamically populated as orderComplete.asp loops through the items in the order, or (better) it could be generated straight off of pcCartArray.
|
|
Guests
Guest |
Post Options
Thanks(0)
|
Oh, one more question: For this, would you want to push the complete order total (including shipping, taxes, etc.) or the subtotal before all of that?
|
|
whizzinpc
Newbie Joined: 17-January-2006 Location: California Status: Offline Points: 20 |
Post Options
Thanks(0)
|
It would be the subtotal before shipping, tax.
|
|
Guests
Guest |
Post Options
Thanks(0)
|
Ok. PC doesn't have a subtotal, so we have to do some math here. So for "Step 1" you'd want:
Generating the content for "Step 2" would require some work, though.
|
|
whizzinpc
Newbie Joined: 17-January-2006 Location: California Status: Offline Points: 20 |
Post Options
Thanks(0)
|
I wanted to bring this thread back to life. Can anyone help finish the code for the shopping.com ROI Tracker. Only thing not working is looping through all products in the order. The way the code is now only shows the last product in the order. So its reporting incorrectly.
<!-- START Shopping.com ROI Tracking Code --> <script type="text/javascript"> var _roi = _roi || []; // Step 1: add base order details _roi.push(['_setMerchantId', 'xxxxxx']); // required _roi.push(['_setOrderId', '<%=pOrderNumber%>']); // unique customer order ID _roi.push(['_setOrderAmount', '<%=pTotal%>']); // order total without tax and shipping _roi.push(['_setOrderNotes', '']); // notes on order, up to 50 characters // Step 2: add every item in the order // where your e-commerce engine loops through each item in the cart and prints out _addItem for each // please note that the order of the values must be followed to ensure reporting accuracy _roi.push(['_addItem', '<%=pIdProduct%>', // Merchant sku '<%=pdescription%>', // Product name '', // Category id '', // Category name '<%=punitPrice1%>', // Unit price '<%=pquantity%>' // Item quantity ]); // Step 3: submit transaction to ECN ROI tracker _roi.push(['_trackTrans']); </script> <script type="text/javascript" src="https://stat.dealtime.com/ROI/ROI2.js"></script> <!-- END Shopping.com ROI Tracking Code --> |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |