How to clear events setup via custom code in WebSDK AEP configration. | Community
Skip to main content
April 23, 2025
Solved

How to clear events setup via custom code in WebSDK AEP configration.

  • April 23, 2025
  • 2 replies
  • 626 views

Hi @bjoern__koth ,
I have setup events via custom code in webSDK on pageload & button click calls but these events are persisting on the next pages.
Is there any way to use s.clearVars(); in WebSDK? or is there any alternate approch.

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 Harveer_SinghGi1

Hi @sumitlahabar ,

You can use update variable action from the WebSDK extension to clear the complete XDM using the "clear existing value" option on the XDM level.

This is explained in detail in this video from Jim - https://www.youtube.com/watch?v=ThpW4yFW2f0

Cheers!

2 replies

Harveer_SinghGi1
Community Advisor
Harveer_SinghGi1Community AdvisorAccepted solution
Community Advisor
April 23, 2025

Hi @sumitlahabar ,

You can use update variable action from the WebSDK extension to clear the complete XDM using the "clear existing value" option on the XDM level.

This is explained in detail in this video from Jim - https://www.youtube.com/watch?v=ThpW4yFW2f0

Cheers!

bjoern__koth
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
April 24, 2025

Hi @sumitlahabar 

see @harveer_singhgi1's response. If you are using a Web SDK variable, you can the checkbox to initially reset it when it is executed.

Cheers from Switzerland!