Skip to content
This repository was archived by the owner on Jun 20, 2025. It is now read-only.

Commit 687ed25

Browse files
committed
update readme and removed duplicated code
1 parent ea1d39e commit 687ed25

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ If you're using react-router prior to v1.0 please head over to the [react-router
5151
For the url-option you can also include `http://` or `https://` in the beginning of the url, if you piwik installation is on ssl, but your react-site is not, or visa versa.
5252

5353

54+
5455
## Options
5556

5657
### enableLinkTracking: `true`
@@ -91,6 +92,11 @@ By enabling `ignoreInitialVisit` it connects to the history without tracking the
9192

9293
By disabling `injectScript` the `piwik.js` script will not be injected automatically to allow a separate loading.
9394

95+
Starting with version `0.12.0` the usually required options `siteId` and `url` are now optional if a running instance of the piwik tracking script is detected by validating the following cases:
96+
97+
- A `<script>` src matches the url defined via `opts.url` and `opts.clientTrackerName`
98+
- `siteId` and `setTrackerUrl` calls are already present in `window._paq`
99+
94100

95101
### clientTrackerName: `'piwik.js'`
96102

@@ -103,7 +109,7 @@ The name of the `piwik.php` script on the Piwik server. Set this option if the P
103109

104110
### piwikScriptDataAttribute `piwik-react-router`
105111

106-
Starting with version `v0.XXX.0` multiple instances of `piwikreactRouter` can live on the same page and share a tracker script `script[url= opts.clientTrackerName]`. The `siteId` used to instantiate the script is stored in its `data-${piwikScriptDataAttribute}` attribute.
112+
Starting with version `v0.11.0` multiple instances of `piwikreactRouter` can live on the same page and share a tracker script `script[url= opts.clientTrackerName]`. The `siteId` used to instantiate the script is stored in its `data-${piwikScriptDataAttribute}` attribute.
107113

108114

109115
## API

0 commit comments

Comments
 (0)