No announcement yet.

ROI Optimizer for Not Working

  • Filter
  • Time
  • Show
Clear All
new posts

  • ROI Optimizer for Not Working

    Does anyone submit products to and use their ROI Tracker? I've struggled to get it to work properly. The code is Step 1 works and records the Order number and sales amount. The code is Step 2 does not work -- instead of displaying the product information on the reports, it just displays the variable name -- [item_id] and [item_name]. I've tried the code with and without brackets around the variables in Step 2 and each time, it just puts the variable name on the report, not the actual data. Below is the code that I've added to Checkout #4, my thankyou page Any ideas?

    <script type="text/javascript">
    var _roi = _roi || [];

    // Step 1: add base order details

    _roi.push(['_setMerchantId', 'xxxxx']); // required
    _roi.push(['_setOrderId', '[invoicenum]']); // unique customer order ID
    _roi.push(['_setOrderAmount', '[subtotal]']); // 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

    '[item_id]', // Merchant sku
    '[item_name]', // Product name
    '', // Category id
    '', // Category namen
    '[item_price]', // Unit price
    '[item_quantity]' // Item quantity

    // Step 3: submit transaction to ECN ROI tracker

    <script type="text/javascript" src=""></script>
    Last edited by JulieAndrus; 03-19-2015, 11:36 AM. Reason: A little more information...

  • #2
    I'm still trying to figure out the tracking code on the Thankyou page (checkout#4). I have scripts for three different shopping sites and they all are able to pull the invoice number and order totals correctly but not the order details (i.e. item names, item price, number of items sold). I've tested the code by placing an order and then looking at the source code on the thankyou page and it just records the variable names instead of the actual data.

    Here is the part of the code that I've entered on the Thankyou page.

    /* NexTag ROI Optimizer Data */
    var id = 'xxmyidxx';
    var rev = '[ototal]';
    var order = '[invoicenum]';
    var prods = '[itemname]';
    var units = '[numitems]';
    var itemrevs = '[unitprice]';
    var type = 'product';

    When I place an order, here is what I see when I view the source of the thankyou page:
    /* NexTag ROI Optimizer Data */
    var id = 'xxmyidxx';
    var rev = '$10.59';
    var order = '32404';
    var prods = '[itemname]';
    var units = '[numitems]';
    var itemrevs = '[unitprice]';
    var type = 'product';

    So it gets the Order total [ototal] and the Order number [invoicenum] correct but not the other variables.

    If anyone has experience with tracking codes or scripts, I'd love to hear from you.