npm mixpanel-browser 2.49.0
Attribution/web analytics updates

latest releases: 2.51.0, 2.50.0
9 months ago

This release updates capabilities related to web/marketing/attribution analytics.

The track_pageview init option now accepts three string values to support SPA pageview tracking:

  • "url-with-path": fire pageview events only when main url path changes (https://example.com/foo -> https://example.com/bar but not https://example.com/foo?bar=1 -> https://example.com/foo?bar=2)
  • "url-with-path-and-query-string": fire pageview events only when main url path or query string changes (https://example.com/foo?bar=1 -> https://example.com/foo?bar=2 but not https://example.com/foo?bar=1#baz -> https://example.com/foo?bar=1#qux)
  • "full-url": fire pageview events when anything on the URL changes

Example:

mixpanel.init(`my token`, {track_pageview: `url-with-path-and-query-string`});

Profile properties storing referrer info ($initial_referrer and $initial_referring_domain) are now saved with set_once instead of set, to prevent overwriting.

Persistence of UTM parameters can now be turned off with the init option {stop_utm_persistence: true}. This is opt-in today but will be the default setting in a future release. The stop_utm_persistence option will also override the store_google option, which is responsible persisting UTM parameters today. If store_google and stop_utm_persistence are both true, any persisted UTM parameters will be cleared from storage.

Visits from AhrefsSiteAudit crawler are now ignored.

Don't miss a new mixpanel-browser release

NewReleases is sending notifications on new releases.