Releases: mixpanel/mixpanel-js
Remove obsolete autotrack event count metrics
v2.20.0 v2.20.0
Better error-handling and server-side support
- Exceptions when decoding JSON now throw a real
SyntaxError
rather than a Plain Old JavaScript Object. - Loading the SDK and running basic operations (init, identify, track) no longer causes exceptions in non-browser environments (although it doesn't actually send tracking calls over the network). This is useful for allowing
mixpanel-js
code to run unmodified in contexts like server-side rendering and non-browser tests.
Prevent Autotrack collecting attrs from input, textarea, select, contenteditable elements
Bug fix for Autotrack inadvertently removing form.inputs in certain cases
v2.16.0 made it possible for replace to be called on an input element if it has id="name" or name="id". This revision guards against this by ensuring type is string before calling any replace.
Prevent Autotrack collecting attrs from password or hidden fields
Always track via HTTPS.
Previously, track calls to api.mixpanel.com would be made using whatever protocol the page was loaded with. Now they will always use HTTPS.
people.unset() and miscellaneous fixes
The library now supports people.unset()
; see https://mixpanel.com/help/reference/javascript-full-api-reference#mixpanel.people.unset for documentation.
NB: If using the embed code "snippet" for your mixpanel installation, please upgrade to the latest snippet to use people.unset()
safely.
Other fixes:
- Identify Chrome OS correctly (for $os property)
- Bugfix:
register_once()
no longer overwrites previously-registered but falsey values - Stub parts of DOM API when loading in non-browser environments (thanks @gfx)
- Log full "Implementation error" exceptions when DEBUG mode is on
v2.10.0
Notifications URL-encoding fix
Notifications data now fetches from v2 API, which pre-sanitizes and encodes URL fields. Fixes encoding of URL fields with special chars such as https://www.mydomain.com/?param1='$value'¶m2=Hello World
.