5.5.3 • Published 3 years ago
tracking-wallet v5.5.3
Tracking wallet
v5.5.1
- add the properties in camelCase to the events, keeping the old ones.
v5.4.0
- added dynamic props to page method under TrackingWallet class
- each page view / Loaded a page event now can be customized with new properties by passing in argument
v5
- removes
jquery
from the bundle. This may introduce some breaking changes in the projects which still rely on it. - support for Server Side Rendering (only uses
window
if it's available) - recovered agent identification functionality from v4
userRole
tracking property automatically detected from session + cookies for one of the following values:- insured
- agent
- CW Internal User
- CW test
- Simplified
alias
logic. Only sends an alias call to Segment/Mixpanel if theuserRole
is NOTagent
- NO event is sent to Segment if the
userRole
isCW Test
(internal automated tests)
Migrate from v4 to v5
extractDataForm
method deprecated. JQuery is removed from the library, tracking-wallet is no longer in charge of gathering the data from hidden inputs: each host project will provide the data for the event methods in their own way.init
method deprecated and with it, theskipPageViewEvents
option is deprecated too. Tracking-wallet will no longer emit a custom event for page views. For a page view event just usetrackingWallet.page()
. To start using the library, it is enough just to instantiate it:
import TrackingWallet from "tracking-wallet"
const tracker = new TrackingWallet();
tracker.track();
preserveUTMTags
method deprecated. Just remove it's calls.getUserId
method deprecated. Use the following instead:
const id = trackingWallet.getAnalyticsUser().userId;
Migrate from v3 to v4
- Remove calls to
timeEvent
method. The calls can stay but will fall back to an additional track event for the same event name ended in_TIME_EVENT
- Remove all references to
window.mixpanel
from the project
Usage
ES6 Module:
import TrackingWallet from 'tracking-wallet';
const trackingWallet = new TrackingWallet();
trackingWallet.identify('userId', { /* User traits */ });
trackingWallet.track({ /* Event */}, { /* Event options */});
or use the bundled version:
<script type="text/javascript" src="<path>/dist/tracking-wallet.min.js"></script>
<script type="text/javascript">
var trackingWallet = new window.TrackingWallet();
trackingWallet.identify('userId', { /* User traits */ });
trackingWallet.track({ /* Event */}, { /* Event options */});
</script>
- If
window.analytics
object is not ready before event is sent this event is stored in the queue and gets processed as soon aswindow.analytics
is ready.
Developement
You don't need to run a separate script to bundle the minified version of the code. It will be done automatically and added to your commit when you make changes in the src
directory.
5.5.2-rc.0
3 years ago
3.6.0
3 years ago
5.5.3
3 years ago
5.5.2
3 years ago
5.5.1
3 years ago
5.5.0
3 years ago
5.4.0
3 years ago
5.5.0-rc.0
3 years ago
5.4.1-rc.0
3 years ago
5.3.6
3 years ago
5.3.5
3 years ago
5.3.4
3 years ago
5.3.3
4 years ago
5.3.2
4 years ago
5.3.1
4 years ago
5.2.2
4 years ago
5.3.0
4 years ago
5.3.3-rc.0
4 years ago
5.3.1-rc.0
4 years ago
5.2.1
4 years ago
5.2.0
4 years ago
5.1.2
4 years ago
5.1.1
4 years ago
5.1.0
4 years ago
5.0.0
4 years ago
5.0.0-rc.4
4 years ago
5.0.0-rc.5
4 years ago
5.0.0-rc.2
4 years ago
5.0.0-rc.3
4 years ago
4.0.2-rc.0
4 years ago
5.0.0-rc.0
4 years ago
4.0.2
4 years ago
5.0.0-rc.1
4 years ago
4.0.1-rc.0
4 years ago
4.0.0
4 years ago
3.5.4
5 years ago
3.5.0
5 years ago
3.4.0
5 years ago
3.0.15
7 years ago
3.0.11
7 years ago
3.0.10
7 years ago
3.0.8
7 years ago