Skip to main content
Consent mode tells Octanist whether a visitor has allowed marketing or analytics tracking. Octanist uses this consent state when leads are sent to outgoing platforms such as Google Ads and Google Analytics. Use Auto unless you have a specific reason to choose another option.
Website setupRecommended consent setting
Tracking pixelAuto
GTM PixelAuto
WordPressAuto
GTM DataLayerGoogle Consent Mode in the GTM template
Server-side form captureInstall the pixel with Auto and send the session ID with the form
If no consent state is available, Octanist treats consent as denied. This protects users, but it can reduce attribution in Google Ads and Google Analytics.
OptionWhen to use it
AutoRecommended. Octanist tries to detect consent from your consent banner or Google Consent Mode.
GrantedUse only when Octanist loads after the visitor has already granted consent.
DeniedUse when you need cookieless tracking and no marketing or analytics consent.
Manual variablesUse in GTM DataLayer setups when your website already exposes consent values.
With Auto, Octanist checks for these consent sources:
SourceNotes
Google Consent ModeRead from dataLayer consent entries such as analytics_storage, ad_storage, ad_user_data, and ad_personalization.
CookiebotRead from window.Cookiebot.consent and Cookiebot accept/decline events.
CookieYesRead from window.getCkyConsent() and CookieYes consent update events.
ComplianzRead from Complianz consent functions and banner events.
WordPress Consent APIRead from window.wp_has_consent() and WordPress consent events.
IAB TCF 2.2Used by CMPs such as OneTrust, Didomi, Usercentrics, and other CMPs that expose __tcfapi.
IAB GPPOctanist reads the EU TCF section through __gpp when available.
Manual Octanist consentUse window.OCT.setConsent(), window.octanistConsent, or the octanist:consent event.
For CMPs such as OneTrust, Didomi, and Usercentrics, the important part is whether the CMP exposes IAB TCF 2.2 or Google Consent Mode. Octanist does not need a separate private integration for each CMP when one of those standards is available.

Tracking pixel and GTM Pixel

For the normal tracking pixel and GTM Pixel setup, set consent mode in the script shown in Settings > Pixel Setup.
<script
  src="https://c.octani.st/p"
  data-id="OCT-XXXXXXXX"
  data-consent-mode="auto"
  data-forms="true"
></script>
Use data-consent-mode="auto" for most websites. If your consent banner blocks all tracking scripts until consent is granted, you can use granted when loading Octanist only after consent. If you are not sure, keep auto. For custom consent banners, use the Client-side API to update consent manually.

WordPress

For WordPress, choose the consent mode in Settings > Pixel Setup before copying the WordPress setup code. The setup code stores the selected consent mode, so you only need to paste the full code into Settings > Octanist in WordPress.

GTM DataLayer

The GTM DataLayer setup uses the Octanist GTM template. The template has a dedicated consent tab with two options. Use this when your site already has Google Consent Mode through a consent management platform or a GTM consent tag. The Octanist tag reads the existing consent state and sends the lead with the correct consent value.
Octanist GTM consent mode option
Use this when you do not use Google Consent Mode, but your website exposes a consent value in GTM. The variable should return exactly one of these values:
  • Granted
  • Denied
Manual consent settings in the Octanist GTM template

Server-side form capture

For server-side form capture, keep the pixel installed on the website so Octanist can read the visitor’s consent state. When your backend sends the lead, include the sessionId from the hidden octa_sid field. Octanist can then link the server-side lead to the browser session and its consent state. See Server-side form capture for the full setup. Use the manual consent API when your consent banner has its own JavaScript callback and Octanist cannot detect it automatically.
window.OCT.setConsent({
  analytics: true,
  marketing: true,
  source: "custom_banner",
});
If the consent callback can run before the pixel has loaded, set window.octanistConsent before the pixel script or dispatch the octanist:consent event. See Client-side API for examples. Octanist allows you to override consent for leads sent to Google Ads or Google Analytics in specific cases. Use this only when you know the leads were collected with valid consent, but the consent state was not recorded correctly. For example:
  • Consent mode was not installed correctly at the time.
  • A consent banner issue prevented consent from being stored.
  • Consent was collected somewhere else and verified separately.
To adjust this:
  1. Open or create a Google Ads or Google Analytics integration.
  2. Open the Advanced tab.
  3. Enable the option to send converted leads with consent granted.
Only use this when you are confident the leads were legitimately collected with consent.
Override consent settings in Octanist

More information