Problem with a/b-test in vuejs/nuxt-application


I want to use the a/b-testing feature inside a vuejs/nuxt-application. I use to integrate matomo into nuxt.

In a vue-component I tried something like this to push the experiment:

const _paq = (window._paq = window._paq || []);


But I get an error like this:

_paq.push() was used but Matomo tracker was not initialized before the matomo.js file was loaded. Make sure to configure the tracker via _paq.push before loading matomo.js. Alternatively, you can create a tracker via Matomo.addTracker() manually and then use _paq.push but it may not fully work as tracker methods may not be executed in the correct order.

Can you help me with this? I can access the functions from the JS-Tracking-Client ( but don’t know how to use it with an a/b-test. And also I don’t know how to solve the push-error.

I just found some info at but I don’t understand where the Matomo.AbTesting.Experiment comes from.

Thanks for some help!

Best regards,


Hi @iparker ,

Could you please get in touch with our Premium plugin support team at, so that your request can be managed efficiently.

Hi @iparker ,

We got your email, will get back to you ASAP.