Skip to main content

Manage Cookie Consent for Cademy Embeds

Set up cookie consent for Cademy embeds, customise your Cademy banner, and check that tracking follows visitors’ choices.

Written by Artur Binzaru

How cookie consent works

A standard Cademy embed uses your website's cookie banner to control tracking inside the embed. It does not show a second banner. Cademy does not install a cookie banner on your website.

Without a recognised choice, embed tracking stays off. Visitors can still browse courses and use the available booking actions.

This guide covers standard iframe embeds. If you use the Cademy for WordPress plugin, see the WordPress section below.


Set up consent for your embeds

  1. Make sure your website has a working cookie banner. The supported tools are Cookiebot, OneTrust, CookieYes, Complianz, and banners that send Google Consent Mode updates. Installing Google Tag Manager alone is not enough.

  2. In your Cademy dashboard, open Apps and select Cademy Embeds to open the Embeds page. If this is your first time using it, select Install. Then choose Multiple Courses, A Single Course or A Form. Select the course, collection or form where required, then select Get Code.

  3. In Add This Embed to Your Website, choose Your Platform and follow the Steps. Install the embed and Helper Script - Once Per Site as instructed. The helper passes the visitor’s choice to the Cademy embeds on your website.

  4. Open Cademy dashboard > Settings > Custom Code. Enter the tracking IDs you use in Google Analytics 4 ID, Google Tag Manager ID or Facebook Pixel ID, then select Save. Facebook Pixel ID is the field for Meta Pixel.

Add This Embed to Your Website showing platform, embed code and helper script


Choose your platform and copy the code from your own Cademy account.


The tracking settings require access to the Custom Code feature. For platform-specific installation steps, see Embed Cademy Courses on Your Website.


Under Apps > Embeds > Cookie consent on your website, Nothing to do means a tool supports automatic detection. This is a list of supported tools, not a check of your website. Your banner and helper must still be installed correctly. There is no additional consent switch to turn on in Cademy.

Cookie consent on your website showing supported cookie banner tools

Supported banner tools appear here. This list does not confirm a connection to your website.


For another banner, or a customised setup that is not detected, use the developer instructions below.


What each choice allows

Visitor’s choice

Configured Cademy tracking

Analytics allowed

Google Analytics 4 can load. Attribution information, such as campaign details, can pass to Cademy.

Marketing allowed

Meta Pixel can load.

Either category allowed

Google Tag Manager can load. Configure the tags inside your GTM container to respect the visitor’s consent.

No recognised choice, or both rejected

On a fresh page load, the configured GA4, GTM and Meta Pixel scripts stay off.

Visitors change their choice through your website's banner or cookie preferences. The helper passes recognised changes to every Cademy embed on the page.


Cademy updates Google's consent signals and revokes Meta consent when appropriate. Tags loaded earlier can remain until the page is reloaded. To check that tracking stays off after rejection, reload the page.


These rules cover tracking added through Cademy. Scripts installed separately on your website, including other WordPress plugins, need their own consent setup.


WordPress and checkout

Standard iframe on WordPress: follow the setup above, including the helper script.


Cademy for WordPress plugin: its native course listings and course pages do not use the iframe helper or add Cademy tracking JavaScript or cookies while visitors browse. See Cademy for WordPress: Embed Courses on Your Website.


Separate Cademy checkout: this uses its own consent controls and any valid choice already saved for that Cademy host. It may show a banner even after a visitor has chosen on your website. Use Cookie Settings on the Cademy page to review the choice.


If booking opens an external website, that website uses its own consent setup.


Customise your Cademy banner

These settings change the banner on your Cademy minisite and checkout. They do not change your website's banner.

  1. Open Cademy dashboard > Settings > Custom Code > Cookie Consent.

  2. Enter a Banner Message of up to 300 characters, or leave it blank for the default wording.

  3. Enter a full address starting with https:// in Cookie Policy Link, or leave it blank to use Cademy’s cookie policy.

  4. Select Preview Banner, then Save Changes. This saves the banner settings separately from the tracking IDs.

Banner colours follow your brand colour under Cademy dashboard > Profile. A minisite without configured tracking IDs does not show the tracking-consent banner.

