You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-2Lines changed: 38 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,10 +55,16 @@ trackMediaEvent
55
55
56
56
### createTracker()
57
57
58
-
The createTracker function is used to instantiate a tracker object for Matomo analytics within a React Native application .It will take `matomo-url` and `siteId` parameter.
58
+
The createTracker function is used to instantiate a tracker object for Matomo analytics within a React Native application .It requires the parameters `matomo-url` and `siteId`, with the optional parameter `auth_token`.
59
+
60
+
<!-- If you want to create matomo auth_token refere this link https://matomo.org/faq/general/faq_114/ -->
61
+
59
62
#### note
60
63
for matomo-url madatory to add `/matomo.php` end of url.
The MatomoTracker starts a new session whenever the application starts. If you want to start a new session manually, you can use the startSession() function.
@@ -288,7 +302,7 @@ trackMediaEvent({siteId:"siteid",mediaId:"unique id",mediaTitle:"video media pla
288
302
289
303
| Method | Required Parameter | Android | ios | Android TV | Apple TV |
@@ -310,6 +324,28 @@ trackMediaEvent({siteId:"siteid",mediaId:"unique id",mediaTitle:"video media pla
310
324
311
325
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow. -->
312
326
327
+
## Troubleshooting
328
+
329
+
<details>
330
+
<summary>How do I fix the tracking failure “Request was not authenticated but should have</summary>
331
+
<br>You see a failed tracking request with this error message when you use specific tracking parameters as part of the <ahref="https://developer.matomo.org/api-reference/tracking-api">HTTP tracking API</a> without authenticating the request correctly</br>
332
+
<br>When such an error occurred, you need to make sure to set a token_auth of a user with at least write permission. If you have set a token, check the set token to make sure it is still the same and no copy/paste error has happened.</br>
333
+
334
+
<br>To generate a token_auth follow these steps:</br>
335
+
336
+
* Log in to Matomo
337
+
* Go to the Matomo Admin through the top menu
338
+
* Click on Personal -> Security
339
+
* At the bottom of the page click on “Create new token”
340
+
* Confirm your account password
341
+
* Enter the purpose for this token
342
+
* Choose if the token should only be valid for secure requests (Matomo 5 and newer)
343
+
344
+
Click on “Create new token”
345
+
You will now see the newly created token. Save it somewhere safe as you won’t be able to see it anymore once you leave that screen. For example, save it in a password manager. If you lose it, you will need to generate a new token.
346
+
347
+
</details>
348
+
313
349
## License
314
350
315
351
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE) file for details
0 commit comments