To integrate with our system, you need to implement our scripts in your shop. They are used to correctly register transactions and charge commissions to relevant partners.

  1. Data Loader script
<script type="text/javascript">
"use strict";(function(scriptUrl){if(!window.bb){window.bb=function(){
for(var _len=arguments.length,params=Array(_len),_key=0;_key<_len;_key++){
params[_key]=arguments[_key]}return window.bb.q.push(params)};window.bb.q=[]
;var script=document.createElement("script")
;var firstScript=document.getElementsByTagName("script")[0];script.async=true
;script.src=scriptUrl;firstScript.parentNode.insertBefore(script,firstScript)}
})("https://shop.buybox.click/bb-shop-{your-shop-ID}.js");
</script>


Parameters:

  • {your-shop-ID}  to unikalny identyfikator sklepu it is a unique shop identifier

This script should be placed in the header of each webpage of the shop. It is responsible for recognizing the parameters transmitted as part of the widget redirection and for setting a cookie that later allows for linking the transaction with the service from which the user was redirected.  

After placing it on the shop's website and switching from BUY.BOX to the shop, among the cookies in the browser, there should appear the ones with the name
bbuuid , bb_session_track  i bb_track.

   2. Product display reporting script

<script type="text/javascript">
bb("productView", { "productId": "{your-product-id}" })
</script> 


Parameters:

  • {your-product-ID}  is the product identifier that matches the offer ID passed to us in the XML file. 

This is a script that reports to us the display of a specific product webpage. The script should be placed on every product webpage.

   3. Order / transaction reporting script 

<script type="text/javascript">
bb("order", { "orderId": "{your-order-id}", "products": [
   { "productId": "{your-product-id}", "quantity": {item-quantity}, "commissionId": {your-commission-id}, "gross": {item-gross-price}},
   ...
   { "productId": "{your-product-id}", "quantity": {item-quantity}, "commissionId": {your-commission-id}, "gross": {item-gross-price}}
]});
</script> 

Parameters:

  • {your-order-ID}  } is the order / transaction ID in the shop
  • {your-product-ID}  } is the product ID that matches the offer ID passed to us in the XML file
  • {item-quantity} is the amount of products ordered
  • {item-gross-price}  } is the gross price at which the given product was ordered
  • {your-commission-id}  } is the identifier of the commission to be charged on the sale of a given product; commission identifiers are generated in the panel  

This is the script notifying us about the order / transaction, along with the  information about the products ordered and the settlement details (commissions). It should be placed on the order confirmation page (the last page of the purchasing process).

In the case of settlement based on commissions in the CPA model, the reporting script will not force you to enter order details and it will be simplified to the form:

<script type="text/javascript">
bb("order", { "orderId": "{your-order-id}", "commissionId": {your-commission-id} });
</script>

Warning! All scripts must work on webpages within the same domain!


Warning!
In the case of settlements according to net amounts, the appropriate flag should set in the shop settings the panel, and in the order an additional parameter 'net' should be added, for example:

<script type="text/javascript">
bb("order", { "orderId": "{your-order-id}", "products": [
   { "productId": "{your-product-id}", "quantity": {item-quantity}, "commissionId": {your-commission-id}, "gross": {item-gross-price}, "net": {item-net-price}},
   ...
   { "productId": "{your-product-id}", "quantity": {item-quantity}, "commissionId": {your-commission-id}, "gross": {item-gross-price}, "net": {item-net-price}}
]});
</script>


Cookie files used

  • bb_session_track is a cookie used to identify a particular user in a single session from the transition from our widget to the end of a visit to the shop (lifetime - current session)
  • bb_track is a cookie used to identify a user moving throughout our network (lifetime - as long as possible, by default- one year)
  • bbuuid is acookie used to identify the last redirection from the widget to the shop; it is used to record transactions and correctly calculate commissions to the appropriate partner (lifetime - as agreed)

 

Czy udało Ci się znaleźć odpowiedź na swoje pytanie?