Checkout Rule | Community
Skip to main content
Level 4
December 31, 2020
Solved

Checkout Rule

  • December 31, 2020
  • 1 reply
  • 1012 views

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.
Best answer by yuhuisg

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
Community Advisor
yuhuisgCommunity AdvisorAccepted solution
Community Advisor
January 2, 2021

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.