Getting Started
Installation & Initialization - CDN
CDN Global Script: Insert the following script at the head of your site
Latest Version
<script>
window.__fast_simon_sdk_config = {
store_uuid: "this-is-my-uuid",// uuid
store_id: 123,// store-id,
type: "MPA",// multi page application ("MPA") or single page application("SPA") (for reporting)
onReady: () => {// do stuff}}
</script>
<script src="https://assets.fastsimon.com/sdk/latest/fast_simon_sdk.js" defer></script>
NPM Package (Recommended)
npm install fast-simon-sdk
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 |
withAttributes | boolean Default: false | Determines whether to include attributes in the product response. Note: might increase latency, so use only if you need product tags or attributes. |
withProductVariants | boolean Default: false | Determines whether to include variants in the product response. Note: might increase latency, so use only if you need product variants. |