UniConsent
Updated on 2024-09-05
UniConsent Script (UnicScript) is a metadata script designed by UniConsent CMP and available on the sites installed UniConsent CMP. It allows website owners and publishers to manage the third party scripts or other on-page elements based on the user's consent choices.
How to make your website GDPR CCPA compliant with UnicScript
A third party script will be loaded or not loaded based on GEO location, the privacy law requirement of the location and the user's consent status. You can set up privacy compliance rules within the UniConsent dashboard.
UnicScript makes it easier for the publishers who are not managing third party scripts with Google Tag Manager or don't like to manage these with the tag manager within UniConsent CMP.
You can modify the third-party scripts on your page by adding some UnicScript metadata for integration and conversion.
<script type="text/unicscript" unic-purpose-id="1">
console.log('purpose 1 is allowed, the script is executed.');
</script>
or
<script
async
src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"
unic-purpose-id="3"
type="text/unicscript"
></script>
You can also use the format: unic-purpose-ids="1,2,3" for multiple ids.
Iframe example:
<iframe data-unicscript unic-purpose-ids="1,2" width="560" height="315" data-src="https://www.youtube.com/embed/KMX_FuOLoCI" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<script type="text/unicscript" unic-vendor-id="1">
console.log('uniconsent custom vendor 1 is allowed, the script is executed.');
</script>
<script type="text/unicscript" unic-gcm-id="functionality_storage">
console.log('purpose 1 is allowed, the script is executed.');
</script>
You can also use the format: unic-gcm-ids="analytics_storage,ad_user_data" for multiple ids.
Iframe example:
<iframe data-unicscript unic-gcm-ids="functionality_storage,ad_personalization" width="560" height="315" data-src="https://www.youtube.com/embed/KMX_FuOLoCI" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
As a publisher, you have multiple ways to integrate your website with UniConsent: Google Tag Manager, UniConsent Tag Manager or UnicScript. You can find more details in the document section within your UniConsent dashboard.
UniConsent is a part of Transfon User Experience Platform serves tens of millions of users per day to provide a seamless privacy experience for both users and publishers in the age of post GDPR. Contact us to know more: hello@uniconsent.com
Compliant with GDPR, CCPA, COPPA, LGPD, PECR, PDPA, PIPEDA, and more.
Activate Google Consent Mode UniConsent to enhance the accuracy of your Google Analytics and Google Ads conversion data.
Set up Google Consent Mode →Get started to make your website and application compliant for EU GDPR, US CPRA, CA PIPEDA etc
Sign up
IAB TCF 2.3: Key Updates for Publishers and Advertisers

GPP National v2 for Publishers: Simplifying U.S. Privacy Compliance with Google Ads
Maximize Google Ads ROI with Consent Mode Support from UniConsent

Why Consent Management Matters for Mobile Apps in 2025

Google Consent Mode v2 Enforcement Is Here and How to Stay Compliant and Preserve Your Conversions

UniConsent Now Supports the WP Consent API for Enhanced Privacy Compliance
Get started to make your website and application compliant for EU GDPR, US CPRA, CA PIPEDA etc
Sign up