matomoab-testing

How can I manually send a 'variation was successful' event with Matomo ABTesting?


I am using the Matomo ABTesting plugin to create a test and I'm using a manual setup.

There are visual variations of a button with changing URLs and I want to see which variation gets clicked the most. The URLs might change for the same button variation and are not of importance.

I followed the docs to set everything up, let Matomo know which variation is being displayed, but now I don't know how to send a 'success' event to Matomo to let it know that the variation that was used was successful. There is the ABTesting::enter event, but I couldn't find sth. like ABTesting::success.

How can I send an event to Matomo that will automatically be registerd as "this ABTesting variation was successfull"?


Solution

  • Ok, so after more research I came to the conclusion that there is no 'simple' trigger that i can send.

    The way to do it is:

    Then, on your website, send the event like this

    _paq.push(['trackEvent', 'AB Testing', '{event-action-name}', '{your-custom-data});
    

    You will have to replace {event-action-name}, {your-goal-name} and {your-custom-data} with your own data / strings.