Tracking video with Google Analytics

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
olgarev_tw
Posts: 54
Joined: Tue Oct 28, 2014 8:07 am

Tracking video with Google Analytics

Unread post by olgarev_tw »

Hi!

I have a FAQ page in my project with a number of short "how-to" videos (mp4). I'm trying to track the number of playbacks for each of them using the Google Analytics. The problem is I'm a newbie both in GA and javascript as well )
So, I see two possible ways to realize this:
1 - to place all mp4 files on the same FAQ page, play them using the Lightbox and track the playbacks with GA. In this case, I suppose, the embeded code for the video should include the GA script, such as ga('send', 'event', 'videos', 'play', 'mp4_name'). But this does not work at all.
2 - to place each mp4 file as a separate topic, not included in the TOC, and track the page loads with GA. In this case the FAQ page contains the links to these topic pages, and when a user clicks the link he sees the topic page and the video starts playing automatically. The issues are that I cannot force the autoplay and don't know how to return the user back to the FAQ page after the video finished.

Hope you can help me )
Thanks in advance!

Olga
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Tracking video with Google Analytics

Unread post by Tim Green »

Hi Olga,

Are you already using the integrated GA tracking option in HM WebHelp? The scripts used there currently don't include any tracking for videos or image toggles, and the code for that would need to be included in the source of the topic pages, so that clicking on the video would trigger the tracking function. Similarly, autoplay would also have to be set up to trigger tracking.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
olgarev_tw
Posts: 54
Joined: Tue Oct 28, 2014 8:07 am

Re: Tracking video with Google Analytics

Unread post by olgarev_tw »

Hi Tim.
Yes, I do use the integrated GA tracking option in this HM project. I've already explored the helpman_topicinit.js and found the HMTrackTopiclink function. Should the GA scripts be included right there? How it can be done in HM? I use the customizes skin for the project. Or should I use the HTML code object right in the FAQ topic?
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Tracking video with Google Analytics

Unread post by Tim Green »

Hi Olga,

What I meant was that at the moment you can't do this at all, sorry. There is nothing that you can add to activate this, because 1) The scripts would need to be changed and expanded and 2) Help+Manual would need to add code to every video link in order to activate the tracking script when the user clicks on the link or when the video is played automatically. This would be a deep change and it would need to take place both in all the skins and in the HTML code that Help+Manual itself generates when it publishes WebHelp.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
olgarev_tw
Posts: 54
Joined: Tue Oct 28, 2014 8:07 am

Re: Tracking video with Google Analytics

Unread post by olgarev_tw »

Oh, I see now, thank you for clearing it for me. May be you will add this option in future versions )
User avatar
Martin Wynne
Posts: 2656
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: Tracking video with Google Analytics

Unread post by Martin Wynne »

Hi Olga,

It's very likely your web hosting package provides some metrics functions. For example Webalizer or Awstats. You can see the number of downloads from the server for each file each month. If you have cPanel on there, scroll down to Metrics.

If not, contact your provider to see if an upgrade to your hosting package is available.

Martin.
olgarev_tw
Posts: 54
Joined: Tue Oct 28, 2014 8:07 am

Re: Tracking video with Google Analytics

Unread post by olgarev_tw »

Hi again,
just want to share the solution I found, may be it will be usefull to someone else.
1) I included the GA js tracking code right into the web page template.
2) After inserting the local video I switched to the Embedded code tab, turned the flag on and inserted the ga command as shown on the screenshot.
And it helped :)
Later on I had to make some other chahges because I needed the Lightbox player. But for the inline player this solution worked well.
You do not have the required permissions to view the files attached to this post.
Post Reply