Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Google Analytics NOT working


Hi All,

I have the following code:

<pre class="notranslate">
var playerInstance = jwplayer("videoContainer");
playerInstance.setup({
file: "https://content.jwplatform.com/videos/[videoid]-640.mp4",
width: 512,
height: 288,
//description: 'A video with a basic title and description!',
mediaid: [videoid],
autostart: true,
ga: {}
});
</pre>

I have also appended the Google tracking code to the page, I get hits for when the page is accessed but then no hits are registered when a video is played.

Can someone point me in the right direction?

Thanks

5 Community Answers

Todd

JW Player Support Agent  
0 rated :

Can you send a link to a page where we can reproduce this? Do you have your GA embed code on the page as well? Do you see pings being sent to google-analytics.com?

Please see http://support.jwplayer.com/customer/portal/articles/1417179-integration-with-google-analytics for more details.

rick Webb

User  
0 rated :

Hi Todd,

Thanks for replying, I have been to this page (specified in reply) and is the example followed.

Most of our site (staging) currently sites behind a login but I have created a test page for you to test (https://video.mystaging.co.uk/videos/test-html5/). We would be going live with this soon so would be great if we could get the Google Analytics tracking working before then.

Many thanks.

Todd

JW Player Support Agent  
0 rated :

I see analytics pings being sent to GA with event category of “JW Player Video”. Do you see these in your GA dashboard under Real-Time > Events?

The full ping request is here:

https://www.google-analytics.com/collect?v=1&v=j40&a=1638666443&t=event&_s=3&dl=https%3A%2F%2Fvideo.mystaging.co.uk%2Fvideos%2Ftest-html5%2F%3Fcdlresp%3D1&ul=en-us&de=UTF-8&dt=Test%20HTML5%20-%20Adviser%20Media%20Player&sd=24-bit&sr=1920×1080&vp=1042×805&je=1&fl=19.0%20r0&ec=JW%20Player%20Video&ea=Play&el=https%3A%2F%2Fcontent.jwplatform.com%2Fvideos%2FLsBZTOfV-640.mp4&u=SACAAEABI~&jid=&cid=1103178270.1447430247&tid=UA-34873549-2&cd1=Anonymous&z=1160326039

rick Webb

User  
0 rated :

Hi Todd,

that appears to have registered but then the title of the video is not passed in nor the current page URL? Any ideas as to why this might be?

Also when played through the player there is still no registered events.

Many thanks.

Todd

JW Player Support Agent  
0 rated :

You would need to include the label: ‘title’ parameter inside your ga: {} block to tell our player to send the video title instead of the video URL.

I am seeing the events being sent. Is your GA UA ID being set correctly?

This question has received the maximum number of answers.