How to install Google Consent Mode V2 using Google Tag Manager (GTM)?
Step 1
Create an account on GTM.
Step 2
Click on “Tags” to ribbons in right.
Step 3
Click on the “New” button
Step 4
Name it “Seers GCM V2," then click on the tag
Step 5
Click on “Custom HTML”
Step 6
Add Google Consent Mode V2 code, which is
<script type='text/javascript'>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);}
gtag('consent', 'default', {
ad_storage: 'denied',
analytics_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied',
wait_for_update: 500
});
gtag('set', 'ads_data_redaction' , true);
</script>
Step 8
Choose a trigger to fire the GTM tag.
Step 9
Click the “+” (plus) symbol in the top right corner.
Step 10
Choose “Domain ID” in the top left corner and then click a trigger type icon.
Step 11
Click on “DOM Ready”
Step 12
Click on the “Save” button on the right top corner to save trigger configuration.
Step 13
Click the “Save” button to save the tag.
Step 14
Click the “Submit” button to submit the GTM tag.
Step 15
Add version name and description of the tag, then click the “Publish” button and your GTM tag will be published.