faro-web-sdk
faro-web-sdk copied to clipboard
React Router integration. Add log of previous route.
Description
Current version of React Router logs only destination of route. It would be useful if previous route also was logged. Example of an event:
{
"events": [
{
"name": "routeChange",
"domain": "browser",
"attributes": {
"url": "http://localhost:3000/lk/personal",
"route": "/lk/personal",
"from": "/index"
},
"timestamp": "2023-01-16T09:02:53.416Z"
}
]
}
Hey @CyberDoge !
Before working on this, can you provide a little bit of context why this is needed?
The previous URL/route can be obtained by checking the previous routeChange event for the current session ID.
Hello, i just wanted to log how a potential user would be redirected to 404 page
@bfmatei has this been implemented already?
@eskirk
Double checked. Is implemented for React Router V6 but not for V5