Visitors in Bangladesh keep full measurement
In the regional setup only the 32 listed countries start as denied; everyone else starts granted, so a Bangladeshi store selling at home loses nothing.
Google needs Consent Mode v2 to measure and remarket to visitors from the EEA and the UK. Choose where consent is required and copy the snippet that goes before your Google tag, plus the two lines your banner calls on accept and reject.
How long Google tags wait for your consent banner to load (0–5 000 ms).
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag("consent", "default", {
ad_storage: "denied",
ad_user_data: "denied",
ad_personalization: "denied",
analytics_storage: "denied",
wait_for_update: 500,
region: ["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","LI","NO","GB","CH"]
});
gtag("consent", "default", {
ad_storage: "granted",
ad_user_data: "granted",
ad_personalization: "granted",
analytics_storage: "granted"
});
gtag("set", "ads_data_redaction", true);
gtag("set", "url_passthrough", true);
</script>gtag("consent", "update", {
ad_storage: "granted",
ad_user_data: "granted",
ad_personalization: "granted",
analytics_storage: "granted"
});gtag("consent", "update", {
ad_storage: "denied",
ad_user_data: "denied",
ad_personalization: "denied",
analytics_storage: "denied"
});Google requires Consent Mode v2 (ad_user_data and ad_personalization) to measure and remarket to visitors in the EEA and the UK.
A region-specific default wins over the general one, so visitors elsewhere keep full measurement.
Your consent banner must call the update command; this snippet only sets the starting state.
In the regional setup only the 32 listed countries start as denied; everyone else starts granted, so a Bangladeshi store selling at home loses nothing.
The default command must run before the Google tag or the GTM container loads, so put the snippet first in <head>.
This sets the starting state. Your consent banner must run the update command when a visitor chooses.
Platform rules from Google: Set up consent mode on websites.
Not for Bangladeshi visitors. You need it if you advertise to people in the EEA or the UK, because Google uses it to decide what it may measure for them.
With ads consent denied, ads_data_redaction removes ad click ids from requests, and url_passthrough carries click information in page links instead of cookies.
Trakero captures click ids, hashes customer data and sends each purchase once to Meta, TikTok, GA4 and more from your server, so ad blockers and Safari can't lose it.
Free tools
Check, build and debug your tracking in the browser. Nothing you paste leaves the page.
A short email when Meta, Google or TikTok change a tracking rule that affects stores, and when we add a free tool. A few a year. Unsubscribe in one click.
We use your address only for these emails. Privacy policy.