Cookie Consent settings and Caledonia Academy banner preview


Check your setup

  • Open the published website page containing the embed in a fresh private browser window. Test there, rather than in the preview in your Cademy dashboard.

  • Accept the categories you use, then change your choice through the website's cookie preferences. Reload after rejecting to test a page where tracking has not already loaded.

  • If Get Code is unavailable, select the course, collection or form required by your chosen embed type.

  • If tracking stays off after accepting, check that the correct tracking IDs are saved in Settings > Custom Code and the helper is installed. Your website administrator can use the checks below to confirm the choice reaches Cademy.

  • If consent reaches Cademy but tracking is missing, check the tag configuration and browser privacy settings or blockers. Clear your website’s cache if it is serving an old helper script.

If your website administrator needs to investigate, give them the published page address, the banner tool’s name, and the choice you tested.


For developers: connect a custom banner

Find the example at Cademy dashboard > Apps > Embeds > Cookie consent on your website > For Developers. Call this function on the website page containing the iframe, after the helper loads, using the visitor’s actual choices:

CademyEmbed.setConsent({
  analytics: true,
  marketing: false
});


This example means Analytics allowed, Marketing rejected. Set each value to true only when the visitor allows that category. To reject both, pass false for both.

  • Pass the banner's saved choice on each page load, and call again whenever it changes.

  • Use booleans, not strings. Do not grant consent automatically just because the page loaded.

  • An explicit call overrides automatic detection for the rest of that page view. Your callback must keep it in sync with the banner.

Automatic detection uses the first recognised answer in this order: Google Consent Mode, Cookiebot, OneTrust, CookieYes, then Complianz.

Supported signals

Use these read-only checks in the host page’s browser Console. They inspect the banner; they do not grant consent.

Source

Read-only check

What Cademy reads

Google Consent Mode

window.dataLayer

Consent updates: analytics_storage: granted allows Analytics; ad_storage: granted allows Marketing when ad_user_data and ad_personalization are not denied.

Cookiebot

window.Cookiebot && window.Cookiebot.consent

statistics and marketing, after hasResponse, consented or declined indicates a response.

OneTrust

window.OnetrustActiveGroups

C0002 for Analytics and C0004 for Marketing, once OptanonAlertBoxClosed exists.

CookieYes

document.cookie.split("; ").find(c => c.startsWith("cookieyes-consent="))

analytics:yes and advertisement:yes, once action:yes or consent:yes is present.

Complianz

document.cookie.split("; ").filter(c => /^cmplz_(statistics|marketing)=/.test(c))

cmplz_statistics and cmplz_marketing, with allow granting the corresponding category.


For developers: verify consent and tracking

In the browser Console, select the website page containing the embed, not the iframe, and run:

CademyEmbed.getConsent();
CademyEmbed.getConsentSource();
  • null: no recognised choice has been found. Check the banner’s supported signals. A Google Consent Mode default command alone is not a completed choice; the helper reads consent updates in window.dataLayer.

  • { analytics: false, marketing: false }: both categories are denied. If a previously detected choice disappears, the source can show withdrawn.

  • true for a category: The helper has recognised permission for that category. The source identifies which integration supplied it. Use the Network check below to confirm the iframe’s tracking behaviour.

  • If CademyEmbed or either function is undefined, check that the helper loaded, that you selected the host page in the Console, and that an old script is not being served from cache.

In Network, inspect requests from the Cademy iframe separately from your website’s own scripts: gtag/js for GA4, gtm.js for GTM, and fbevents.js for Meta Pixel.


Test both categories allowed, Analytics only, and both rejected, reloading between checks. Compare requests with the table above and the tracking IDs actually configured. Browser blockers can prevent requests even after consent.


Frequently asked questions

Why is there no banner inside the embed?
That is expected. The embed uses your website’s recognised choice. Without one, its tracking stays off.

Why does GTM load when Marketing is off?
GTM can load when Analytics is allowed. Tags inside your container must be configured to respect consent. The separately configured Meta Pixel does not load on a fresh page when Marketing is rejected.

Does accepting cookies subscribe someone to emails?
No. Cookie consent and marketing-email choices at checkout are separate.

Did this answer your question?