Skip to content

Commit

Permalink
Updated onRouteUpdate Description
Browse files Browse the repository at this point in the history
  • Loading branch information
imabp authored Sep 16, 2020
1 parent 1452afc commit a41209d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion website/docs/docusaurus-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,8 @@ const MyComponent = () => {

### `onRouteUpdate({location})`

Set the page field to current location on the default tracker, such that subsequent hits on this page are attributed to this page.
If the current rendering environment is on client i.e. `ExecutionEnvironment.canUseDOM === true`, then `onRouteUpdate({location})` updates the Google Analytics plugin
by setting the page value to current path, inorder to measure the number of views one had for a particular page on the website.
Recommended for Single-page Applications.

Usage example:
Expand Down

0 comments on commit a41209d

Please sign in to comment.