Please note: Metomic will load and display faster if you install it directly into the head of your webpage, as described in the section Installing the Consent Manager. This will not affect Metomic's ability to interact with GTM
In your GTM project, create a new tag by clicking New → Custom HTML Tag
In the HTML field, enter your Metomic embed snippet:
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>
To help identify the tag later, ensure you provide a name at the top of the page (e.g. "Metomic Embed Code")
Under Triggering, choose All Pages as the trigger
Your configuration is now ready to save, and should look something like this:
Once you've saved the tag, ensure you click Submit → Publish to push the change live to your site.
Please note: This section will show you how to manually set up GTM. Automated GTM integration removes the need for this step, but is not yet publicly available. For more information, please get in touch
In order to block a problematic tag from running until consent is given, you will need to modify that tag's configuration. This will usually involve changing the trigger from "All Pages" to "Metomic:Permit [your-policy]"
To facilitate this, we must create:
metomic.micropolicy
In order to trigger a tag when consent has been granted for a particular micropolicy, you must create a trigger for that policy. For this example, we will create a trigger for the statistics
policy:
metomic.permit
metomic.micropolicy
equals statistics
In manual integration mode, you will need to repeat this step for your other micropolicies.
Now that you have triggers set up, you can configure a target tag to only load when the trigger fires.
Under Tags, choose a tag you wish to control. In this example, we'll configure Google Analytics to only run once permission for statistics
has been given.
Under Triggering, add the appropriate trigger as set up in step 2. In this case, we'll choose "Metomic.Permit statistics"
Note: If there is already a "Page View" trigger present for your tag, you will need to replace it with the appropriate Metomic.Permit trigger
Finally, click Publish to push your changes live to your site