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
By default matomo generate the unique visitor id but if you want custom vistor id then setVisitorId function allows you to manually set a custom visitor ID for tracking purposes within a React Native application . It will take `visitor-id` parameter.
197
+
By default matomo generate the unique visitor id but if you want custom vistor id then setVisitorId function allows you to manually set a custom visitor ID for tracking purposes within a React Native application . It will take `visitor-id` parameter. It must be a 16 character long hex string
trackMediaEvent function use to monitor user interactions with media content, such as audio or video files. It allows you to track various events related to media playback, such as play, pause, stop, seek, and complete, providing insights into user engagement with your media assets.
| mediaId | (required) A unique id that is always the same while playing a media. As soon as the played media changes. |
262
+
| mediaResource | (required) The URL of the media resource. |
263
+
| mediaType | (required) video or audio depending on the type of the media. You can used MediaType.VIDEO or MediaType.AUDIO |
264
+
| mediaTitle | The name / title of the media. |
265
+
| playerName | The name of the media player, for example html5. |
266
+
| mediaStatus | The time in seconds for how long a user has been playing this media. This number should typically increase when you send a media tracking request. It should be 0 if the media was only visible/impressed but not played. Do not increase this number when a media is paused. |
267
+
| mediaLength | The duration (the length) of the media in seconds. For example if a video is 90 seconds long, the value should be 90. |
268
+
| mediaProgress | The progress / current position within the media. Defines basically at which position within the total length the user is currently playing. |
269
+
| mediaTTP | Defines after how many seconds the user has started playing this media. For example a user might have seen the poster of the video for 30 seconds before a user actually pressed the play button. |
270
+
| mediaWidth | The resolution width of the media in pixels. Only recommended being set for videos. |
271
+
| mediaHeight | The resolution height of the media in pixels. Only recommended being set for videos. |
272
+
| mediaFullScreen| Should be 0 or 1 and defines whether the media is currently viewed in full screen. Only recommended being set for videos. |
273
+
| mediaSE | An optional comma separated list of which positions within a media a user has played. For example if the user has viewed position 5s, 10s, 15s and 35s, then you would need to send 5,10,15,35. We recommend to round to the next 5 seconds and not send a value for each second. Internally, Matomo may round to the next 15 or 30 seconds. For performance optimisation we recommend not sending the same position twice. Meaning if you have sent ma_se=10 there is no need to send later ma_se=10,20 but instead only ma_se=20. |
274
+
275
+
276
+
277
+
#### Examples
278
+
279
+
```js
280
+
281
+
trackMediaEvent({siteId:"siteid",mediaId:"unique id",mediaTitle:"video media play track",playerName:"test 08",mediaType:MediaType.VIDEO,mediaResource:"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",mediaStatus:"100",mediaLength:"100",mediaFullScreen:"1",mediaHeight:"720",mediaWidth:"1080",mediaProgress:"100"});
282
+
283
+
```
263
284
264
285
265
286
## Methods
266
287
267
288
268
-
| Method |Require Paramter| Android | ios | Android TV | Apple TV |
289
+
| Method |Required Parameter| Android | ios | Android TV | Apple TV |
0 commit comments