In my previous post Event Tracking, i have discussed what are the possible events occur and the same way how many event handlers available in the website. In this post i am going to discuss about how to track the video event in the website and how do we create an advance segment to isolate an event from the total visit.
Video Event Tracking:
As we all know that _trackEvent is the method to track events. Let us track the video event. For implementing the video tracking code we need the onclick() event.
<a href=”#” onclick=pageTracker_trackEvent(“videos”,”play”,”play the video”)>Play</a>
We know that pageTracker is the default variable created using ga.js analytics script. We call the function called _trackEvent using pageTracker variable for tracking the event when the video play. In the above code we use the event handler called onclick so whenever you use click the play button we will get event. Category, Action, Label are the default parameters for _trackEvent Method, we use Videos, Play, Play the Video respectively
Same way we will track the stop, pause event in the video. The following are the code we can use
_trackEvent(“videos”,”pause”,”pause the video”)
_trackEvent(“videos”,”stop”,”stop the video”)
Advance Segmentation to separate video events:
Now we will create an advance segmentation for getting how many visits which provides video play events alone. Click an advance segmentation section in the top of the Analytics dashboard. After that click create the new segmentation link you will land the following window
Window1- Advance Segmentation Window For Event Creation
Create the condition like Event category==video&&Event Action==play [== means Exactly match, && means and operator], name the segment as Event with play as mentioned in the window. If you provide the name it will display in the custom segments as in the following window2.
Window2– After Creating Event with play segmentation
Choose the event with play like in the above window. You will separate how many visits with video play event.
Here is the Reference video for how to create advance segmentation:
Contact Us for Further Analytics Customization.
Disclaimer: The post is completely based on individual thoughts and SEO Services Group bears no responsibilities for the thoughts reflected in the post.