All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- fix logging in "debug" mode
- catch potential errors due to the "unique" method from the "unique-selector" library
- use
collectorApiUrl
property in/settings
response to make tracking requests
GravityRecordingSettingsError
enumerationAddSessionUserActionsError
enumeration
- update documentation about selectors
- DOM snapshot recording has been totally removed,
- and option
inlineResources
has been removed consequently
- add logger in collector options
- add
stop
function to stop recording - don't record userActions on elements having (or having parent having)
rr-ignore
orrr-block
classnames
- catch 'querySelector' exception in findLabelForElement (not so relevant)
- new anonymization consideration: all texts/images are systematically anonymized. Exceptions are set via Gravity
through the parameter
allowList
(see typeAnonymizationSettings
) - use @smartesting/rrweb-XXX packages
- pass window from collectorOptions to video recorder
- option
allowList
to control anonymization exceptions (set via Gravity client)
- options
videoAnonymization
,snapshotAnonymization
,anonymizeSelectors
&ignoreSelectors
removed
- revert sending snapshot when recording is initialized: this was causing a problem when running Cypress tests
- send snapshot when initialize recording to prevent missing snapshots
- if the
initWithOverride
method is used, a session started user action is now sent
- if a
window
is passed as an option, it is now used to complete certain information on user actions, such as the title or the path of the page for example
inlineResources
option to inline (or not) the style of the recorded snapshots
GravityCollector.getSessionId()
provides the current session id.GravityCollector.initWithOverride()
overrides potential existing instances.
- All code related to Cypress is gone in gravity-cypress-plugin
- compress snapshots before sending them to Gravity server
- store screenshot of the visited pages.
- all the recording options have been removed from the GravityCollector initialization. These options are now exclusively settable from the Gravity app.
- options
cookieStrategy
andcookieWriter
to enable various strategies for setting cookies. #29
- option
useHashInUrlAsPathname
which handles cases where the href of the pages looks like thishttp://mysite.com/#/something/else
- add optional
interactiveTarget
field inTargetedUserAction
to save ancestor element holding click listener
mouseenter
and mouseleave
events capture, which could be the cause of slowdowns
wheel
event capture, which could be the cause of slowdowns
- catch exception
Uncaught ReferenceError: process is not defined
in methoddiscoverBuildId
- Add options
anonymizeSelectors
&ignoreSelectors
to precisely control recording of some elements
- Some events are not replicated anymore when they are triggered multiple times with the same target to avoid spamming:
scroll
wheel
touchmove
resize
- remove the following deprecated options:
excludeRegex
: useselectorsOptions
insteadcustomSelector
: useselectorsOptions
insteadoriginsToRecord
: userecordRequestsFor
instead
- fix exception
Uncaught ReferenceError: process is not defined
in methoddiscoverBuildId
- The session timeout was reset with each new tab, causing sessions to last several days
- The session timeout was not reset after new user events
- Update
UserActionData
to embed data about the targeted element.
- Anonymization of video recordings controllable from Gravity
- Option to enable/disable video recording anonymization in debug mode
- Track new HTML events:
contextmenu
dblclick
copy
cut
paste
select
dragstart
drop
play
pause
seeked
fullscreenchange
resize
hashchange
focus
blur
submit
reset
mouseenter
mouseleave
scroll
wheel
toggle
touchstart
touchmove
touchend
touchcancel
data-testid
attribute is now collected by default on targeted user actions
- add collector option
enableEventRecording
to (de)activate event recording - add collector option
enableVideoRecording
to (de)activate video recording
- Option
disableVideoRecording
replaced byenableVideoRecording
(reversed)
- Fix video records loss after session timeout
- Option to disable video recording of sessions
- Request interval option default value is reduced to 1000 (instead of 5000)
- Last events of video recording were not sent to Gravity
- Stream screen recordings
- Add screen recording with
rrweb
- Centralize API endpoints in the
HttpGravityClient.ts
file
- Add option
buildId
to ease specifying the buildId instead of relying on global variables.
- Add request errors
project_not_found
andproject_expired
to prepare the concept renamingdomain
intoproject
- Allow specifying window when initializing collector #24
- Gravity Data Collector import from an HTML tag #23
- Use new API endpoint for Gravity (https://api.gravity.smartesting.com)
- fetch methods now automatically follow redirects
- Cypress event tracking: reduce
command.args
property if too large
- force "user actions" flushing on Cypress event "test:after:run"
- Cypress event tracking: send all the events to Gravity
- batch user action sending
CookieSessionIdHandler
: prevent error whendocument.location
has not been defined
- Cypress event tracking: skip some events (named 'then', 'task' or 'wrap')
- track Cypress test information (if available) as a new
TestCommand
user action
- Prevent creating a new session for each action if the URL is an IP address
- add
testingTool
property toTestContext
to store used testing tool (e.g. Cypress)
- Store Cypress test context in tracked SessionStartedUserAction
- Prevent "Cannot read properties of undefined (reading 'toLowerCase')" runtime error
- Trigger a
Change
event when typing in a text field (<input type="text" />
or<textarea />
) #20
- XHR requests were not recorded
- Option
originsToRecord
, renamedrecordRequestsFor
- Track multiple selectors for targets
- Option
selectorsOptions
allowing fine tuning of target selectors - Option
originsToRecord
allowing record of requests - Fetch button on sample page
- Field
selector
ofUserActionTarget
. - Option
excludeRegex
andcustomSelector
ofCollectorOptions
- Prevent the error triggered by a drag'n drop event
- Fix the search for the label associated with an element
- Send
buildId
in SessionStartedUserAction whenGRAVITY_BUILD_ID
orREACT_APP_GRAVITY_BUILD_ID
is set.
IdentifySessionError
enumeration
AddSessionUserActionsError
enumeration
- New option
sessionsPercentageKept
: rate (in 0..100) of sessions to be collected (default is 100). - New option
rejectSession
: boolean function to disable session tracking
- New option
excludeRegex
: regular expression to define ID and class names to ignore in selector computation. - New option
customSelector
: string indicates the attribute to use as a selector if defined on an HTML element targeted by a user action.
- Session cookies are now saved at the
root
of the website. This prevents some bugs due to a change of session id between two different pathnames
- New storage for session identifiers:
session cookies
. This ensures that the same session is maintained when browsing different subdomains of a superdomain - A session now expires after
30 minutes
without user action
- Type
Traits
renamed more precisely toSessionTraits
and moved totypes.ts
file - Type
TraitValue
renamed more precisely toSessionTraitValue
- Method
sendSessionTraits
now returns a response typedIdentifySessionResponse
with well-typed error - Method
sendSessionUserActions
now returns a response typedAddSessionUserActionsResponse
with well-typed error
- Stop tracking when receiving errors specified in config.ts
- Prevent error in method
isKeyAllowedByKeyListeners
onPublish
callback function called each time events are sent to the gravity server.
- Update README.md: describe how to identify session with traits
- Add
GravityCollector.identifySession
method to record custom session data
- Records all
click
events, even where they are fired by a key or an automated test framework
- Sending user actions twice when
maxDelay
is set to0
- Collect
Enter
andNumpadEnter
key down and press while targeting an input
- Start a new session when the collector is run in a Cypress test context and the current test name is different from the previous one.
- Stop collecting consecutive keydown actions targeting the same element ( see #9)
- Remove version from the minified script link in README and sample
- Restore the local link toward local dist-sandbox/bundle.js in sample
- Minified version are not available for previous releases
- A minified version is now deploy with npm package and can be accessed using UNPKG service
- Do not set
Origin
header when no source is provided. ( see #8) - Do not access directly
global.document
, leave it to a function dedicated ifglobal
is not defined. ( see #7)
- Add
source: string
optional parameter tosendSessionUserActions
- Export
sendSessionUserActions
in types.ts
- Use
window.sessionStorage
to save and retrieve user session id. - Use
beforeunload
to collect form submission
- Add display info to target:
label
,placeholder
andtext
. - Add a
select
element to sample.
- Emit
ES5
Javascript code instead ofes2021
- Stop recording
click
while it is fired by keyboard ( see #2) - Objects sent to Gravity Server are now called
SessionUserAction
instead ofSessionEvent
- Stop recording
unload
- Stop recording the whole
attributes
object from html elements
- Simplify sample
- Strip trailing slash in
gravityServerUrl
(see #6)
- Previous releases were broken.
- Track user events:
sessionStarted
,click
,change
andsessionEnded
(which corresponds to theunload
DOM event) - Add debug options: when set to
true
, logs events in the console instead of sending to Gravity