Expand my Community achievements bar.

SOLVED

Create an audience based on an element's selection

Avatar

Level 2

Hello everyone,

 

I have an use case for Adobe Target in which I must remove an element from a form if a specific checkbox is selected by the user. The approach I was considering consists in sending an mbox parameter to Adobe Target via Adobe Data Collection, stating whether that specific checkbox is selected, and create an audience based on it. This is the Custom Code Data Element I created: return document.querySelector('#elementID').checked;

 

Given that I already have the general Adobe Target Load Rule created...

Carolina_2Va_0-1725371836874.png

... but the "Library Loaded" event does not work for this specific use case, as the user can interact with the checkbox anytime after the page is loaded, I tried creating a new Rule where I set the event as Data Element Change and the condition as the Data Element being true. I then send the parameter with the Data Element value:

Carolina_2Va_1-1725372031885.png

However, this did not seem to work when I tested as this parameter did not show up in the call of the Network tab. Additionally, in order to debug this, I inserted a Custom Code action with a simple console.log("hello world") prior to the "Load Target" action and it worked, so I know my event and conditions are correct.

 

Can anyone help me understand what is wrong with this approach and/or what I should do instead to achieve this?

 

Thank you in advance.

 

Best,

Carolina

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 2

Update: I was able to pass the new parameter by adding the Data Element value to the first/general Load Target Rule and changing the action in the second Rule as Trigger View. I've also removed my condition as I want to know when the check is false as well, so now I can see a call every time the user interacts with the checkbox.

 

However, the value of the parameter seems to be the same in every call (true) and I know my Data Element is correct since:

1. My trigger is based on the Data Element Change;

2. I've added a console.log to see the value of the Data Element before each Trigger View.

 

I'm a bit new to this terms but isn't the Trigger View call supposed to update the parameters values when sending them?

View solution in original post

1 Reply

Avatar

Correct answer by
Level 2

Update: I was able to pass the new parameter by adding the Data Element value to the first/general Load Target Rule and changing the action in the second Rule as Trigger View. I've also removed my condition as I want to know when the check is false as well, so now I can see a call every time the user interacts with the checkbox.

 

However, the value of the parameter seems to be the same in every call (true) and I know my Data Element is correct since:

1. My trigger is based on the Data Element Change;

2. I've added a console.log to see the value of the Data Element before each Trigger View.

 

I'm a bit new to this terms but isn't the Trigger View call supposed to update the parameters values when sending them?