Hellotext SDK for VTEX Checkout. Captures shopper identity during the checkout funnel — where the standard Hellotext pixel cannot run — by listening to VTEX's orderFormUpdated events and calling Hellotext.identify.
VTEX's checkout is a separate SPA from the storefront. The Hellotext pixel only runs on the storefront, so it never sees shoppers entering their email, phone, or name during checkout. This SDK bridges that gap, enabling identity capture and abandoned checkout attribution.
Add the following script tag to your VTEX checkout configuration (Admin > Checkout > Code > checkout6-custom.js):
// Hellotext Checkout Funnel
(function () {
var script = document.createElement("script");
script.src =
"https://cdn.jsdelivr.net/npm/@hellotext/vtex-checkout@1/dist/funnel.js";
script.onload = function () {
Hellotext.initialize("YOUR_BUSINESS_ID");
};
document.head.appendChild(script);
})();Replace YOUR_BUSINESS_ID with your Hellotext business ID.
- Initializes the Hellotext SDK with your business ID.
- Subscribes to VTEX's
orderFormUpdated.vtexjQuery event, which fires on every checkout state change. - Extracts the shopper's profile (
email,phone,firstName,lastName,document) from theorderForm.clientProfileData. - Calls
Hellotext.identifyas soon as an email or phone is available.
yarn install
yarn build # produces dist/funnel.js and dist/confirmation.js
yarn test # runs jest