mirror of
https://github.com/n8n-io/n8n-docs.git
synced 2026-03-27 09:28:43 +07:00
handle <source> and at least one error
This commit is contained in:
@@ -79,13 +79,27 @@ https://plausible.io/docs/script-extensions?ref=ryansechrest.com#all-our-script-
|
||||
return;
|
||||
}
|
||||
// Add event listeners
|
||||
videos.forEach((video) => {
|
||||
videos.forEach((video) => {
|
||||
// for <video src="">
|
||||
if (video.src) {
|
||||
videoTrackingObj[new URL(video.src).pathname] = {
|
||||
"played": false,
|
||||
"played25": false,
|
||||
"played50": false,
|
||||
"played75": false
|
||||
}
|
||||
} else if (video.getElementsByTagName('source').length > 0) {
|
||||
videoTrackingObj[new URL(video.getElementsByTagName('source')[0].src).pathname] = {
|
||||
"played": false,
|
||||
"played25": false,
|
||||
"played50": false,
|
||||
"played75": false
|
||||
}
|
||||
} else {
|
||||
let currentPage = window.location.href;
|
||||
fetch('https://internal.users.n8n.cloud/webhook/docs-video-not-tracking?docsPage='+currentPage);
|
||||
}
|
||||
|
||||
video.addEventListener("play", trackVideoPlayWithPlausible);
|
||||
video.addEventListener("timeupdate", trackTimeIntervalsWithPlausible);
|
||||
video.addEventListener("ended", trackVideoEndedWithPlausible);
|
||||
|
||||
@@ -10,6 +10,7 @@ This is the documentation for [n8n](https://n8n.io/){:target=_blank .external-li
|
||||
|
||||
It covers everything from setup to usage and development. It's a work in progress and all [contributions](/help-community/contributing/) are welcome.
|
||||
|
||||
|
||||
## Where to start
|
||||
|
||||
<div class="grid cards" markdown>
|
||||
|
||||
Reference in New Issue
Block a user