Skip to content

This repository contains a modified version of Digital Sparks' Cookie Consent Boost script (index.js) with a corrected mapping for ad personalization. The fix ensures that ad_personalization is only enabled when "Marketing" consent is granted, aligning with Google Consent Mode best practices.

License

Notifications You must be signed in to change notification settings

StephanRyatt/fs-cc-gtm-integration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Finsweet Cookie Consent GTM Integration

📝 Description

This repository provides a fixed and enhanced integration between Finsweet's Cookie Consent script (fs-cc.js) and Google Tag Manager (GTM). It ensures that consent settings from Finsweet’s system are correctly mapped and pushed to GTM for compliance with Google Consent Mode, GDPR, and CCPA.

Why This Fix?

By default, Digital Sparks' Cookie Consent Boost script (index.js) incorrectly linked ad_personalization to "Personalization" instead of "Marketing." Since this script pushes consent updates to GTM, incorrect mapping leads to inaccurate tracking behavior in Google Ads and Analytics.

This fix ensures:

  • Accurate Google Consent Mode behavior – GTM receives correct consent signals for tracking.
  • Full GDPR & CCPA Compliance – Prevents unauthorized tracking based on user consent.
  • Reliable Webflow + GTM Integration – Ensures consent settings are correctly reflected in GTM, Google Ads, and Analytics.

📦 How to Use

✅ Option 1: Use jsDelivr CDN (Recommended)

The easiest way to integrate this fix is by loading the scripts via jsDelivr:

<script async src="https://cdn.jsdelivr.net/gh/StephanRyatt/fs-cc-gtm-integration/fs-cc-fixed.js" fs-cc-mode="opt-in"></script>
<script async src="https://cdn.jsdelivr.net/gh/StephanRyatt/fs-cc-gtm-integration/index-fixed.js"></script>

🚀 Why use jsDelivr?

  • No hosting required.
  • Fast, global CDN.
  • Automatically caches the latest version when updated.

🔄 Option 2: Self-Host the Scripts (For Full Control)

Prefer to host the scripts yourself? Follow these steps:

  1. Download the files:
  2. Upload them to your own server.
  3. Update your script references in Webflow or your website.

💡 Advanced users: If modifying further, fork this repo and update your jsDelivr links accordingly.


🛠 How It Works

This integration ensures that consent preferences are correctly passed to Google Tag Manager (GTM):

ad_personalization: window.FsCC.store.consents.marketing ? "granted" : "denied",

This prevents ad personalization from being incorrectly tied to "Personalization" and ensures only "Marketing" consent enables ad-related cookies.

Since index-fixed.js updates GTM’s dataLayer, Google Ads, Analytics, and other tools receive the correct consent signals, preventing unauthorized tracking and maintaining compliance.

📌 Key Fixes

  • 🛠 ad_personalization now aligns with "Marketing" consent.
  • ⚡ Ensures Google Consent Mode, GDPR, and CCPA compliance.
  • 🔄 Fully compatible with Webflow, GTM, and Google Analytics.

❓ Need Help?

Open an issue in this repo or reach out for support! 🚀

About

This repository contains a modified version of Digital Sparks' Cookie Consent Boost script (index.js) with a corrected mapping for ad personalization. The fix ensures that ad_personalization is only enabled when "Marketing" consent is granted, aligning with Google Consent Mode best practices.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published