'How to install google consent script for CMP banner?
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("consent", "default", {
ad_storage: "Denied",
analytics_storage: "Denied",
wait_for_update: 1000
});
gtag('set', 'url_passthrough', true);
google consent mode isnt working i'm beginner here thanks in advance for help
Solution 1:[1]
use this one
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("consent", "default", {
ad_storage: "denied",
analytics_storage: "denied",
wait_for_update: 1000
});
gtag('set', 'url_passthrough', true);
gtag("set", "ads_data_redaction", true);
src content
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | hassan raza |
