Marketing analytics improvements
New default event properties are now captured with each event, holding campaign data present on the URL at the time of tracking. These include UTM parameters (in the format utm_source
, utm_campaign
, etc.) and Click Identifiers (e.g., gclid
, fbclid
, etc.). This functionality can be disabled with the initialization setting {track_marketing: false}
.
UTM parameter properties are no longer persisted across pageloads as superproperties. They will be present only on events tracked on the same pageload where they were present initially. (2023-09-13) Correction: UTM parameter properties still persist across pageloads as superproperties. Persistence will be removed in a future release.
For better first-touch attribution, UTM parameters present on the URL on pageload will be "set once" as profile properties (meaning that a new value will not overwrite any existing value on the profile property). These property names take the format initial_utm_source
, initial_utm_campaign
, etc. This functionality can be disabled with the initialization setting {skip_first_touch_marketing: true}
.
Support for automatic page-view tracking has been restored. With the init option {track_pageview: true}
, an event named $mp_web_page_view
will be tracked on pageload, containing properties identifying the current page (current_page_title
, current_url_path
, etc.) as well as any UTM parameters and Click Identifiers. Pageview events with these properties can also be triggered manually:
// track a pageview event
mixpanel.track_pageview();
// track pageview with additional properties
mixpanel.track_pageview({'Test variant': 'control'});
Automatic page-view tracking may be turned on by default in a future release.
Miscellaneous updates:
- UUID generation now uses
performance.now()
when available as part of its time-based entropy algorithm - The network payload format now defaults to JSON for any API host containing the string
mixpanel.com
(looser than previous host checks)