Skip to content

A temp documentation-oriented repo for BestPrice 360º

Notifications You must be signed in to change notification settings

stfanos/bestprice-360

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 

Repository files navigation

Snippet

Place the following snipet right before closing the </body> tag.

Make sure you replace the BESTPRICE_360_KEY_HERE with the BestPrice 360º key provided by the BestPrice team.

<script>
(function (a, b, c, d, s) {a.__bp360 = c;a[c] = a[c] || function (){(a[c].q = a[c].q || []).push(arguments);};
s = b.createElement('script'); s.async = true; s.src = d; b.body.appendChild(s);})
(window, document, 'bp', '//360.bestprice.gr/360.js');

bp('connect', 'BESTPRICE_360_KEY_HERE');
</script>

Actions

In order to track orders and products, the following two methods are to be used.

addOrder

bp('addOrder', {
  orderId: '123456',    // Order ID. Required. (alias: order_id)
  revenue:  '1315.25',  // Grand Total (Cost + Tax +Shipping).
  shipping: '5.45',     // Shipping Cost
  tax:      '301.25'    // Tax.
  
  method: 'card|paypal|ondelivery|deposit' (optional)
  currency: 'euro', (optional)
  
//  products: [] // We can pass them here
});

addProduct(s?)

bp('addProduct', {
  orderId:   '123456',                                    // Order ID. Required. (alias: order_id)
  productId: '111222',                                    // Product ID. Required. (alias: product_id)
  title:       'Apple IPhone 6 Plus (16GB) Space Gray EU',  // Product title. Required. (alias: name)
  price:      '654.90',                                    // Price. Required.
  quantity:   '2'                                          // Quantity. Required.
});

Or you can pass an array

bp('addProduct', [products])`;

debug

bp('debug');

Will enable loggging.

Notes

  • If Skroutz Analytics is deployed, then - for convenience - all needed is inserting the snippet code.

About

A temp documentation-oriented repo for BestPrice 360º

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published