Getting Started
Installation​
CDN Global Script: Insert the following script at the head of your site
Latest Version
<script src="https://assets.fastsimon.com/sdk/latest/fast_simon_sdk.js" defer></script>
NPM Package (Recommended)
npm install fast-simon-sdk
Initialization - CDN​
Insert the following script at the head of your site as an defer script after the original script injection
// using a cdn script will bind FastSimonSDK to window
<script>
document.addEventListener("DOMContentLoaded", function () {
window.FastSimonSDK.initialization({
storeID: 123, // store-id,
uuid: "this-is-my-uuid", // uuid
type: "SPA", // multi page application ("MPA") or single page application("SPA") (for reporting)
onReady: () => {
// do stuff
}
});
});
</script>
Initialization - NPM Package​
import {FastSimonSDK} from "fast-simon-sdk"
// using a cdn script will bind FastSimonSDK to window
FastSimonSDK.initialization({
storeID: 123, // store-id,
uuid: "this-is-my-uuid", // uuid
type: "SPA", // multi page application ("MPA") or single page application("SPA") (for reporting)
onReady: () => {
// do stuff
}
});
Options​
Option | Type | Description |
---|---|---|
storeID | number (required) | can be found in the Fast Simon dashboard > Settings |
uuid | string (required) | can be found in the Fast Simon dashboard > Settings |
type | AppType | reporting flag - single page application or multi page application |
onReady | () => void | callback - runs when the initialization is finished |
cartToken | string | the initialization extracts a token automatically, use this option if you want to use your own value |