How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask Russell H. Your Own Question

Russell H.
Russell H., Programmer & Coder
Category: Programming
Satisfied Customers: 9512
Experience:  Programmer & Coder
13568747
Type Your Programming Question Here...
Russell H. is online now
A new question is answered every 9 seconds

Looking to see what variables to set within a tracking pixel

Customer Question

Looking to see what variables to set within a tracking pixel
irEvent.setOrderId("Your Order Id here");
Submitted: 1 year ago.
Category: Programming
Customer: replied 1 year ago.
I need help in knowing what variables to put with a tracking pixel code.For example:
// required advertiser supplied values
irEvent.setOrderId("Your Order Id here");Where do I find what variable to set for Order Id?Also,
irEvent.addItem("electronics", "220-2300", "112000.00", "56"); // 56 identical gizmos at 2000.00 eachNop Commerce website 3.40
Expert:  Russell H. replied 1 year ago.

Hi, thank you for contacting JustAnswer.com. My name is Russell. I will do my best to provide the right answer to your question.

I think the following code quotation indicates what the fields to populate an irEvent.setOrderID() are:

irEvent.setOrderId("{$order_info.order_id}");
irEvent.addItem("{$item.product}", "{$item.product_code}", "{$item.price}", {$item.amount});
irEvent.setPromoCode("");
irEvent.fire();

apparently the Order ID has, firstly, an identifying id, and as an object it contains a

product name or other identifier, a product code, and a price, and an amount. That makes sense for an object that represents an order being made for a saleable product.

As for what to set for the particular Order ID, I think it should be a unique number, not matching other Order ID numbers. Perhaps the latest in an incrementive series of successive integers? it's a thought.

Customer: replied 1 year ago.
Please review the error messages and fix your tracking code. Once this has been done you can submit another test conversion.
•Not a numeric amount: {$item.price}
•Not an integer quantity: {$item.amount}, skipping.
•Missing or zero quantity, adjusting to 1
•Invalid amount: null, adjuting to zero
This is the error message I get when I test the code. The affiliate is impactradius.com and our website is www.thirty48.com
Customer: replied 1 year ago.
What information from our site do you need from me? I can attach a sales order I export to xml?
Customer: replied 1 year ago.
Order Id  {$order_info.order_id} Yes Correct Incorrect
Total Amount  $0.00 Yes Correct IncorrectItemcat {$item.product} Yes Correct Incorrect
sku {$item.product_code}
It did not get the correct info either for Order Id, Category and Sku.
Expert:  Russell H. replied 1 year ago.

That code wasn't meant to be imported just-as-stated into your code. I did not expect you to try it.

I meant to quote that code in order to illustrate *what* is meant to go into the processing of an OrderID object.

The representation in the style of

{$item.price}

is meant to represent some ordered item's price, as a quantity. For instance if the Order ID is for a pair of socks, which costs $2.17, then the {$item.price} would actually be

2.17

nor

{$item.price}

which just represents the quantity - or, the variable carrying the quantity to the object.

Customer: replied 1 year ago.
Can you type me the code as it should be.
These are the true values from the website.Order Number: 9657
cat: Compression Sleeves
sku: CP2PAIRB
amt: $18.00
qty: 1
Customer: replied 1 year ago.
Would you say this looks correct or take out the $ ?
irEvent.setOrderId("{$9658}");
irEvent.addItem("{$Compression Sleeves}", "{$CP2PAIRB}", "{$18.00}", {$1});
Expert:  Russell H. replied 1 year ago.

I'm not sure. What language or coding system are you writing this application in?

Or, in what context? you mention CSS... so is this code to be inserted into a web page ultimately, or somewhere else?

Customer: replied 1 year ago.
To be inserted into a web page which is the "completed.cshtml" page after checkout. Website is using NopCommerce which is build on ASP.Net MVC 5
Expert:  Russell H. replied 1 year ago.

If it is ASP code, I have no expertise in that coding language.

If it were CSS, that would be different.

Please clarify this point, and I will advise you or take appropriate action, depending on what you tell me. Thanks.

Related Programming Questions