Skip to content
PrestaShop · User manual

Google Marketing Tools for PrestaShop

Version 2.5.4 Product page
Chapter 7

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:

CategoryWhat it coversConsent signals
NecessarySecurity and the basic working of the shop. Always granted.security_storage
PreferencesSettings such as language.functionality_storage, personalization_storage
StatisticsAnalytics, such as visit duration.analytics_storage
MarketingAdvertising.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

SettingWhat it does
cookie-script.comEnable 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 URLShown 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 compatibilityEnable 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

SettingWhat it does
StatusShows the module's consent popup in your shop. Enabled by default.
Acceptance with page changeIf the visitor ignores the popup and opens another page, all cookies are accepted automatically.
Acceptance with scrollIf the visitor ignores the popup and scrolls, all cookies are accepted automatically.
Consent popup positionWhere the popup appears: Center, Top left, Top right, Bottom full width, Bottom left or Bottom right.
Lock screenBlocks the page until the visitor answers the popup.
Popup Delay TimeMilliseconds 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.

SettingWhat it does
TitleHeading of the popup. Default: "This site uses cookies."
DescriptionMain text of the popup. Accepts formatting.
Link "more information" titleText of the link to your cookie or privacy policy. Default: "More information".
Link "more information" pageThe CMS page the link opens, for example your privacy policy. Choose — for no link.
"Accept all" button textDefault: "Accept all".
"Accept selection" button textAccepts only the categories the visitor ticked. Default: "Accept selection".
"Customize" button textOpens the list of categories. Default: "Customize".
"Refuse all" button textRefuses every optional category. Default: "Refuse all".
Necessary Checkbox label and Necessary explanationName and description of the Necessary category.
Preferences Checkbox label and Preferences explanationName and description of the Preferences category.
Statistics Checkbox label and Statistics explanationName and description of the Statistics category.
Marketing Checkbox label and Marketing explanationName and description of the Marketing category.

Consent popup appearance

All colours are hexadecimal codes without #, for example 229ac8.

SettingDefault
Main theme color (top border, link, Accept all button and other accents)229ac8
Consent popup backgroundffffff
Consent popup text0a010a
Button "Accept all" textffffff
Button "Accept selection" background63b0cc
Button "Accept selection" text000000
Button "Customize" backgrounddaebf3
Button "Customize" text000000
Button "Refuse all" backgroundddd
Button "Refuse all" text000000
Checkbox color of "Necessary" category229ac8
Checkbox color of "Preferences" category229ac8
Checkbox color of "Statistics" category229ac8
Checkbox color of "Marketing" category229ac8

Floating configuration button general settings

A small floating button lets visitors reopen the popup and change their choice at any time.

SettingWhat it does
PositionNo button, Top left, Top right, Bottom left or Bottom right.
Configure cookies button titleTooltip of the button, per language. Default: "Cookies configuration".
Icon "cookie" colorColour 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

SettingWhat it does
Consent versionA 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 modeBasic: 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.

ButtonWhat it does
Consent historyLists the latest consent records saved for customers: customer, choices and date.
Privacy requestsLists the export and erase requests handled for this module.
Apply retentionRemoves 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 --purge

Replace /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.