• Skip to content
  • Skip to primary sidebar
  • Skip to footer

Foliovision

Main navigation

  • Weblog
    • FV Player
    • WordPress
    • Video of the Week
    • Case Studies
    • Business
  • About
    • Testimonials
    • Meet the Team
    • We Support
    • Careers
    • Contact
    • Pricing
  • Products
  • Support
    • FV Player Docs
    • Pro Support
  • Login
  • Basket is empty
Affordable VAST/VPAID for Wordpress has arrived. Serve ads with your videos starting today!

How to Create a Custom Report of FV Player Video Playback Stats

30 May 2023 / Martin / 4 Comments

For the last two years wur WordPress video plugin FV Player has offered basic video playback stats out of the box – providing number of video plays per day along with the number of playback minutes for each video per day. Before that we leaned on Google Analytics for detailed playback stats. These days more and more publishers are abandoning Google analytics or there are video publishers who would like to track video views but don’t have the in-house technical expertise to set up advanced Google Analytics integration.

So we’ve been steadily improving our built-in video stats and video watch tracking. We recently started to track video plays for each WordPress user separately and added a handy CSV export feature.

The export gives you a data for a single user which you select. Naturally immediately we were faced a number of requests for much more elaborate reports. Since the whole point of the integrated stats was to offer a simple way to view stats, we are in no hurry to build a full report building framework. Of course, the more features we add, the more byzantine the report requests will become. It’s a Sisyphian task.

The whole point of the current stat system is to make it very easy for publishers to keep track of the most important stats directly in the FV Player. If someone wants to manipulate the stats further, the way to go about it is to download the stats and analyse them in an external application like Apple Numbers, Open Office or Excel.

A full export of all the stats data might sound nice but in the end it’s impossible to work with – you really need programming skills to then parse the large amount of data. Instead what we recommend for users who have both the technical skills and the appetite for massive stats analysis is to query the database directly for the exact data they’d like.

The FV Player Video Stats database tables are clearly structured, so here’s how to create you own custom export.

Structure of the wp_fv_player_stats database table

The actual table contains the number of plays and seconds played for the date, FV Player Video ID, FV Player ID, post ID and user ID:

  • id – row ID
  • id_video – FV Player Video ID
  • date – date
  • play – number of plays
  • id_player – FV Player ID
  • id_post – post ID
  • user_id – user ID, will be 0 for non-logged in users
  • seconds – number of seconds played

Export of such data does not suffice for any practical use as it’s just IDs.

Here’s how to use the SQL JOIN to pull in some readable data:

SELECT user_email, date, pl.id AS player_id, src, post_title, play, seconds, ROUND(meta_value) AS duration
  FROM `wp_fv_player_stats` AS s
  # Obtain user data
  JOIN `wp_users` AS u ON s.user_id = u.ID
  # Post title
  JOIN `wp_posts` AS p ON s.id_post = p.ID
  # Video duration is stored in wp_fv_player_videometa
  JOIN `wp_fv_player_videos` AS v ON s.id_video = v.id
  JOIN `wp_fv_player_videometa` AS vm ON v.id = vm.id_video
  # and player ID
  JOIN `wp_fv_player_players` AS pl ON FIND_IN_SET( v.id, pl.videos )
  # Needed to load the video duration from wp_fv_player_videometa
  WHERE meta_key = 'duration'
  # Limit results by date
    AND date BETWEEN '2023-05-29' AND '2023-05-30'
  ORDER BY s.id DESC

This way you can add more columns as needed, or filter by certain post IDs or taxonomies.

Martin Vicenik

Martin Viceník

Martin graduated as an engineer in Computer Science from Slovak Technical University in Bratislava. He grew up in Liptovský Mikuláš in northern Slovakia next to the beautiful Tatra mountains. He is the developer behind our FV Player.

Categories: FV Player

Related Posts

  1. User Stats

  2. Playback Stats

  3. Keep Track of Individual Viewers

Reader Interactions

Comments

  1. ryan k. 9 October 2023 at 12:38 pm

    this is fantastic. how can i have the video title in the report? (the title that is entered into FV player) – as the post title isnt helpful in our scenario….

    Reply
  2. Martin 11 October 2023 at 10:44 am

    Hello Ryan,

    You can easily change the SELECT part of the query from:

    SELECT user_email, date, pl.id AS player_id, src, post_title, play, seconds, ROUND(meta_value) AS duration

    To:

    SELECT user_email, date, pl.id AS player_id, src, caption, post_title, play, seconds, ROUND(meta_value) AS duration

    Thanks, Martin

    Reply
  3. ryan k. 11 October 2023 at 11:51 pm

    and can it be run inside phpmyadmin or must be server command

    Reply
  4. Martin 12 October 2023 at 11:14 am

    Hello Ryan,

    You can use phpMyAdmin too.

    Thanks, Martin

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You can click here to Subscribe without commenting

Primary Sidebar

Categories

  • Business
  • Camera Reviews
  • Case Studies
  • Design
  • FV Player
  • Internet Marketing
  • IT
  • Life
  • SEO
  • Slovak
  • Video of the Week
  • WordPress

Footer

Our Plugins

  • FV WordPress Flowplayer
  • FV Thoughtful Comments
  • FV Simpler SEO
  • FV Antispam
  • FV Gravatar Cache
  • FV Testimonials

Free Tools

  • Pandoc Online
  • Article spinner
  • WordPress Password Finder
  • Delete LinkedIn Account
  • Responsive Design Calculator
Foliovision logo
All materials © 2025 Foliovision s.r.o. | Panská 12 - 81101 Bratislava - Slovakia | info@foliovision.com
  • This Site Uses Cookies
  • Privacy Policy
  • Terms of Service
  • Site Map
  • Contact
  • Tel. ‭+421 2/5292 0086‬

We are using cookies to give you the best experience on our website.

You can find out more about which cookies we are using or switch them off in .

Powered by  GDPR Cookie Compliance
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

Necessary Cookies

Strictly Necessary Cookie allow you to log in and download your software or post to forums.

We use the WordPress login cookie and the session cookie.

If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.

Support Cookies

Foliovision.com uses self-hosted Rocket.chat and self-hosted Freescout support desk to provide support for FV Player users. These cookies allow our visitors to chat with us and/or submit support tickets.

We are delighted to recommend self-hosted Rocket.chat and especially Freescout to other privacy-conscious independent publishers who would prefer to self-host support.

Please enable Strictly Necessary Cookies first so that we can save your preferences!

3rd Party Cookies

This website uses Google Analytics and Statcounter to collect anonymous information such as the number of visitors to the site, and the most popular pages.

Keeping this cookie enabled helps us to improve our website.

We reluctantly use Google Analytics as it helps us to test FV Player against popular Google Analytics features. Feel free to turn off these cookies if they make you feel uncomfortable.

Statcounter is an independent Irish stats service which we have been using since the beginning of recorded time, sixteen years ago.

Please enable Strictly Necessary Cookies first so that we can save your preferences!