Gotta catch ’em all!


I created a plugin for WordPress that you can use to store and retrieve xAPI statements (“results”) from H5P content types.

Don’t become butter scraped over too much bread!

H5P does neither have the user management features of moodle nor does if offer the tools for analyzing data like Learning Locker does. I love it for that. I love it, because it’s done on purpose.

H5P is not intended to become a silver bullet system to “end” all silver bullet systems. It will not become a full-blown Learning Management System. It will not allow you to analyze all the data you may collect. It will focus at what it is good at: enabling you to create, remix and share interactive content. However, it doesn’t quite stop there.

There’s more than meets the eye!

Although you may not notice it, H5P makes use of some established standards that allow you to build your own solutions that may be tailored to your particular needs. For example, there is the so called Experience API or xAPI. It’s an open standard that is used to communicate data about learners’ experiences to other platforms:

  • Tom attempted fill in the blanks test.
  • Lisa scored 100 % in the multiple choice quiz.
  • Alice completed the essay.

It actually is a little more powerful. And a little more complicated. Whatever. Let’s simply pretend these statements were test results and let’s say that you can use the interface to send this kind of information to a platform that’s specialized for storing, retrieving and analyzing the data, possibly giving you some valuable insight into where you could help your students.

This is great. And you can choose and use the best tools for the job. Yet, with great freedom comes great inconvenience. At least that’s how some people may perceive it. They don’t want to configure lots of stuff or to switch systems for different tasks. And in some cases, they just want to get a small thing done. All they need is a screwdriver, not a power drill. If you’re one of those people and if you’re using WordPress, I may have something for you.

Gotta catch’em all!

I created a plugin that allows you to catch all those tiny xAPI statements that H5P emits. You can store and retrieve them. Of course, I had to name the plugin H5PxAPIkatchu 😀 (Yes, I know, there’s an additional for a reason).

Gotta catch 'em all!

I might train it, so it could possibly learn some new tricks. However I will not — I repeat — I will not turn it into a power drill. It’s a screwdriver. If you e.g. need to analyze the data, you can export them to a CSV file and import them to a spreadsheet program (boring) or maybe to some Jupyter environment with scikit-learn for some sophisticated machine learning action (cool). And, since it’s open source software, feel free to contribute, fork or build upon!

A word of advice …

Using the plugin is not necessarily the smartest thing to do. One of those xAPI statements is not very large, let’s roughly say up to 2 KB in average. Let’s cut that down because the plugin is not intended to store everything. We might have 1 KB per statement. That’s tiny, right? But each H5P content type typically sends out different statements. Let’s assume five in average. Now we have 5 KB and need to multiply those with the number of people that use the content type. This number will grow over time …

You’ll have to do the math yourself for your particular setting. Just make sure your database has enough storage capacity. There’s a reason why there are programs and platforms that are specialized for tackling this job …

19 Replies to “Gotta catch ’em all!”

  1. Hi!
    I installed your plugin. It looks like it didn’t create a necessary table in the db (wp_h5pxapikatchu_object) because I’m getting a bunch of error logs in my server logs saying the table doesn’t exist (which I confirmed by looking at the database.)

    Would you please update the plugin, or just tell me what needs to be in that table, and I’ll create it myself?

    Thanks a ton!


  2. Thanks! I looked further up in the logs, and it turned out that the table creation statement had character encoding and collation statements at the end that my server didn’t like. I ended up removing those and now it works!

    Thanks again!

    1. Glad you could figure it out.

      The way I implemented it is following the pattern described in the official WordPress documentation. It’s strange that you do not encounter that problem more frequently with other plugins.

      Anyway, I may have stumbled upon a bug when browsing my code, and I’ll check that shortly. So, thanks for reaching out 🙂

  3. Hello,

    I’ve installed your plugin onto one of our test sites but I can’t seem to get it to display the results within the Dashboard.

    I’ve created a short (2 mins 15 secs) video detailing what I’m seeing on the site:

    Any advice you could give me would be great.

    Many thanks


    1. Hi Simon!

      I’ll have time to check your video thoroughly tonight, but from what I saw at a glance it could be two things:
      1) You need to reload a post containing H5P content a) after installing the plugin or b) after changing the settings. Otherwise, the post a) doesn’t know how to listen to the xAPI statements or b) still has the old settings.

      2) You seem to have multi-site enabled. I am actually not sure if there’s some extra stuff regarding e.g. WordPress options that I need to take care of. Never looked into that.


      1. Hi Oliver,

        Thanks for getting back to me so quickly.

        I’ve reloaded the post in question several times but the results don’t appear to show in the Dashboard.

        Also, even when the plugin is activated at the network level it only adds the 4 tables (actor, object, result & verb) to the site that I need them for. I’m not sure whether this was just luck or whether something I did made that happen. There are h5p_results tables for every site on the network as the H5P plugin is activated at network level.



        1. I never tested the plugin on a multisite version of WordPress. Guess that was a mistake 😉 I’ll have a look how database tables and options should be handled properly when using the multisite option.

        2. Hi Simon!

          I just quickly installed a multisite instance and can confirm your observation. When activating the plugin on site level, the main table is not being created for the site, the other four are. Not sure why, but that’s why the plugin can’t write the xAPI statements although they are correctly intercepted. I’ll have to look into how WordPress handles multisite instances.


        3. Hi again!

          First investigation revealed a simple bug that seems to have slipped in, although I am not sure how as I didn’t touch that part of the code recently. The bug would not hurt if you upgraded from a previous version, but it would not create the required tables when installing the plugin for the first time.

          At first glance, the plugin seems to work on multisite now, too, but I’ll check out what I might do to better support multisite handling in the future.

          Thanks for reporting!


          1. Hi Oliver,

            Should I upgrade the plugin then (I can see there is a later version available)?

            If I do upgrade would this potentially solve the issue for me?



  4. Hi Oliver,

    Just to let you know, the update has solved my issue.

    It’s now working great.

    Many thanks for your help.


  5. Good morning (I apologize for the English), I really appreciate the plugin, great job!
    But I have some problem and request if solvable.

    The most important problem: if I view an h5p question or presentation on a page, H5PxAPIkatchu correctly tracks access or response. I would need to insert these elements into a course created with WPLMS, but in this case H5PxAPIkatchu does not track anything, the tracing appears correctly in the external LRS Watershed. Is there a solution? Unfortunately if I do not solve this problem the plugin becomes useless for me.

    If the previous problem is resolved, in order not to force the instructor to enter the backend of the site, would it be possible to view the results of H5PxAPIkatchu on a page of the frontend of the site?

    Finally, but this is a problem related not so much to H5PxAPIkatchu but to h5p in general, if I use the h5p Iframe Embedder module, I do not get any kind of tracking either in H5PxAPIkatchu nor in Watershed, and this even if I display the content in a page at outside the course created in WPLMS. Any ideas about it?
    Thank you

    1. Hi dadoge!

      Your English is very well!

      I am not familiar with WPLMS unfortunately, so I neither know how it integrates H5P nor how it sends the xAPI statements to Learning Record Stores. That would require some digging.

      Showing results in the frontend is currently not possible, but wouldn’t be a huge effort to implement. Should be pretty straightforward to use shortcodes in order to put the table into a post or page.

      Finally, it is in fact simply not possible in general to track xAPI statements from content that’s embedded with iFrame embedder.


  6. thanks for the reply (for the English compliment to google translator), I will ask the support of wpmls and if I find a solution it will be a pleasure to share it.


Leave a Reply

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