How to Test the Plugin

Plugin can test IBS Consent Mode Manager directly from the browser's Developer Console.

1. Open the Browser Console

Open your website and press:

Chrome/Edge: F12 → Console
or
Right-click → Inspect → Console

2. Check the Plugin Configuration

Run:

window.cacmConfig

You should see the plugin configuration, including values such as:

{  cookieName: "...",  gtmId: "...",  blockingMode: "strict" // or "soft" }

3. Check the Consent Cookie

Run:

document.cookie

4. Check Google Consent Mode

Run:

window.dataLayer

5. Test Accept All

First remove the existing consent cookie:

document.cookie = "Ibs_Consent_Mode_Manager_consent=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; location.reload();

After the banner appears, click Accept and then run:

document.cookie

Verify that the consent cookie contains:

"analytics":"granted" "advertising":"granted"

Then check:

window.dataLayer

The latest consent update should show the corresponding Google Consent Mode values as granted.

6. Test Reject All

Clear the cookie and reload:

document.cookie = "Ibs_Consent_Mode_Manager_consent=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; location.reload();

Click Reject and check:

document.cookie

The consent values should be:

"analytics":"denied" "advertising":"denied"

Then check whether GTM has loaded:

[...document.scripts].some(s => s.src.includes("googletagmanager.com/gtm.js"))

In Strict Mode, this should return:

false

when both Analytics and Advertising are denied.

7. Test GTM Loading in Strict Mode

After clearing the cookie and reloading, run:

[...document.scripts]  .filter(s => s.src.includes("googletagmanager.com/gtm.js"))  .map(s => s.src)

Before consent, no GTM URL should be returned when both categories are denied.

After granting consent, run the same command again. The GTM script URL should be present.

8. Test Soft Mode

Check the configured mode:

window.cacmConfig.blockingMode

It should return:

"soft"

In Soft Mode, GTM should load even before the visitor makes a consent choice.

Check with:

[...document.scripts]  .filter(s => s.src.includes("googletagmanager.com/gtm.js"))  .map(s => s.src)

The GTM script should be present, while the initial Google Consent Mode state should remain denied until the visitor makes a consent choice.

9. Reset the Test

To test the banner again, remove the consent cookie and reload:

document.cookie = "Ibs_Consent_Mode_Manager_consent=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"; location.reload();

We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies

More