<
HomeSalesfire integrates with any eCommerce platform, working alongside your existing setup to harness the latest in website personalisation.
Salesfire can integrate into your bespoke website quickly and easily with the ability to install through Google Tag Manager. If you don’t use GTM, follow our below guide for another manual method of integrating Salesfire on a bespoke platform:
<script async src="https://cdn.salesfire.co.uk/code/[YOUR SITE ID].js"></script>
2. Get your Site ID from within the Salesfire Dashboard under Preferences.
Learn more about integrating via Google Tag Manager.
In most cases, we are able to automatically detect orders if you are using Google Analytics on your order success page. However, in some instances, we are not able to see this data so are unable to track orders immediately.
To help support tracking we have the below example code.
Note: When adding the code to your site, you need to strip out the example data we provide, replacing it with the platform's dynamic values. Without this, we will be unable to track the individual orders and items within them.
Add this code to the checkout success page of your website:
<script> window.sfDataLayer = window.sfDataLayer || []; window.sfDataLayer.push({ "ecommerce" : { "purchase": { "id": "WEB1234", "revenue": 75.00, "shipping": 5.00, "tax": 15.00, "currency": "GBP", "products":[ { "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 } ] } } }); </script>
<script> window.sfDataLayer = window.sfDataLayer || []; window.sfDataLayer.push({ "ecommerce" : { } }); </script>
Everything is added within the opening script tag and array as per the above snippet. We build on this by adding the purchase information within the eCommerce section and then adding the product data within the purchase section.
<script> window.sfDataLayer = window.sfDataLayer || []; window.sfDataLayer.push({ "ecommerce" : { "purchase": { "id": "WEB1234", "revenue": 75.00, "shipping": 5.00, "tax": 15.00, "currency": "GBP", "products":[ ] } } }); </script>
This section contains the monetary run through of the order to enable us to track order value. Below, we have given a brief description of each individual field in the purchase section of the data layer.
<script> window.sfDataLayer = window.sfDataLayer || []; window.sfDataLayer.push({ "ecommerce" : { "purchase": { "id": "WEB1234", "revenue": 75.00, "shipping": 5.00 "tax": 15.00, "currency": "GBP", "products":[ { "sku": "220165", "parent_sku": "220164", "name": "Product Title", "variant": "Colour: Red, Size: Small", "price": 75.00, "quantity": 1, "currency": "GBP" } ] } } }); </script>
This section contains the data related to the individual products purchased as part of the order. Below, we have given a brief description of each individual field in the purchase section of the data layer.