cookie policy and privacy manager extensions

Gold Contributor
Gold Contributor

Hi,

 

we have encountered some problems with the Privacy Manager Extension.

 

We need to manage the privacy consent programmatically via javascript, because the cookie law in Italy requires explicit consent.

 

When the user lands for the first time on one of our pages, we need to ask him to accept the policy (by doing an action like scrolling) through a top layer before any profiling cookie triggering. This is a different “popup” from the one that will be set in the cookie policy page which allows the user to choose what types of cookies keep active.

 

How we can modify the privacy settings in Tealium by code? There is an API for that?

What logic do you advice in cases like this?

 

We understood that the privacy settings are saved in a cookie named OPTOUTMULTI, but we want to avoid some reverse engineering on how is defined and manipulate it directly.

 

Thanks,

 

Alessandro

7 REPLIES 7

cookie policy and privacy manager extensions

Tealium Employee

@alessandro_pell

 

There is no built in solution to what you want,  however you can put code in a javascript extension scoped to preloader and manuipulate the cookie.   The Privacy Manager Extension places code towards the top of utag.js file to read the cookie and then override load rules according to the 'OPTOUTMULTI' cookie's settings.  An extension scoped to preloader will run before this code.  You will have to do some 'reverse engineering' since the cookie values are dynamically created based on what settings you have in the PM extension.  You will need to keep in mind that *any* changes in the PM extension will change the cookie values and you will need to maintain the preloader extension accordingly.

 

Attached is an example code for you to review but this is only an example you will need to adapt to your own PM extension cookie settings and test yourself. I have some notes in the sample to help as well.   Let me know if you have any questions.

 

Robert 

cookie policy and privacy manager extensions

Tealium Expert
Tealium Expert

Thanks, @robert_sabec, for this sample code, I think I can use it also - but here's my question:  how do I know what the category ids mean?   As in what does 1 mean? and 2 means what?, etc.  Is there a place to see that? In the debugger?  In my case I need to map another cookie consent tool's categories to what we have configured in PM.

Appreciate any guidance....

Tealium Expert

cookie policy and privacy manager extensions

Tealium Employee

@mitchellt

The cookie will always start off with values '0' and 'c1'.  Zero is for 'Tealium Cookies and c1 is the 'default category'.  As you add categories ( and tags to those categories ) then those are incremented up by 1 and included in the cookie.

 

TiQ - services-robert 2018-06-29 10-20-08.png

In my screen shot I've added two additional categires,  only the third category I added has a tag in it so only c3 shows in my cookie.  ( no tags curently are in my c2 so it is not in the cookie. )

Also keep in mind as you add and delete 'categories' the new one is assigned +1 increment from the last and the one deleted is removed and not reused.  ( I would reccomend you set up your categories then make no further changes to them )

 

The values are 0 and 1.  

0 equals privacy manager is 'off' and the tags or cookie are 'on',  1 equals privacy manager is 'on' and the tags are 'off'.  

Robert

 

cookie policy and privacy manager extensions

Tealium Expert
Tealium Expert

Thanks @robert_sabec for the explanation - it would be great if some of this info were documented in the specific PM docs as well, or in tool hints, etc. I realize that every user doesn't need it, but it would be helpful for those of us who need to integrate with other Consent tools.

Tealium Expert

cookie policy and privacy manager extensions

Tealium Expert
Tealium Expert

Hi again @robert_sabec, if I may - here's a question about the OPTOUTMULTI cookie...  what does the other stuff mean?  If I dump that cookie out, here's what it gives me:

 

["0:0", "2045:0", "5001:0", "6026:0", "7001:0", "7115:0", "7117:0", "7129:0", "12047:0", "19004:0", "c1:0"]

So far I have no tags in any categories.  Thanks for any help/explanation!

Tealium Expert

cookie policy and privacy manager extensions

Tealium Expert
Tealium Expert

'sup @mitchellt,

So, if you're managing tags by category, then your OPTOUTMULTI cookie will start with 0:0 (which is the setting for the utag main cookie), and then be followed by a set of preferences in the form:

"c" + category_id + ":" + opt_out_flag

However, if you're managing tags individually, then the OPTOUTMULTI cookie starts with 0:0 as usual, but is then followed by a set of preferences in the form:

tag_vendor_id + ":" + opt_out_flag

Where the tag_vendor_id aligns to the tid property of the entry in utag.loader.cfg that defines that tag. If you've got twenty Google DoubleClick tags, they'll all have the same tid value, and a single preference set in OPTOUTMULTI will apply to all of them. I believe the same goes for Custom Containers - for me, they all show up as tid:20010, meaning a user would either be opted in to all of them, or opted out of all of them, whereas in the category view, you can specify a different category for different tags.

cookie policy and privacy manager extensions

Tealium Expert
Tealium Expert

Thanks for the explanation, @UnknownJ - I figured it was something like that, did not want to guess at it!

Tealium Expert
Public