Google Analytics – Events Tracking
-
Ever since the March update, Events have not been appearing for video plays in google analytics.
Has anyone else experienced this? Did something change where I need to enable something again on all the videos?
https://ww.wp.xz.cn/plugins/video-embed-thumbnail-generator/
-
Can you post a link to your site so I can see what’s happening?
Here is one page with a video.
http://www.versadial.com/voip-call-recording/I’m wondering, could a cache plugin cause this issue? I have wp fastest cache installed. (only cache plugin that works with gantry and gantry mobile)
That page isn’t loading any of the plugin’s JavaScript so it’s also not loading the Video.js player. In the old version of the plugin those scripts were loaded in the head, but they were moved to the footer to speed up loading times. The most likely explanation is that your template doesn’t call wp_footer(). Are you able to check that?
I see it in the footer.php file
<?php wp_footer(); ?>If its loading is anyone’s guess…as Gantry is a different animal compared to other wp frameworks. In past, I have had to load scripts in widgets on the page instead of usually relying on the footer.
It possibly could be the cache plugin too. What JS should I look for to be loaded if I view source? What I can do is disable the cache plugin and try and search the source file to see if it loads.
You should see something similar to this (from my own site):
<script type='text/javascript' src='http://www.kylegilman.net/wp-content/plugins/video-embed-thumbnail-generator/video-js/video.js?ver=4.5.1'></script> <script type='text/javascript'> /* <![CDATA[ */ var kgvid_ajax_object = {"ajaxurl":"http:\/\/www.kylegilman.net\/wp-admin\/admin-ajax.php","ajax_nonce":"9193ebef3c"}; var kgvidL10n_frontend = {"playstart":"Play Start","completeview":"Complete View","next":"Next","previous":"Previous"}; var kgvid_video_vars_2897 = {"id":"2897","player_type":"Video.js","width":"782","height":"440","countable":"1","autoplay":"false","set_volume":"","meta":"1","endofvideooverlay":"","resize":"true","right_click":"on"}; /* ]]> */ </script> <script type='text/javascript' src='http://www.kylegilman.net/wp-content/plugins/video-embed-thumbnail-generator/js/kgvid_video_embed.js?ver=4.301'></script> <script type="text/javascript">if(typeof videojs !== "undefined") { videojs.options.flash.swf = "http://www.kylegilman.net/wp-content/plugins/video-embed-thumbnail-generator/video-js/video-js.swf?4.4.0"; }</script>I only see the last line on your page. That one is printed in the footer rather than registered and enqueued. Something seems to be blocking the enqueued plugin scripts from showing up in the footer.
Hmm. I’m at a lost then. Not sure what could be blocking it. Tried disabling cache..but nothing changed as far as output. Ill try experimenting I guess.
Is there any javascript code or call that I hardcode into a widget to see if that triggers the load of the script?
I found another plugin author having trouble with Gantry who proposes a solution that might work. You could try the little plugin hack or it might just require adding
add_action('init', 'wp_enqueue_scripts');to your functions.php page.
Why the framework breaks script enqueuing is beyond me. It seems like a bad idea.
Thanks Kyle…I will give it a shot.
Yes, Gantry is a love hate relationship indeed.
Hi Kyle
I am having a similar issue. Events are not pulling through to Google Analytics.
Looks like my page is loading the js.
<script type=’text/javascript’ src=’http://www.kylegilman.net/wp-content/plugins/video-embed-thumbnail-generator/video-js/video.js?ver=4.5.1′></script>
<script type=’text/javascript’>
/* <![CDATA[ */
var kgvid_ajax_object = {“ajaxurl”:”http:\/\/www.kylegilman.net\/wp-admin\/admin-ajax.php”,”ajax_nonce”:”9193ebef3c”};
var kgvidL10n_frontend = {“playstart”:”Play Start”,”completeview”:”Complete View”,”next”:”Next”,”previous”:”Previous”};
var kgvid_video_vars_2897 = {“id”:”2897″,”player_type”:”Video.js”,”width”:”782″,”height”:”440″,”countable”:”1″,”autoplay”:”false”,”set_volume”:””,”meta”:”1″,”endofvideooverlay”:””,”resize”:”true”,”right_click”:”on”};
/* ]]> */
</script>
<script type=’text/javascript’ src=’http://www.kylegilman.net/wp-content/plugins/video-embed-thumbnail-generator/js/kgvid_video_embed.js?ver=4.301′></script>
<script type=”text/javascript”>if(typeof videojs !== “undefined”) { videojs.options.flash.swf = “http://www.kylegilman.net/wp-content/plugins/video-embed-thumbnail-generator/video-js/video-js.swf?4.4.0”; }</script>@desh09 you actually have an unrelated problem. I was not aware that there is a new version of Google Analytics, so the plugin doesn’t send tracking data to Analytics.js, which is what you’re using. I’ll fix it in the next update.
Version 4.4.2 of the plugin, released today, should now track Universal Analytics events.
Hi Kyle
I have installed the latest update and nothing is being pushed to Analytics.
I don’t see any Google Analytics code on your page at http://www.cqs.co.za/caseware/enterprise/bizsuite/
Are you talking about a different site?
Same website. I am using Tag manager to track events.
The topic ‘Google Analytics – Events Tracking’ is closed to new replies.