The Customer.io Gist Web SDK (current stable version 3.21.13) provides a robust solution for embedding rich, interactive in-app messages and multi-step flows directly into web applications. Acquired by Customer.io in July 2022, this SDK allows developers to leverage Customer.io's no-code message builder to design and deliver modals, banners, embedded content, and a persistent message inbox. The package maintains an active release cadence with patch, minor, and major versions, indicating regular updates and enhancements. Key differentiators include seamless integration with Customer.io campaigns, advanced route targeting, comprehensive user identification, event tracking for message lifecycle, and the ability to customize messages using user attributes. It enables use cases like user onboarding, feature announcements, and in-app support, simplifying complex in-app messaging logic.
npm install customerio-gist-webVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to install, initialize, identify a user, set the current route, and subscribe to message events using the Customer.io Gist Web SDK.
Review the official documentation and migration guides for your target major version. Test upgrades in a staging environment.
Ensure `await Gist.setup(...)` is completed before subsequent SDK calls. Example: `await Gist.setup(...); Gist.identify(...);`
Always pass valid `siteId` and `dataCenter` (e.g., 'us' or 'eu') in the `GistConfig` object during initialization. Check your Customer.io workspace settings for the correct `siteId`. Example: `{ siteId: process.env.GIST_SITE_ID, dataCenter: 'us' }`.Ensure you are using `import Gist from 'customerio-gist-web';` for ESM environments. If in a CommonJS context, consider a bundler that handles ESM or ensure proper transpilation.
Wrap calls to other SDK methods within an `async` function and `await Gist.setup()`, or chain them with `.then()` after `Gist.setup()`.
Provide the `siteId` string in the configuration object. Example: `Gist.setup({ siteId: 'your-site-id', dataCenter: 'us' });`No dependency data recorded yet.