Paste the following script into the top of the head
tag of your html:
Be sure to replace __YOUR_CLIENT_ID__
with your Client ID, which you can find here
<script src=``https://config.metomic.io/config.js?id=__YOUR_CLIENT_ID__`` crossorigin charset=``utf-8``></script>
<script src=``https://consent-manager.metomic.io/embed.js`` crossorigin charset=``utf-8``>
Note that this script will only make the Consent Manager appear - this doesn’t make you compliant. The Consent Manager’s purpose is to clue your users into how you’re using data, and the source of truth for what information a user sees in it are the Micropolicies you create in the Dashboard.
A Micropolicy, simply put, is an agreement between you and your users as to how your organisation uses their data. These can be used for anything from Cookies to (at a later date) fleshing out a modular privacy policy and feature-walling until you have consent to use data in a specific way.
When you sign up we automatically suggest a set of commonly used Micropolicies after scanning your site. You can create custom Micropolicies after your onboarding.
You can create a custom Micropolicy after your initial setup by navigating to Micropolicies in the dashboard and clicking New Micropolicy in the top right.
We recommend you use consumer-friendly language that sells a user on a value add or feature rather than naming your Micropolicies boring things like ‘marketing’. This doesn’t mean lie to your users. Here are a handful of examples:
Bad name | Great name |
---|---|
Customer Support | Live Chat |
Analytics | User Insights |
Authentication | Login |
Each Micropolicy has a slug
(a human-readable id) attached to it, which will be the way by which you reference and track consents for particular featuresets in your product.
To block tracking technologies from running on your site until you’ve obtained user consent, you need to modify how your scripts are loaded in
Script locking is where you deliberately malform a script with Metomic attributes to disable it from running. The two attributes you’ll need to add per script are: type
and data-micropolicy
<script type=``text/x-metomic`` data-micropolicy=``POLICY-SLUG``>
// your code here
</script>
The type attribute allows the Consent Manager to recognise the script and the data-micropolicy attribute is where you should put the Micropolicy slug. The slug is the identifier for the Micropolicy so ensure you add the correct one, otherwise your users’ consents will be misinformed.
You may want to give your users the chance to revisit their settings. You can do so by calling:
Metomic('ConsentManager:show')