Support video media analytic
This commit is contained in:
parent
e7aa6925e5
commit
840d539a47
@ -41,6 +41,13 @@ function initMatomo (registerHook, peertubeHelpers) {
|
|||||||
window._paq.push(['trackPageView']);
|
window._paq.push(['trackPageView']);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
registerHook({
|
||||||
|
target: 'action:video-watch.player.loaded',
|
||||||
|
handler: function () {
|
||||||
|
window._paq.push(['MediaAnalytics::scanForMedia', window.document]);
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "peertube-plugin-matomo",
|
"name": "peertube-plugin-matomo",
|
||||||
"version": "0.0.3",
|
"version": "0.0.4",
|
||||||
"description": "Matomo plugin that tracks page views on a PeerTube instance.",
|
"description": "Matomo plugin that tracks page views on a PeerTube instance.",
|
||||||
"engine": {
|
"engine": {
|
||||||
"peertube": ">=1.3.0"
|
"peertube": ">=1.3.0"
|
||||||
@ -18,7 +18,9 @@
|
|||||||
"clientScripts": [
|
"clientScripts": [
|
||||||
{
|
{
|
||||||
"script": "client/common-client-plugin.js",
|
"script": "client/common-client-plugin.js",
|
||||||
"scopes": [ "common" ]
|
"scopes": [
|
||||||
|
"common"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"translations": {}
|
"translations": {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user