Skip to main content

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

OptionTypeDescription
storeIDnumber (required)can be found in the Fast Simon dashboard > Settings
uuidstring (required)can be found in the Fast Simon dashboard > Settings
typeAppTypereporting flag - single page application or multi page application
onReady() => voidcallback - runs when the initialization is finished
cartTokenstringthe initialization extracts a token automatically, use this option if you want to use your own value