docs
Getting Started

How Metomic works

Integrating the Consent Manager

Paste the following script into the head tag of your html:

Be sure to replace __YOUR_CLIENT_ID__ with your clientId, which you can find here

<script>
  !(function(p,r,i,v,a,c,y){p['MetomicObject']=a;p[a]=p[a]||function(){
  (p[a].q=p[a].q||[]).push(arguments)},p[a].l=1*new Date();c=r.createElement(i),
  y=r.getElementsByTagName(i)[0];c.async=1;c.src=v+'?d='+r.location.host;y.parentNode.insertBefore(c,y)
  })(window, document, 'script', 'https://consent-manager.metomic.io/embed.js', 'Metomic');
  Metomic('load', { projectId: '__YOUR_CLIENT_ID__' });
</script>

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.

Creating Micropolicies

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.

Creating a Custom Micropolicy

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.

Good practice

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 nameGreat name
Customer SupportLive Chat
AnalyticsUser Insights
AuthenticationLogin

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.

Blocking Problem Scripts

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

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.

Re-raising the Consent Manager

You may want to give your users the chance to revisit their settings. You can do so by calling:


Metomic('ConsentManager:show')