From tracking viewed products to behaviors, the data that fuels what Samba can do is all based on tracking your visitors and customers.

So how does Samba do this? It’s all made possible by a tracking script, which is integrated with your e-shop, called Smart Point.

Smart Point

Smart Point integration ensures your ability to evaluate anonymous data regarding the behaviors of those people visiting your e-shop. This includes:

  • Viewed products
  • Login information and details
  • Checkout process
  • Cart interactions
  • and more

So what is Smart Point exactly?

  • It’s a basic tracking script
  • Provides information about visitors and customers
  • Connects data from multiple devices thanks to a saved cookie

Smart Point Functions

customerLoggedIn()

  • Provides information about the customer’s ID
  • Makes it able to connect a customer to their shopping history

order()

  • Provides information about a customer’s orders and the included items
  • Sends a signal to Samba immediately after an order is finished

cartInteraction()

  • Provides information about the content of a cart
  • Makes it able to activate an Abandoned Cart trigger

If you use the Shoptet e-shop platform, you can easily implement these directly from your Shoptet administration utilizing Smart Point. Tracking orders and basket content can only be done if you have completed Data Integration.

Please note, tracking customer logins is not currently possible.

Not a Shoptet user?

If you don’t use Shoptet, please find implementation instructions for other e-commerce platforms here.

If your platform isn’t supported, please note that we’re working on integrating more of the most-used platforms and in the meantime, you can implement scripts using, for example, the Google Analytics.

To do so, simply follow the instructions below.

Integrating Smart Point

  1. From Shoptet, navigate to Appearance and Content → Editor
  2. Select the HTML Code tab
  3. Insert Samba’s Smart Point code (details below) in the Footer field (before the BODY tag)

You’ll find the code in Samba in your Settings under Implementation and it needs to be placed on every page of your e-shop.

The standard script is as follows:

<!-- Samba.ai pixel --> <script async src="https://yottlyscript.com/script.js?tp=*YOUR-IDENTIFIER*"></script> <!-- End Samba.ai pixel -->

where *YOUR-IDENTIFIER* is replaced by your unique identification code.

order

If you already use Google Analytics on your e-shop, you can easily add this script as follows:

  1. From Shoptet, navigate to Appearance and Content → Editor
  2. Select the HTML Code tab.
  3. Insert Samba’s Smart Point code (details below) in the Footer field (before the BODY tag)
<!-- Samba.ai order --> <script> var _yottlyOnload = _yottlyOnload || []; _yottlyOnload.push(function() { for (var i = 0; i < window.dataLayer.length; i++) { var basketContent = []; if (window.dataLayer[i].transactionProducts) { for (var c = 0; c < window.dataLayer[i].transactionProducts.length; c++) { basketContent.push({ productId: window.dataLayer[i].transactionProducts[c].sku, price: window.dataLayer[i].transactionProducts[c].quantity * Number(window.dataLayer[i].transactionProducts[c].price) }); } diffAnalytics.order({ content: basketContent }); } } }); </script> <!-- End Samba.ai order -->

customerLoggedIn

Unfortunately, Shoptet doesn’t currently support the implementation of this script. However, Samba still has the ability to link site activity to a given customer by their respective click-thru activity via emails sent by our system.

cartInteraction

If you already use Google Analytics on your e-shop, you can easily add this script as follows:

  1. From Shoptet, navigate to Appearance and Content → Editor
  2. Select the HTML Code tab.
  3. Insert Samba’s Smart Point code (details below) in the Footer field (before the BODY tag)
<!-- Samba.ai cart --> <script> var _yottlyOnload = _yottlyOnload || []; _yottlyOnload.push(function () { var layer = dataLayer.filter(function(layer) { return layer.shoptet })[0]; if (layer && layer.shoptet && layer.shoptet.cart) { var content = []; for (var i in layer.shoptet.cart) { content.push({ productId: layer.shoptet.cart[i]['code'], amount: layer.shoptet.cart[i]['quantity'] }) } var onOrderPage = layer.shoptet.pageType === 'customerDetails'; diffAnalytics.cartInteraction({ content: content, onOrderPage: onOrderPage }); } }); </script> <!-- End Samba.ai cart -->

Deployment Control

SmartPoint Deployment Verification

You can check the functionality of all Samba scripts in the console of your web browser. Samba scripts can be found in 

If Smart Point is implemented correctly, the diffAnalytics object should be available. To test it, try typing “diffAnalytics” into the console and confirm by pressing “Enter”.

Verifying Deployment of order

In the browser console, select Network. Once the customer makes an order (the thank-you-page is displayed), one of the save-action requests should contain “orderSubmitted” in the attachment.

Please pay attention to the correct spelling – productId must be in the same format as PRODUCT_ID in the product feed.

Verifying Deployment of cartInteraction

In the browser console (F12), select Network. After the page loads, one of the save-action requests should contain “cartInteraction” in the attachment.

Did this answer your question?