Skip to content

Commit 7ad0ba5

Browse files
author
Mark Wolff
authored
Update javascript.md
1 parent 9de6c1a commit 7ad0ba5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

articles/azure-monitor/app/javascript.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ By default, this SDK will **not** handle state-based route changing that occurs
143143

144144
Currently, we offer a separate [React plugin](#react-extensions) which you can initialize with this SDK. It will also accomplish route change tracking for you, as well as collect [other React specific telemetry](https://github.com/microsoft/ApplicationInsights-JS/blob/17ef50442f73fd02a758fbd74134933d92607ecf/extensions/applicationinsights-react-js/README.md).
145145

146+
> ***Note:*** Only use `enableAutoRouteTracking: true` if you are **not** using the React Plugin. Both are capable of sending new PageViews when the route changes. If both are enabled, duplicate PageViews may be sent.
147+
148+
## Configuration: autoTrackPageVisitTime
149+
150+
By setting `autoTrackPageVisitTime: true`, the time users spend on each page is tracked. On each new PageView, the duration the user spent on the *previous* page is sent as a [custom metric](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-custom-overview) named `PageVisitTime`. This custom metric is viewable in the [Metrics Explorer](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-getting-started) as a "log based metric".
151+
146152
## React extensions
147153

148154
| Extensions |

0 commit comments

Comments
 (0)