Ads - Consent Management (CM - CMP)

Card Puncher Data Processing


Consent Management is a mandatory privacy process due to gdpr where a website showing a page to a EU resident needs the consent of the user in order to use their data (cookies,..)

The consent box may ask you to define the type of cookie usage that the user could accept.


You cannot use the web site (web application without this cookies).


Preference cookies enable a website to remember information that changes the way the website behaves or looks, like your preferred language or the region that you are in.


Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.


Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.


All other cookie category are unknown cookie type.


You can implement it:



Example with:

// The storage key
let consentKey = 'consentValue';
// The value of the consent if the user is not from a EU country
let consentValueNonEu = 'NonEu';
// Do we have already a consent ?
let consentStorage = localStorage.getItem(consentKey);
if (!consentStorage) {
	localStorage.setItem(consentKey, false);

// Do we need to show the consent box
// localStorage.getItem return a string, therefore !'false' is false and not true ---
let consent = ( consentStorage !== 'true' || consentStorage !== consentValueNonEu);
if (consent) {
       // Country
			success: function (data) {
				let countryCode = data.split(";")[1];
				let euCountryCodes = ['AL', 'AD', 'AM', 'AT', 'BY', 'BE', 'BA', 'BG', 'CH', 'CY', 'CZ', 'DE', 'DK', 'EE', 'ES', 'FO', 'FI', 'FR', 'GB', 'GE', 'GI', 'GR', 'HU', 'HR', 'IE', 'IS', 'IT', 'LT', 'LU', 'LV', 'MC', 'MK', 'MT', 'NO', 'NL', 'PO', 'PT', 'RO', 'RU', 'SE', 'SI', 'SK', 'SM', 'TR', 'UA', 'VA'];
				if (euCountryCodes.includes(countryCode)) {
					let consentBoxId = 'gdpr_consent';
					let consentBoxSelector = '#' + consentBoxId;
					let consentBox = `
								<div id="${consentBoxId}" class="container alert alert-secondary alert-dismissible fixed-bottom text-center fade" role="alert" >
									By using our site, you acknowledge that you have read and understand our policy.
									<button type="button" class="close" style="float:initial"  data-dismiss="alert" aria-label="Close">
										<span aria-hidden="true">&times;</span>
					// Show the alert
					// When it's closed, we save the consent
					jQuery(consentBoxSelector).on('', function () {
						//  This event is fired when the alert has been closed (will wait for CSS transitions to complete)
						localStorage.setItem(consentKey, true);
                                                console.log ('Consent was saved');
				} else {
					localStorage.setItem(consentKey, consentValueNonEu);

When storing the consent, you can use the following table structure:

  • date-time
  • consent-id (id)
  • consent-url (origin of the consent)
  • consent-necessary (yes/no)
  • consent-preferences (yes/no)
  • consent-statistics (yes/no)
  • consent-marketing (yes/no)
  • consent-unknown (yes/no)
  • ip-anonymized (hashed)
  • user-agent
  • ip-country

Documentation / Reference

Discover More
Card Puncher Data Processing
Ads - Consent Management Platform (CMP)

In the Transparency and Consent Framework (TCF), a Consent Management Platform is a third party that is registered and authorized to produce a consent string in order to gather the consent given by the...
Card Puncher Data Processing
Ads - Consent String (IAB)

In the Transparency and Consent Framework (TCF), an Consent String contains a list of permissions telling a list of partners what they’re allowed to do with user data. This a Base64 encoded bit string...
Card Puncher Data Processing
General Data Protection Regulation (GDPR)

The European Data Protection Regulation is applicable as of May 25th, 2018 in all member states to harmonize data privacy laws across Europe. Under this law, websites need: to explain the usage of...
Card Puncher Data Processing
Privacy Policy

To deliver functionalities, data is used and collected: by us but also by We may collect personal information as defined in GDPR (such as IP address and a unique id in a cookie) visitors to...
Card Puncher Data Processing
Transparency and Consent Framework (TCF)

The is a framework that: register and validate consent management provider that are authorized to register the consent of users in a consent string Gdpr...
Card Puncher Data Processing
UI - Alert

alert are dialog showing a short message that comes at the top or bottom of your page. Toasts alert: is a minimul call to action are located generally at the top or bottom of the page can...

Share this page:
Follow us:
Task Runner