Quick Start
This quick start covers the most common retailer integration path: Assistant Manager, Size Button, and Tracking Pixel.
Add the Assistant Manager
Add the Assistant Manager script to all pages where StrutFit will be used, alternatively we recommend you add it to <head> and have it load on all pages:
<script
src="https://store-assistant-assistantmanager.strut.fit"
async
data-organization-id="{{OrganizationId}}"
></script>Replace {{OrganizationId}} with your organization id which you can find in the StrutFit dashboard or get from your StrutFit account manager.
Learn more: Assistant Manager Guide
Add StrutFit components
Each component script only needs to be included once per page. You can then place as many instances of the component element as you need (e.g. one per product).
Add the Tracking Pixel on order confirmation
On your order confirmation/checkout success page, add the tracking pixel and pass real order values:
<div id="strutfit-pixel-container"></div>
<script type="text/javascript" src="https://pixel.strut.fit"></script>
<script>
var sfDivId = 'strutfit-pixel-container';
var organizationUnitId = {{OragnizationUnitId}};
// MOCK DATA -- Replace these with real values
var orderReference = '#6001';
var orderValue = 99.99;
var currencyCode = 'USD';
var items = [
{
sku: "123-42",
productIdentifier: {{ProductIdentifier}},
price: 99.99,
quantity: 1,
size: "43 EU"
}
];
// Optional parameters
var region = 'US';
var userEmail = 'test@gmail.com';
var fireSFPixel = function loadStrutFitPixelCall() {
if (typeof fireStrutFitPixel === "function") {
fireStrutFitPixel({
divId: sfDivId,
strutFitData: getStrutFitData(),
organizationUnitId: organizationUnitId,
orderRef: orderReference,
orderValue: orderValue,
items: items,
currencyCode: currencyCode,
userEmail: userEmail,
region: region,
});
return;
};
setTimeout(function () {
fireSFPixel();
}, 1000);
};
fireSFPixel();
</script>items[].productIdentifier must match the product identifier used for the size button.
Learn more: Tracking Pixel Guide
Validate the full flow
- Visit a product page and confirm the size button appears (remember you also must have the product integrated in StrutFit with a valid size chart for this).
- Click the size button and confirm the assistant opens.
- Complete a test order and confirm the tracking pixel sends
orderReference,orderValue,currencyCode,items, andorganizationUnitId. - Confirm values are real page variables and not placeholder strings.