Script API
Consent API
Integrate Tugus with your own consent manager or the built-in banner.
Integration with your own consent manager or the bundled Tugus banner.
// Set consent (after user confirmation)
tugus.setConsent({
analytics: true,
marketing: true,
necessary: true,
})
// Read the current consent
const consent = tugus.getConsent()
// → { analytics: true, marketing: false, necessary: true }
// Google Consent Mode v2 — automatic via gtag() hook
// Tugus automatically reads gtag('consent', 'update', {...})
// No additional code required if GCM is configuredWithout consent set, Tugus does not send any marketing events. pageview is
always sent, as it is technically necessary.