Expand my Community achievements bar.

SOLVED

Trigger A/B Experience on click of button

Avatar

Level 3

Hello,

I hope someone can help me understand how I can build a trigger in Target to only call the test if a certain button is clicked.

We have a webpage with two buttons (1) and (2), upon clicking either button the page will show content (different for each).

We have a direct call happening for Analytics which pushes a datalayer value as a eVar upon click of each of the buttons.

In relation to target and the reason for this post, I have a simple A/B test, however I'd like this only to work if button (2) is clicked. Not on page load. Reason for this is that it will remove noise and the people who click on button (1).

Can anyone help me understand the best approach to code this test up to answer the above

Thanks

1 Accepted Solution

Avatar

Correct answer by
Employee

In DTM, update your direct call rule w/ non-synchronous js. 

mbox.js: mboxUpdate("target-global-mbox", "button1");

at.js: How to use getOffer & applyOffer together: https://marketing.adobe.com/resources/help/en_US/target/ov2/r_target-atjs-getoffer.html 

Once implementation is sound. Create a campaign w/ more granular audience targeting. custom > mboxName > equals > param value

View solution in original post

2 Replies

Avatar

Level 2

Hi there. My team also recently discussed something similar. But Its still in dev and we haven't gone live yet.

Anyways, our theory is to use two campaigns.

The first XT Activity will set up listeners on the buttons to trigger an mboxUpdate() call. This call will re-fire all campaigns running on that URL. We will also set an mbox param/cookie that the second campaign will trigger upon.

The second is an A/B test in which the Audience is only those who have a particular cookie set. This is what I remember from the whiteboard we had. I'm not completely sure about this. But I hope this helps. 

So, to summarize, the second campaign will only fire when a particular cookie is set. This cookie is set by the first campaign, which only happens when a button is clicked.

Please note that there is one thing that can go wrong here. The first campaign may fire again when an mboxUpdate() is issued. This will again set listeners on the same buttons and your second campaign may fire again upon clicking those buttons. Maybe this is logically handled/filtered by Target, still I would suggest the first campaign's audience as those who do do not have the cookie set.

Avatar

Correct answer by
Employee

In DTM, update your direct call rule w/ non-synchronous js. 

mbox.js: mboxUpdate("target-global-mbox", "button1");

at.js: How to use getOffer & applyOffer together: https://marketing.adobe.com/resources/help/en_US/target/ov2/r_target-atjs-getoffer.html 

Once implementation is sound. Create a campaign w/ more granular audience targeting. custom > mboxName > equals > param value