How to set Target cookie with SECURE flag

Avatar

Avatar
Contributor
Employee
khushbook25
Employee

Likes

7 likes

Total Posts

18 posts

Correct reply

0 solutions
Top badges earned
Contributor
Applaud 5
Validate 1
Shape 1
Ignite 5
View profile

Avatar
Contributor
Employee
khushbook25
Employee

Likes

7 likes

Total Posts

18 posts

Correct reply

0 solutions
Top badges earned
Contributor
Applaud 5
Validate 1
Shape 1
Ignite 5
View profile
khushbook25
Employee

01-12-2020

Hi,

I want to set a secure flag for my Target cookie and have tried the below method but it is not working. Could anybody share their thoughts on how to get it worked?

  • Added a custom code before 'Load Target' action is added in Launch rule.
  • Here is the script which is the part of above mentioned custom code -

window.targetGlobalSettings = {
secureOnly: true
}

The above mentioned method seems to be not working when I checked using chrome developer tools where I found empty value for the column SECURE.

We have also tried enabled:false to validate the above method which is working as expected as it is disabling the Target library.

Is there any other method to set this flag for Target? As for Adobe Analytics and ECID, this setting is present directly on editing the configurations for the respective extensions in Launch but for Target there is no direct way. 

Your timely help is well appreciated. 

Thanks in advance!

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Affirm 100
MVP
shelly-goel
MVP

Likes

246 likes

Total Posts

410 posts

Correct reply

105 solutions
Top badges earned
Affirm 100
Give Back 25
Ignite 3
Give Back 10
Validate 1
View profile

Avatar
Affirm 100
MVP
shelly-goel
MVP

Likes

246 likes

Total Posts

410 posts

Correct reply

105 solutions
Top badges earned
Affirm 100
Give Back 25
Ignite 3
Give Back 10
Validate 1
View profile
shelly-goel
MVP

07-12-2020

@khushbook25  Since secure flag can be set and available only on https pages, I hope you're trying on https pages?

Answers (1)

Answers (1)

Avatar

Avatar
Affirm 5
Level 2
ryanr7
Level 2

Likes

8 likes

Total Posts

13 posts

Correct reply

6 solutions
Top badges earned
Affirm 5
Affirm 3
Boost 5
Boost 3
Boost 1
View profile

Avatar
Affirm 5
Level 2
ryanr7
Level 2

Likes

8 likes

Total Posts

13 posts

Correct reply

6 solutions
Top badges earned
Affirm 5
Affirm 3
Boost 5
Boost 3
Boost 1
View profile
ryanr7
Level 2

05-01-2021

As a point of clarification, the targetGlobalSettings of secureOnly: true does not impact the Target set cookies (mbox, etc.) it forces all the requests made from at.js to always be over HTTPS (secure protocol). Noted here in help: https://experienceleague.adobe.com/docs/target/using/implement-target/client-side/functions-overview...