4

I triggered a goal programmatically when someone chose an option from a dropdown however if during the same session they choose a different value in the dropdown I want to delete the goal trigger I did and replace it with the other one they picked. How would I do this?

  • Save the selection to the httpcontext session and trigger a goal on the session end event? – Andrey Bobrov Mar 7 '17 at 12:37
  • Is it on the same page? You may consider only the last registered goal that has been triggered – Hishaam Namooya Mar 7 '17 at 13:30
  • 1
    This would be better as a custom contact facet. You can write rules to use these if you need the information for personalization. – Nathan Hase Mar 7 '17 at 14:31
1

You can't "un-trigger" a goal, as it's written in xDB at this point (as pointed out by IsNull in a comment), a custom contact facet would serve you better at this point. You can re-set the facet as many times as you want, and only the latest value applies, achieving the behaviour you're looking for.

The question is, what do you want to use the data for? I.e. is there a reason that this needs to be a goal?

You can write personlization rules for the custom facet, access the data during rendering, or bring it into Sitecore reporting.

Adding a custom contact facet: https://doc.sitecore.net/sitecore_experience_platform/setting_up_and_maintaining/xdb/contacts/create_a_custom_contact_facet

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.