Create Target Audience Based On Cookie Value | Community
Skip to main content
Level 2
May 1, 2019
Solved

Create Target Audience Based On Cookie Value

  • May 1, 2019
  • 1 reply
  • 4037 views

So I have spent hours looking around the forum to find an answer to this question. Just about all the answers I can find are all out dated and referring to mbox.js functions that no longer exist.

All I am trying to do is create an audience if a cookie value is true. It seems by default Adobe Target is not able to do this, just for clarity is the only way to do this to pass parameters to at.js using DTM?

If this is the case then how would I go about this when our implementation is not using DTM?

If this can be achieved easier please let me know.

Thanks

Dan

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Gaureshk_Kodag

hi Dani,

There is no option in adobe target to create audience based on cookie value, but this can be done with help of adobe launch/DTM

1.Go to data elements in adobe launch/DTM.

2.Add data element

3.Name : Element_Name

4. Extension : Core

5. Data Element Type : Cookie

6. Default Value : None

7. Check Clean Text

8. Storage Duration : Page view / Session / Visitor - As per your requirement

9. Cookie Name : Cookie_Name

SAVE Data element

Pass it in your global mbox

(Name : any name to capture in target

Value : Data element name that you created earlier)

Then go to adobe target

1.Create Audience

2.Rule -> Custom -> Type Name (which is passed in mbox through launch) -> follow your conditions

if you choose to use js you can use code snippet that looks something like this

targetPageParams = function() {

var cookieValue = document.cookie.replace(/(?:(?:^|.*;\s*)COOKIENAME\s*\=\s*([^;]*).*$)|^.*$/, "$1");

              return "PARAMNAME="+cookieValue;

        };

/* replace `COOKIENAME` and `PARAMNAME` */

hope this works for you.

Thanks,

Gauresh Kodag.

1 reply

Gaureshk_Kodag
Adobe Employee
Gaureshk_KodagAdobe EmployeeAccepted solution
Adobe Employee
May 1, 2019

hi Dani,

There is no option in adobe target to create audience based on cookie value, but this can be done with help of adobe launch/DTM

1.Go to data elements in adobe launch/DTM.

2.Add data element

3.Name : Element_Name

4. Extension : Core

5. Data Element Type : Cookie

6. Default Value : None

7. Check Clean Text

8. Storage Duration : Page view / Session / Visitor - As per your requirement

9. Cookie Name : Cookie_Name

SAVE Data element

Pass it in your global mbox

(Name : any name to capture in target

Value : Data element name that you created earlier)

Then go to adobe target

1.Create Audience

2.Rule -> Custom -> Type Name (which is passed in mbox through launch) -> follow your conditions

if you choose to use js you can use code snippet that looks something like this

targetPageParams = function() {

var cookieValue = document.cookie.replace(/(?:(?:^|.*;\s*)COOKIENAME\s*\=\s*([^;]*).*$)|^.*$/, "$1");

              return "PARAMNAME="+cookieValue;

        };

/* replace `COOKIENAME` and `PARAMNAME` */

hope this works for you.

Thanks,

Gauresh Kodag.