Comment

Avatar

Level 6

03-02-2021

@markusb54298925 What are you doing to try to clear the values or change them? While I get there is nothing out of the box, you can just reset targetPageParams by overwriting it, this object always gets picked up when you call Target global mbox or custom mbox. 

 

Here is how I have set it up real quickly to show what I mean.

 

1. In Launch, I have a rule that is fired off a custom event, I am calling it "targetReset".

Screen Shot 2021-02-03 at 10.02.12 AM.png

 

2. For the same Launch rule, I have two items for thee Action section. 

Screen Shot 2021-02-03 at 9.57.35 AM.png

 

3. Lets look at Reset Params... I am overwriting the targetPageParams function. I also have it set to execute globally. The main focus here are lines 23-27, the other logic is something I needed for my environment. This is it for Launch.

Screen Shot 2021-02-03 at 9.59.38 AM.pngScreen Shot 2021-02-03 at 9.59.29 AM.png

 

4. Lets test it out... In the screenshot below I first call targetPageParams to see what the object has, notice that A: 1 and B: 2, then I create my js event and fire it... Then I call targetPageParams to see what the object has, notice that A: 5 and B: 6 now. 

Screen Shot 2021-02-03 at 9.56.27 AM.png

 

5. And just to make sure the right data was actually set to Target, here are the payloads for each call.

Screen Shot 2021-02-03 at 10.00.55 AM.png

Screen Shot 2021-02-03 at 10.01.05 AM.png

 

Hopefully this helps.