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

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

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.
Harveer_SinghGi1
Harveer_SinghGi1Accepted solution
New Participant
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!

2 replies

bjoern__koth
New Participant
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.

Translate
Cheers from Switzerland!
Harveer_SinghGi1
Harveer_SinghGi1Accepted solution
New Participant
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!

Translate