We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Cookie Consent Simple Implementation?

Development and Programming

User BULfYYMv's avatar
User BULfYYMv
59 posts
3 weeks ago
User BULfYYMv's avatar User BULfYYMv

Looking at the consent module for the first time trying to get a very simple implementation for consenting to marketing cookies. IE when user consents to marketing cookies then GTM tags will fire.

       
User BULfYYMv's avatar
User BULfYYMv
59 posts
3 weeks ago
User BULfYYMv's avatar User BULfYYMv

I created a User Consent Request called “Marketing” now I need to figure out how to check if the user previously consented (IE the existence of the marketing cookie) then fire GTM tags.

       
User BULfYYMv's avatar
User BULfYYMv
59 posts
3 weeks ago
User BULfYYMv's avatar User BULfYYMv

Do I need to use the Cookie addon for that?

       
User BULfYYMv's avatar
User BULfYYMv
59 posts
3 weeks ago
User BULfYYMv's avatar User BULfYYMv

or does the Consent Request Module have that built in?

       
User BULfYYMv's avatar
User BULfYYMv
59 posts
3 weeks ago
User BULfYYMv's avatar User BULfYYMv
{if consent:marketing}
This is what I wanted
{/if}
       
User BULfYYMv's avatar
User BULfYYMv
59 posts
3 weeks ago
User BULfYYMv's avatar User BULfYYMv

These don’t translate 1:1 as browser cookies…

       
NikiW's avatar
NikiW
36 posts
about 3 weeks ago
NikiW's avatar NikiW

This is what we have to fire the GTM tags…

{exp:consent:requests consent="ee:cookies_performance"}
  {if consent_granted}
 GTM script
  {/if}
{/exp:consent:requests
       
NikiW's avatar
NikiW
36 posts
about 3 weeks ago
NikiW's avatar NikiW

we have FB pixel in the cookies_targeting one

       
User BULfYYMv's avatar
User BULfYYMv
59 posts
about 3 weeks ago
User BULfYYMv's avatar User BULfYYMv

I think:

{if consent:marketing}

does the same as:

{exp:consent:requests consent="marketing"}
  {if consent_granted}
       
User BULfYYMv's avatar
User BULfYYMv
59 posts
about 3 weeks ago
User BULfYYMv's avatar User BULfYYMv

Could be wrong but I found that example here: <https://docs.expressionengine.com/latest/templates/globals/consent.html#consent-variables>

       
NikiW's avatar
NikiW
36 posts
about 3 weeks ago
NikiW's avatar NikiW

Probably does. I can’t remember what I was following when I set this up last summer, it was probably an article someone wrote up

       
NikiW's avatar
NikiW
36 posts
about 3 weeks ago
NikiW's avatar NikiW

or one of the EE:U articles

       
User BULfYYMv's avatar
User BULfYYMv
59 posts
about 3 weeks ago
User BULfYYMv's avatar User BULfYYMv

The docs don’t have a real world example that I could find so kind of piecing it together a little at a time.

       
NikiW's avatar
NikiW
36 posts
about 3 weeks ago
NikiW's avatar NikiW

OH yeah it was the EE:U article from Rob Allen

       
User BULfYYMv's avatar
User BULfYYMv
59 posts
about 3 weeks ago
User BULfYYMv's avatar User BULfYYMv

Probably will end up using ee:cookies_performance for gtm instead of a custom one.

       
1 2

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.