Google AnalyticsGoogle Analytics has two types for web counters: the old Universal Analytics (ID starts with UA) and the new Google Analytics 4 (ID starts with G). In the builder you can choose one (don't work together). Attention! Google disables the old format and from July 1 2023, only Google Analytics 4 will work. Google Analytics 4Place the standard analytics code on the player page as a Don't forget to enable the With PRO you can also collect ad events (start, skip, and click on ads). Segmentation of eventsYou can segment all events by some attribute. By default, the player uses the content title, if it exists. You can also specify your own attribute with the label option. new Playerjs({id:"player", file:"video.mp4", label:"customer#123"}); You can specify other parameters with the galabels object from version 15.1 new Playerjs({id:"player", file:"video.mp4", galabels:{my_param1:"123", my_param2:"abc"}}); To make this work, you need to find the How to collect other eventsYou can use the JS API to collect other player events, there are many more. For example, you can send an event to GA that the user has played up to 100 seconds. let time100; function PlayerjsEvents(event,player,info){ if(x=="time"){ if(window.gtag && info>100 && !time100){ gtag("event", "playerjs_time", {"time":"100"}); time100 = true; } } if(x=="new"){ time100 = false; } } Universal Analytics (old type)If you are using the old Universal Analytics tag type, specify the tracking ID in the module settings (it must start with UA). Since version 10.09, the value of the title variable is used as an event label. since version 12.6, you can also use a separate label variable for this purpose. |