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.
Recommended setup
| Website setup | Recommended consent setting |
|---|
| Tracking pixel | Auto |
| GTM Pixel | Auto |
| WordPress | Auto |
| GTM DataLayer | Google Consent Mode in the GTM template |
| Server-side form capture | Install 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.
Consent options
| Option | When to use it |
|---|
| Auto | Recommended. Octanist tries to detect consent from your consent banner or Google Consent Mode. |
| Granted | Use only when Octanist loads after the visitor has already granted consent. |
| Denied | Use when you need cookieless tracking and no marketing or analytics consent. |
| Manual variables | Use in GTM DataLayer setups when your website already exposes consent values. |
Supported consent sources
With Auto, Octanist checks for these consent sources:
| Source | Notes |
|---|
| Google Consent Mode | Read from dataLayer consent entries such as analytics_storage, ad_storage, ad_user_data, and ad_personalization. |
| Cookiebot | Read from window.Cookiebot.consent and Cookiebot accept/decline events. |
| CookieYes | Read from window.getCkyConsent() and CookieYes consent update events. |
| Complianz | Read from Complianz consent functions and banner events. |
| WordPress Consent API | Read from window.wp_has_consent() and WordPress consent events. |
| IAB TCF 2.2 | Used by CMPs such as OneTrust, Didomi, Usercentrics, and other CMPs that expose __tcfapi. |
| IAB GPP | Octanist reads the EU TCF section through __gpp when available. |
| Manual Octanist consent | Use 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.
Google Consent Mode
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.
Manual consent settings
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:
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.
Manual consent API
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.
Adjust consent for outgoing integrations
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:
- Open or create a Google Ads or Google Analytics integration.
- Open the Advanced tab.
- Enable the option to send converted leads with consent granted.
Only use this when you are confident the leads were legitimately collected with consent.