Releases: Woopra/browser-tracker
Releases · Woopra/browser-tracker
v5.3.0
v5.3.0 (2021-09-15)
woopra.track:- Updated API to accept 3rd parameter as an object instead of a callback function
onErrorcallback optiononBeforeSendcallback option, receives aWoopraActionobject as an argumentonSuccesscallback option, receives aWoopraActionobject as an argumenttimeoutoption (Number, defaultwoopra.config('idle_timeout'))queueoption (Boolean)- When true, forces the action to be queued and sent as a beacon
- Uses
navigator.sendBeaconinstead of<script>tag injection to make the tracking request - Queued actions are flushed and sent to woopra's tracking servers every time the user closes the tab/window or switches away from the tab, navigates away from the page,
woopra.push()is called, an action has been cancelled or a file download/outgoing link/form track/click track event is captured.
lifecycleoption (String: "page" | "action")- Defaults to
pageforpv, otherwiseaction - Actions with
lifecycleofpagewill update durations through the lifecycle of the page - Actions with
lifecycleofpagewill be updated with the % of the page the user has seen upon scrolling
- Defaults to
retrackoption (Boolean, defaultfalse)- Actions with
lifecycleofpagewill be tracked again if the user is inactive longer thantimeout. The action has the same properties with an extrareturningproperty with the value oftrue
- Actions with
- Errors thrown in callbacks will be caught and logged via
console.error
woopra.update:- New API to update existing actions using an ID of a
WoopraAction woopra.update(id, { updated: 'property' });
- New API to update existing actions using an ID of a
woopra.cancelAction:- New API to cancel actions with
lifecycleofpagefrom further updating themselves using an ID of aWoopraAction woopra.cancelAction(id);
- New API to cancel actions with
WoopraAction:- Object returned from
onSuccessandonBeforeSendcallbacks action.idaction.update({ updated: 'property' })- Equivalent to
woopra.update(action.id, { updated: 'property' })
- Equivalent to
action.cancel()- Equivalent to
woopra.cancelAction(action.id)
- Equivalent to
- Object returned from
woopra.configbeacons(Boolean, defaults to browser support)- Enable/disable usage of beacons
download_extensions(Array)- List of extensions (without '.') to treat as downloadable files
click_pause(Number, default250)- Time in millisecond to pause the browser to ensure that the event is tracked when visitor clicks on an element decorated with
woopra.trackClick. This value is ignored whenbeaconsare enabled.
- Time in millisecond to pause the browser to ensure that the event is tracked when visitor clicks on an element decorated with
form_pause(Number, default250)- Time in millisecond to pause the browser to ensure that the event is tracked when visitor clicks on an element decorated with
woopra.trackForm. This value is ignored whenbeaconsare enabled.
- Time in millisecond to pause the browser to ensure that the event is tracked when visitor clicks on an element decorated with
- Replace utility functions with cherry-picked
lodash-es - Include https://github.com/GoogleChromeLabs/page-lifecycle inline to handle consistent browser behavior