Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Kyle Gilman

    (@kylegilman)

    It’s important to put code between backticks so the WordPress forum software doesn’t mangle it.

    Are you getting any errors in the development/JavaScript console in your browser? Can you turn on WP_DEBUG_LOG and check if there are any errors in wp-content/debug.log? I think it might be failing silently but it’s always good to know if there’s an error message.

    Which plugin are you using for your S3 redirection? I’ll try testing it out later.

    Thread Starter neilsavage

    (@neilsavage)

    Thanks, here’s the code again in the backticks:

    <script type='text/javascript'>
    /* <![CDATA[ */
    var kgvidL10n_frontend = {"ajaxurl":"http:\/\/staging.paulrabilexperience.com\/wp-admin\/admin-ajax.php","ajax_nonce":"1cc86558d6","playstart":"Play Start","completeview":"Complete View","next":"Next","previous":"Previous"};
    /* ]]> */
    </script>
    <script type='text/javascript' src='http://staging.paulrabilexperience.com/wp-content/plugins/video-embed-thumbnail-generator/js/kgvid_video_embed.js?ver=4.505'></script>
    <script type="text/javascript">if(typeof videojs !== "undefined") { videojs.options.flash.swf = "http://staging.paulrabilexperience.com/wp-content/plugins/video-embed-thumbnail-generator/video-js/video-js.swf?4.7.0"; }</script>

    No errors in the console, both firebug and chrome. Checked on in the debug log, but nothing is there either.

    I am using the widget: Amazon Web Services along with WP Offload S3. I may try disabling some plugins while you test on your end.

    Thanks!

    Plugin Author Kyle Gilman

    (@kylegilman)

    If you’re not getting any errors, let’s verify that the plugin thinks it can count views in the first place. Can you find a <div> with the class kgvid_videodiv and post the whole code for everything within that div? Most important is the attribute data-kgvid_video_vars

    Thread Starter neilsavage

    (@neilsavage)

    Here’s the code of you requested:

    <div id="video_kgvid_0_div" class="fitvidsignore kgvid_videodiv" data-id="kgvid_0" data-kgvid_video_vars="{"id":"kgvid_0","attachment_id":false,"player_type":"Video.js","width":"1080","height":"608","fullwidth":"true","countable":false,"autoplay":"false","set_volume":"1","mute":"false","meta":false,"endofvideooverlay":"https:\/\/s3-us-west-2.amazonaws.com\/members.paulrabilexperience.com\/wp-content\/uploads\/2015\/10\/12195009\/weapon1.jpg","resize":"true","auto_res":"automatic","right_click":false}" itemprop="video" itemscope itemtype="https://schema.org/VideoObject"><meta itemprop="thumbnailUrl" content="https://s3-us-west-2.amazonaws.com/members.paulrabilexperience.com/wp-content/uploads/2015/10/12195009/weapon1.jpg" /><meta itemprop="embedUrl" content="https://s3-us-west-2.amazonaws.com/members.paulrabilexperience.com/wp-content/uploads/2015/10/12195003/weapon1-1280x720.mp4" /><meta itemprop="contentUrl" content="https://s3-us-west-2.amazonaws.com/members.paulrabilexperience.com/wp-content/uploads/2015/10/12195003/weapon1-1280x720.mp4" /><meta itemprop="name" content="false" /><meta itemprop="description" content="Video" /><meta itemprop="uploadDate" content="2015-10-12T19:51:09+00:00" /><video id="video_kgvid_0" controls preload="none" poster="https://s3-us-west-2.amazonaws.com/members.paulrabilexperience.com/wp-content/uploads/2015/10/12195009/weapon1.jpg" width="1080" height="608" class="fitvidsignore video-js kg-video-js-skin" data-setup='{ "language": "en" }'><source src="https://s3-us-west-2.amazonaws.com/members.paulrabilexperience.com/wp-content/uploads/2015/10/12195003/weapon1-1280x720.mp4?id=0" type="video/mp4" data-res="Full"></video></div>

    I see countable:false in there. Could that be the problem?

    Plugin Author Kyle Gilman

    (@kylegilman)

    Yes, that is definitely why it’s not counting video views. Now I need to figure out why it’s showing up as false. What’s the shortcode you’re using?

    Thread Starter neilsavage

    (@neilsavage)

    I’m using the single video shortcode

    [KGVID poster="https://s3-us-west-2.amazonaws.com/members.paulrabilexperience.com/wp-content/uploads/2015/10/12195009/weapon1.jpg"]https://s3-us-west-2.amazonaws.com/members.paulrabilexperience.com/wp-content/uploads/2015/10/12195003/weapon1-1280x720.mp4[/KGVID]

    Plugin Author Kyle Gilman

    (@kylegilman)

    I think I spotted something in the code. Can you try a test with a video that doesn’t have a hyphen and the video dimensions in the filename? That particular naming structure could be the issue.

    Thread Starter neilsavage

    (@neilsavage)

    Used this shortcode:

    [KGVID]https://members.paulrabilexperience.com/wp-content/uploads/2015/10/13202521/test.mp4[/KGVID]

    Removed the hyphens and video dimensions. Checked the source code and countable still coming up as false.

    Plugin Author Kyle Gilman

    (@kylegilman)

    Ok, that was just a hunch. What about this random string you’ve got in the path after 2015/10/? At what point does that get added in? If it’s not in the _wp_attached_file field in the wp_postmeta database table that would explain the problem.

    Thread Starter neilsavage

    (@neilsavage)

    Ahh, you’re right! I checked the DB and sure enough the _wp_attached_file did not contain that extra string. Not sure why that was there, but when I edited the path of the _wp_attached_file and tested the video, a viewcount of 1 appeared.

    Read into the S3 plugin and the string has something to do with object versioning. I was able to disable it and now no timestamp appears in the path. I’ll have to update all the paths or re-upload all the files.

    I appreciate your help with this. Again, great plugin!

    Plugin Author Kyle Gilman

    (@kylegilman)

    Glad I could help out. It’s always tricky when S3 gets involved. And thank you very much for the donation. I really appreciate it.

    i have the same problem but i dnt knw who to get to the _wp_attached_file part to do the corrections. help plz

    Plugin Author Kyle Gilman

    (@kylegilman)

    N_Thirty, please start your own thread in order to get faster support. I missed these because they were listed as resolved already. If you do have the same problem as neilsavage, then you don’t need to access _wp_attached_file, you just need to disable object versioning in Amazon S3.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Video Views not tracking’ is closed to new replies.