Skip to content

v4.0.0 - New default dispatch() behavior

Compare
Choose a tag to compare
@tizmagik tizmagik released this 15 May 14:39

Breaking Change

In #35 the default dispatch behavior of emitting a CustomEvent has been removed in favor of pushing tracking objects to window.dataLayer[]. This is a good default for most pass that use Google Tag Manager for tracking.

If you had previously been relying on CustomEvent, you will need to now import that module into your project and define the call to CustomEvent as your new overriding dispatch() function on some top-level component. See the main README for details.

If you had previously been defining dispatch() on some top-level component, then this is not a breaking change from your perspective because any overriding dispatch function declaration will be used instead of the default behavior.