Google Consent V2
How to configure the consent popup, choose the consent mode, connect an external consent tool and handle privacy requests and data retention.
How consent works
The Google Consent V2 tab controls the consent popup that visitors see and the consent signals that your GTM tags receive. Optional categories start denied: until a visitor accepts, tags that need consent do not use cookies.
The popup offers four categories:
| Category | What it covers | Consent signals |
|---|---|---|
| Necessary | Security and the basic working of the shop. Always granted. | security_storage |
| Preferences | Settings such as language. | functionality_storage, personalization_storage |
| Statistics | Analytics, such as visit duration. | analytics_storage |
| Marketing | Advertising. | ad_storage, ad_user_data, ad_personalization |
The visitor's choice is remembered in their browser for one year, or until you change Consent version. When a visitor changes the choice, the shop publishes the googleConsentUpdate event for your tags.
Press Save settings after changing anything in this tab.
Compatibilities
| Setting | What it does |
|---|---|
| cookie-script.com | Enable it if you use cookie-script.com as your consent tool. The module then loads its script and follows the visitor's choices made there. |
| CDN URL | Shown when cookie-script.com is enabled. In cookie-script.com go to Settings > Installation > Google Tag Manager and copy the CDN URL. It must start with https://. |
| Cookiebot compatibility | Enable it if you use Cookiebot as your consent tool. |
If you use one of these tools, disable the module's own popup with Status below so visitors do not see two popups.
Consent popup general configuration
| Setting | What it does |
|---|---|
| Status | Shows the module's consent popup in your shop. Enabled by default. |
| Acceptance with page change | If the visitor ignores the popup and opens another page, all cookies are accepted automatically. |
| Acceptance with scroll | If the visitor ignores the popup and scrolls, all cookies are accepted automatically. |
| Consent popup position | Where the popup appears: Center, Top left, Top right, Bottom full width, Bottom left or Bottom right. |
| Lock screen | Blocks the page until the visitor answers the popup. |
| Popup Delay Time | Milliseconds to wait after the page loads before showing the popup. Default: 1000. Maximum: 60000. |
Consent popup texts
Every text field has one box per language of your shop. Fill in each language your visitors use.
| Setting | What it does |
|---|---|
| Title | Heading of the popup. Default: "This site uses cookies." |
| Description | Main text of the popup. Accepts formatting. |
| Link "more information" title | Text of the link to your cookie or privacy policy. Default: "More information". |
| Link "more information" page | The CMS page the link opens, for example your privacy policy. Choose — for no link. |
| "Accept all" button text | Default: "Accept all". |
| "Accept selection" button text | Accepts only the categories the visitor ticked. Default: "Accept selection". |
| "Customize" button text | Opens the list of categories. Default: "Customize". |
| "Refuse all" button text | Refuses every optional category. Default: "Refuse all". |
| Necessary Checkbox label and Necessary explanation | Name and description of the Necessary category. |
| Preferences Checkbox label and Preferences explanation | Name and description of the Preferences category. |
| Statistics Checkbox label and Statistics explanation | Name and description of the Statistics category. |
| Marketing Checkbox label and Marketing explanation | Name and description of the Marketing category. |
Consent popup appearance
All colours are hexadecimal codes without #, for example 229ac8.
| Setting | Default |
|---|---|
| Main theme color (top border, link, Accept all button and other accents) | 229ac8 |
| Consent popup background | ffffff |
| Consent popup text | 0a010a |
| Button "Accept all" text | ffffff |
| Button "Accept selection" background | 63b0cc |
| Button "Accept selection" text | 000000 |
| Button "Customize" background | daebf3 |
| Button "Customize" text | 000000 |
| Button "Refuse all" background | ddd |
| Button "Refuse all" text | 000000 |
| Checkbox color of "Necessary" category | 229ac8 |
| Checkbox color of "Preferences" category | 229ac8 |
| Checkbox color of "Statistics" category | 229ac8 |
| Checkbox color of "Marketing" category | 229ac8 |
Floating configuration button general settings
A small floating button lets visitors reopen the popup and change their choice at any time.
| Setting | What it does |
|---|---|
| Position | No button, Top left, Top right, Bottom left or Bottom right. |
| Configure cookies button title | Tooltip of the button, per language. Default: "Cookies configuration". |
| Icon "cookie" color | Colour of the cookie icon. Default: ffffff. |
Custom code
Custom code adds your own code to every page, for example CSS rules that adapt the popup to your theme. It is placed in the page head between an external consent tool and the default consent settings.
Consent version, mode and retention
| Setting | What it does |
|---|---|
| Consent version | A label for the current version of your consent texts, default 1. When you change it, every visitor is asked again. Change it after a significant change to your cookie policy. |
| Consent mode | Basic: Google Tag Manager only loads after the visitor accepts an optional category. Advanced: GTM loads straight away with every optional category denied, which lets Google tags send cookieless signals as Google supports. Default: Basic. |
| Retention (days) | How long the module keeps consent records, attribution data and privacy requests: from 1 to 730 days. Default: 180. Older records are removed when you press Apply retention or run the purge cron job. |
The note under these fields is a reminder: turning off the popup does not grant consent. If you use another consent tool, connect it as described below.
Connecting another consent tool
If you disable Status and use a consent tool that is not cookie-script.com or Cookiebot, that tool must pass the visitor's choice to the module. Ask its developer to call this function when the visitor decides, with true for each accepted category:
window.dmMarketingPrivacy.setConsent({analytics:true,marketing:false,preferences:false})Alternatively the tool can dispatch the devman:consent event on window with the same object as its detail. Never grant consent automatically.
Privacy tools
The buttons under the settings work on the module's own data for the selected shop.
| Button | What it does |
|---|---|
| Consent history | Lists the latest consent records saved for customers: customer, choices and date. |
| Privacy requests | Lists the export and erase requests handled for this module. |
| Apply retention | Removes the records older than Retention (days) now. |
To answer a customer's request, type their customer ID or email address in Customer ID or email and press:
- Export customer data to download a JSON file with the marketing data the module holds for that customer;
- Erase module data to delete that data after confirming.
These actions affect only the module's data in the selected shop. They do not delete the customer account or orders in PrestaShop.
The module also takes part in PrestaShop's customer data requests: if you use the official PrestaShop GDPR module, the export and deletion of a customer include this module's data. When you delete a customer in PrestaShop, the module erases its data for that customer in every shop.
Removing old records automatically
To apply the retention period every day without pressing the button, add a cron job in your hosting control panel. Replace 1 with your shop ID and run it as the same user that runs your shop:
php /path/to/your/shop/modules/googlemarketingtools/cron.php --shop=1 --purgeReplace /path/to/your/shop with the folder where PrestaShop is installed. Add one line per shop.
Still need help?
Open a support ticket from your account and our team will look at your store with you.