Help with Target audience created from website behaviour
On our webpage, there's a page with a button that downloads a PDF when clicked. I need to create two audiences:
1) Audience 1-visitors who went to the page but did not click the Download PDF button
2) Audience 2-visitors who went to the page clicked the Download PDF button
Audience 1 works. There's an issue with Audience 2. We use Web SDK.
I needed a way to detect button clicks on the page. There is only a single PDF on that page.
In Launch, I built a rule that fires when the Download PDF button is clicked. That rule is firing; it was verified using the Chrome console.
When the rule files, the action is this script.
<script>
console.log('Data collection: download button was clicked');
adobe.target.trackEvent({
mbox: 'downloadClickMbox',
params: {
clickedButton: 'downloadPDF'
}
});
</script>
In Target, I built a profile script to catch instances of the Download PDF clicks from Launch using this code.
Profile script name: 2025_Downloaded_PDF
if (mbox.name == "downloadClickMbox") {
return mbox.param("clickedButton") == "downloadPDF";
}
Finally, I made an audience from the profile script.
Attributes
Visitor Profile: user.2025_Downloaded_PDF Equals (case insensitive) downloadPDF
The Activity is not activated. To test, I toggle on: Match audience rules to see experiences
I open a browser tab and go to the Activity Link URL, which is the homepage of the site.
Then, I navigate to the webpage. I click on the Download PDF button.
I navigate back to the homepage. I should see the modifications but I don't.
