Expand my Community achievements bar.

Join us at Adobe Summit 2024 for the Coffee Break Q&A Live series, a unique opportunity to network with and learn from expert users, the Adobe product team, and Adobe partners in a small group, 30 minute AMA conversations.
SOLVED

Checkout Rule

Avatar

Level 4

I am creating checkout rule on click, rule is firing properly, but data is not storing in evar as URL changes when we click on the button.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

I assume you're doing this in Adobe Launch. (In which case, your question is better suited at https://experienceleaguecommunities.adobe.com/t5/adobe-experience-platform-launch/qa-p/experience-pl....)

Furthermore, I assume you want to track the clicked button's link, so you're firing your Rule with a Click event for that button.

In that case, the easiest way to get the button's link in your eVar is with the "this" object. With a Click event, the "this" object refers to the clicked DOM element, i.e. your button. So that gives you access to that element's JavaScript properties.

If your button is a stylized <A> link, then one of the "this"'s properties is "href", which would be the button's link. So in Adobe Launch, in your Adobe Analytics Set Variables action, you can configure your eVar like so (my example uses eVar3):

eVar3 Set as %this.href%

This ensures that your eVar always tracks whatever link your clicked button has.

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

I assume you're doing this in Adobe Launch. (In which case, your question is better suited at https://experienceleaguecommunities.adobe.com/t5/adobe-experience-platform-launch/qa-p/experience-pl....)

Furthermore, I assume you want to track the clicked button's link, so you're firing your Rule with a Click event for that button.

In that case, the easiest way to get the button's link in your eVar is with the "this" object. With a Click event, the "this" object refers to the clicked DOM element, i.e. your button. So that gives you access to that element's JavaScript properties.

If your button is a stylized <A> link, then one of the "this"'s properties is "href", which would be the button's link. So in Adobe Launch, in your Adobe Analytics Set Variables action, you can configure your eVar like so (my example uses eVar3):

eVar3 Set as %this.href%

This ensures that your eVar always tracks whatever link your clicked button has.