Use History Source = popstate as trigger?

Hello,

I want to create a trigger for when history = popstate. Is this possible?

Hi David,

There is a built-in variable called “History source” that contains information about the last method/event that updated the history object. It changes its value when a pushState, replaceState, popState or hashchange event occurs. You can add a condition that would check the source to the standard history change trigger.

@sararekowska

As you can see in this screenshot, “history source” is not listed as a trigger variable.

That’s because you’re looking at a page view trigger. If you want to configure a trigger for “history = popstate”, you should use the history change trigger template and adjust the conditions :slight_smile:

@sararekowska

Got it, thank you!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.