Tracking parameters
tprm is an object of parameters carried through to the checkout, where they are recorded against the resulting order. Use it to attribute sales to a campaign, a page, or a sales channel.
const entase = new Entase({
pk: 'YOUR_PUBLISHABLE_KEY',
tprm: { utm_source: 'newsletter', utm_campaign: 'spring-season' }
});Change them at any point — the values in place when book() is called are the ones used:
entase.setTracking({ utm_source: 'facebook', sgm: 'SEGMENT_CODE' });
entase.getTracking(); // { utm_source: 'facebook', sgm: 'SEGMENT_CODE' }setTracking() replaces the whole object rather than merging into it. To add one parameter, spread the current set:
entase.setTracking({ ...entase.getTracking(), utm_content: 'sidebar' });Forwarding parameters from your own URL
The client does not read your page's query string. If a visitor arrives on yoursite.com/concert?utm_source=facebook and you want that attribution on the order, forward it yourself:
const params = new URLSearchParams(window.location.search);
const forward = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'sgm'];
const tprm = {};
forward.forEach(key => { if (params.has(key)) tprm[key] = params.get(key); });
const entase = new Entase({ pk: 'YOUR_PUBLISHABLE_KEY', tprm });The embed widget does this automatically for a fixed list of parameters. See Advanced embed options.
Segments
sgm carries a segment code, which groups sales by channel or campaign in your statistics. Segments are created in your Entase account, not here — see Segments overview and Creating and managing segments.
Consent
The checkout asks first-time buyers to accept the Entase terms notice. Once accepted, the answer is stored in a cookie and the step is skipped on later visits, including on other sites using Entase.
You can observe it:
entase.on('checkout.consent', payload => {
if (payload.data.consent) console.log('accepted');
});Skipping the step
collectConsent: false suppresses the notice:
const entase = new Entase({ pk: 'YOUR_PUBLISHABLE_KEY', collectConsent: false });Or for one booking:
entase.book('EVENT_ID', { collectConsent: false });Only do this when your own checkout flow already collects the equivalent agreement — the requirement does not go away because the notice is hidden. Leave it enabled by default.
The stored acceptance is re-checked against the date the terms last changed, so a visitor who accepted an older version is asked again. Suppressing the notice suppresses that too.