Registrere en bedriftskonto

Registrer deg nå - 30 dagers gratis prøveperiode

Storebadge technical integration

This document describes the technical integration of the Storebadge feedback service

Chapter 1. | Storebadge Sidebar

The Storebadge Sidebar is used to display your store rating and reviews on your website. The sidebar is easy to implemented, just place a script (below) in the master template before the closing </body> tag on your website.

<!-- Storebadge Sidebar -->
<script> src=""></script>
<div> id="storebadge-sidebar" data-store="%YOUR STORE NAME%"></div>
</!-- Storebadge Sidebar -->

Sidebar settings

You can adjust all settings and look and feel via the Storebadge admin.

Chapter 2. | Automated review service (API)


For our automated review service the merchant may send their transactions to our API. When sending orders to our API the merchant may choose the sender giving the merchants the option to send the invitation link themselfs.


Example API request[email protected]m&secret=8430bb16c3bc7c225f8fd2dfcbd450fd&sender=sb&delay=2&firstname=kalle&lastname=svensson

The following values are required

  • Store (your store name*)
  • Reference (a unique identifier for the order / transaction, normally order ID)
  • Email (the customers email address on the order)
  • Secret (md5 of string %customer_email%+%reference%+%store_secret%*)
  • Sender (send invitation yourself=client, storebadge sends=sb)
  • First name (The customers first name)
  • Last name (The customers last name)

* Available in your storebadge admin panel

Chapter 3. | Automated review service (order tracking script)


For our automated review service a tracking script needs to be implemented on the "success page" of your website. This is the page that loads when a customer has placed a successful order (and normally a successful payment). The tracking script (asynchronous loading) provides Storebadge with parts of the order information.

Storebadge tracking script

 <!-- Storebadge Rating & Review Tracking -->
<script type="text/javascript">
// Mandatory below
var sb_store = '%YOUR STORE NAME%';
var sb_email = '%CUSTOMER EMAIL%';
var sb_reference = '%ORDER REFERENCE%';
var sb_secret = '%CREATE ORDER SECRET%';
// Optional below
var sb_fname = '%CUSTOMER FIRST NAME%';
var sb_lname = '%CUSTOMER LAST NAME%';
var sb_currency = '%ORDER CURRENCY (SEK, EUR, USD)%';
var sb_amount = '%ORDER AMOUNT%';
var sb_delay = false;
var sb_datetime = false;
var sb_test = false;
<script async type="text/javascript" src="//"></script>
<!-- Storebadge Rating & Review Tracking -->

Store name and store secret

You will provided with a store name and a store secret after you complete the store configuration in the admin panel. The store name is defined as sb_store. in the script. The store secret shall be used to create an order secret (read below).

Generating order secret

An order secret shall defined for the variable sb_secret and needs to generated in the client application as md5(customer_email+order_id+store_secret) for each order.

About review invitation delay time

The value (numeric) of the review invitation delay time determines the number of days a review invitation shall be delayed counting from the timestamp on the order. The value can be set either via a global setting or per order, see below. It is recommended to set the review invitation delay so it is sent one or two days after the expected delivery of the order to the customer.

Global setting

Your store has a global invitation delay time setting in the Storebadge admin panel. This setting will apply for all orders unless a review invitation delay time has been set for a specific order (see below)

Order specific (optional)

By setting the delay time via the tracking script a higher accuracy can be achieved in the timing of review invitation emails. Invitation delay time set via the tracking script has a higher priority than the global store setting. There is also an option of just setting an invitation delay time on some orders via the tracking script and let the global store setting determine the invitation delay time of all other orders.

The variable for the invitation delay are defined as sb_delay where the pre-setting is set to false, setting invitation delay time to 1 day is achieved as sb_delay = '1';


The varible sb_test can be used to test the integration by setting it to sb_test = 1;. Review invitation e-mails will be sent so ensure that you only use it for testorder(s) (your own email address). Note - You will not be able to submit a reviews for orders in testmode.

Datetime (Unix timestamp)

If you wish to implement the order tracking in a later stage, for example when orders are shipped you will need to use the sb_datetime varible to set the orderdate. If not set the datetime will be set as the date and time that Storebadge receives the order. Note -the format must be Unix timestamp

Chapter 3.1 | Platform extensions and apps

Storebadge offers extensions and apps for popular e-commerce platform. The extension/apps normally includes the basic Storebadge order tracking integration. Please read documentation for each extension for further details.

Magento extension

Technical support

Please contact us at tech(at) for technical enquiries.

Spørsmål? – La oss ringe deg tilbake