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?

3
  • Save the selection to the httpcontext session and trigger a goal on the session end event? Mar 7, 2017 at 12:37
  • Is it on the same page? You may consider only the last registered goal that has been triggered Mar 7, 2017 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. Mar 7, 2017 at 14:31

1 Answer 1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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