Documentation
Environments
Use PRODUCTION on any plan, and use DEVELOPMENT or STAGING on Growth, Scale, and LTD plans.
Supported environment values
DEVELOPMENT: local/dev testing messages on Growth, Scale, and LTD plans.STAGING: preview/UAT/staging messages on Growth, Scale, and LTD plans.PRODUCTION: live production messages on all plans.
SDK option
- Use
envto chooseDEVELOPMENT,STAGING, orPRODUCTION.
Snippetts
import { initSpryUi } from "https://spryui.com/sdk/v1/index.mjs";
initSpryUi({
publicKey: "pk_...",
host: window.location.host,
apiBaseUrl: "https://spryui.com/api/sdk/v1",
env: "STAGING",
});Recommended deployment mapping
- Local host / developer machines ->
DEVELOPMENT. - Preview branches / staging domain ->
STAGING. - Primary production domain ->
PRODUCTION.
Snippetts
import { initSpryUi } from "https://spryui.com/sdk/v1/index.mjs";
const sdkEnv =
window.location.hostname === "localhost"
? "DEVELOPMENT"
: window.location.hostname.includes("staging")
? "STAGING"
: "PRODUCTION";
initSpryUi({
publicKey: "pk_...",
host: window.location.host,
apiBaseUrl: "https://spryui.com/api/sdk/v1",
env: sdkEnv,
});Validation checklist
- Message is Active in the same target environment.
- SDK init uses the expected
envvalue. - Host/domain is verified for the project key.
- If no message renders, check SDK Debugging and confirm environment in runtime context.