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.
Get started to make your website and application compliant for EU GDPR, US CPRA, CA PIPEDA etc
Sign up
Tinder's €11M DPC Fine: A Self-Service Data Download Must Say What It Leaves Out

Safari Global Privacy Control in iOS 27.3: Getting Your Consent Banner Ready for GPC
FedEx $2.975M CCPA Fine: Cookie Settings That Didn't Stop Ad Trackers or Honour GPC
Coca-Cola Cookie Lawsuit: Lessons on Making "Reject" Stop the Trackers

Session Replay and GDPR: Configuring Hotjar, Clarity and FullStory

Server-Side Tagging and Tracking: Why GDPR Consent Still Applies
Get started to make your website and application compliant for EU GDPR, US CPRA, CA PIPEDA etc
Sign upPrivacy laws, consent and compliance updates, a few emails a month.