The tagging enables Nosto to display recommendations based on purchase behaviour. The order content tagging is placed on a page where a successful order is communicated to the customer, in practice when a customer returns back to the store from the payment service after paying the purchases.

<!-- Tag your PurchaseOrders, replace static example values to equivalent database/ecom engine variables -->
<div class="nosto_page_type" style="display:none">order</div>        
  <div class="nosto_purchase_order" style="display:none">
    <span class="order_number">1445</span>
      <div class="buyer">
        <span class="email">Jack.Bauer@example.com</span>
        <span class="first_name">Jack</span>
        <span class="last_name">Bauer</span>
        <span class="marketing_permission">true</span>
      </div>
    <div class="purchased_items">
<!-- Check your ecom engine how to loop over purchased items to produce the line_item divs -->
      <div class="line_item">
        <span class="product_id">CANOE123</span>
        <span class="quantity">1</span>
        <span class="name">ACME Foldable Canoe</span>
        <span class="unit_price">1269.00</span>
        <span class="price_currency_code">EUR</span>
      </div>
      <div class="line_item">
        <span class="product_id">TOOTHBR</span>
        <span class="quantity">3</span>
        <span class="name">Large yellow toothbrush</span>
        <span class="unit_price">19.00</span>
        <span class="price_currency_code">EUR</span>
      </div>
    </div>
  </div>
</div>

General Guidelines

The productID needs to be consistent with the productID on the product and cart tagging. Overall sum is not required, simply map the quantity of line items and unit selling price including VAT.

In case a site has for any reason multiple order confirmation pages, the tagging needs to be present on each similarly to Google’s conversion tracking script. If a site hosts order confirmation page under different domain than site itself, such as secure.company.com, while the site is found under www.company.com, add the additional hostname under account settings in the Nosto admin into field: Other hosts used by the site (one per line) so that Nosto accepts traffic from the additional hostname.

How to test? Make a test order having debugger enabled and see the output on order confirmation page.

There’s only one step left after you’ve finalised order tagging, see it next!

Cross-Domain Order Tracking

In a normal Nosto implementation, the order-confirmation/thank-you page is on the same domain as the rest of the site.

The Nosto cookie is a first-party cookie and always tied to the domain it was issued on.

There are cases when the order-confirmation/thank-you page is on a different domain than the rest of the site. In these cases revenue will not be correctly tracked as the cookie issue on the order-confirmation/thank-you page is different from the rest of the site.

To support this scenario we have an additional snippet of tagging that can be implemented on both domains to inform Nosto that the visitor is in fact the same visitor across both domains. Nosto will then use this information to attribute the order to visitor who came from the other domain.

Mark’s Gift Shop is accessible at marks.com. When customers make a purchase and check out, they end up on a order-confirmation/thank-you page on orders.marks.com.

A visitor shopping on marks.com and after a successful purchase, ending up on orders.marks.com will be treated as a separate vistors as the visitor has two separate cookies – one from marks.com and the other from orders.marks.com.

Adding the following snippet in your markup along with the rest of the Nosto markup will allow the visitor’s shopping journey to be correctly tracked across both domains.

<div class="nosto_external_visit_ref" style="display:none">{{ page.session_id }}</div>

The identifier passed in the external_visit_ref must be unique for that visitor and must be the same across both the domains.

Common external visit references are often the platform’s internal session identifier or the cart/checkout identifier.

Did this answer your question?