Checkout Rule | Community
Skip to main content
Level 4
Dec 31, 2020 12:01 PM UTC
Solved

Checkout Rule

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
yuhuisg
yuhuisgAccepted solution
New Participant
Jan 2, 2021 2:23 PM UTC

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-platform-launch-questions.)

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.

1 reply

yuhuisg
yuhuisgAccepted solution
New Participant
Jan 2, 2021 2:23 PM UTC

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-platform-launch-questions.)

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.

Translate