Skip to main content

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

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
withAttributesboolean Default: falseDetermines whether to include attributes in the product response. Note: might increase latency, so use only if you need product tags or attributes.
withProductVariantsboolean Default: falseDetermines whether to include variants in the product response. Note: might increase latency, so use only if you need product variants.