Installing Salesfire on a bespoke platform

Paste the following code after your <head> tag.

<script async src="[YOUR SITE ID].js"></script>

You can get your Site ID from within the Salesfire Dashboard under Preferences.

Tracking Orders

In most cases we are able to automatically detect orders if you are using Google Analytics on your order success page. However, if you are unable to do this, you can add the following code to your order success page, ensuring the fields reflect the current order.

  window.sfDataLayer = window.sfDataLayer || [];
    "ecommerce" : {
        "purchase": {
            "id": "WEB1234",
            "revenue": 75.00,
            "shipping": 5.00,
            "tax": 15.00,
            "currency": "GBP",
                    "sku": "220165",
                    "parent_sku": "220164",
                    "name": "Product Title",
                    "variant": "Colour: Red, Size: Small",
                    "price": 25.00,
                    "quantity": 1,
                    "currency": "GBP"
                    "sku": "220166",
                    "parent_sku": "220164",
                    "name": "Product Title",
                    "variant": "Colour: Red, Size: Large",
                    "price": 25.00,
                    "quantity": 2,
                    "currency": "GBP",
                    "position": 1

Field definitions:


  • id - (required) - the unique ID of the transaction. We deduplicate base upon this ID.
  • revenue - (required) - the revenue generated by this order. You can include or exclude shipping and tax, this figure is what is reflected within Salesfire.
  • currency - (recommended) - the currency of this order. Defaults to GBP.
  • products - (recommended) - an array of products. See Product below.

We also support the following but are optional:

  • shipping - (optional) - the cost of shipping.
  • tax - (optional) - the cost of tax.
  • coupon - (optional) - what coupon or discount code was applied to this order. If multiple, use a comma separated list.
  • city - (optional) - the city of the customer.
  • state - (optional) - the state, county or region of the customer.
  • country - (optional) - the 2 letter code representing the country of the customer.


  • sku - (required) - this is the product variant ID or SKU. For example, the ID of the blue variant of a t-shirt.
  • parent_sku - (required) - this is the product ID. For example, the ID of a t-shirt product.
  • name - (recommended) - the name of the product.
  • variant - (recommended) - the name of the variant.
  • price - (recommended) - the price of the product excluding tax
  • currency - (recommended) - the currency of the product's price

Please ensure sku and parent_sku match the IDs used in your product feed is you are an Enterprise customer.

We also support the following but are optional:

  • brand - (optional) - the name of the brand
  • category - (optional) - a comma separated list of categories. Nested categories should be denoted by a >.

Additional Tracking

Some features of our product require further tracking. You can see these in the sidebar.