Knowledge Center Blog
  • Theme
  • Auto
  • Light
  • Dark
English EN (US)
Language ✕
  • Deutsche
  • Eesti
  • English
  • Español
  • Français
  • Hrvatski
  • Italiano
  • Latviešu
  • Lietuvių
  • Lëtzebuergesch
  • Malti
  • Nederlands
  • Português (BR)
  • Português (PT)
  • Română
  • Slovenčina
  • Slovenščina
  • Srpski
  • Suomi
  • Türkçe
  • Ελληνικά
  • Български
  • Русский
  • Українська
Log in
Developers Blog
Log in
Home Developers JavaScript client Tracking and consent
Search
Developers
JavaScript client
  • Overview
  • Installing the client
  • Constructor options
  • Checkout modes
  • Opening the checkout
  • Events
  • Methods reference
  • Tracking and consent
  • Advanced embed options
  • Troubleshooting
REST API (v2)
PHP SDK
Node.js SDK
Python SDK
WordPress plugin
JavaScript client

Tracking and consent

Pass campaign and attribution parameters through to the checkout, and control the terms notice shown to first-time buyers.

description View as Markdown

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.

JavaScript
1234
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:

JavaScript
12
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:

JavaScript
1
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:

JavaScript
1234567
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:

JavaScript
123
entase.on('checkout.consent', payload => {
  if (payload.data.consent) console.log('accepted');
});

Skipping the step

collectConsent: false suppresses the notice:

JavaScript
1
const entase = new Entase({ pk: 'YOUR_PUBLISHABLE_KEY', collectConsent: false });

Or for one booking:

JavaScript
1
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.

Previous Methods reference Next Advanced embed options
Was this article helpful?
On this page
  • Tracking parameters
  • Forwarding parameters from your own URL
  • Segments
  • Consent
  • Skipping the step
Learn how to Entase.
© 2026 Entase, Inc.

Entase

  • Events
  • Sign up

Platform

  • Pricing
  • Global reach
  • Integration
  • Marketing tools
  • Booking tools
  • Collaboration

Use cases

  • Theater and opera
  • Concerts and parties
  • Expos, fairs and festivals
  • Museums and attractions
  • Tours and experiences
  • Workshops and seminars
  • Fundraising
  • Tournaments

Knowledge center

  • Organizers
  • Attendees
  • Developers
  • Blog

Legal

  • Terms of use
  • Privacy policy
  • Cookies policy
search Questions? Search
auto_awesome LLM? Read llms.txt
support_agent Need help? Start chat