[BB-4653] feat: implement a page in Ocim to enter the conversion data to send it to Matomo
Created by: lgp171188
This PR implements the changes to add a page in Ocim, using which the superusers can enter the conversion data for the active betatest instances to be sent to Matomo.
This also adds a fix for an issue breaking the make run.dev
command on the vagrant devstack.
Testing instructions:
- On a working Ocim devstack, checkout the source branch of this PR.
- Configure the
MATOMO_URL
,MATOMO_SITE_ID
,MATOMO_SITE_ID
,MATOMO_CONVERSION_GOAL_ID
variables with appropriate values in the.env
file. - Try accessing
/marketing/conversion/
and verify that it requires logging in. - Also verify that the logged-in user has to be a superuser to access the page.
- Log in as a superuser user and open
/marketing/conversion/
. - Verify that the page renders properly with a form containing fields for instance, revenue and custom matomo tracking data.
- Verify that the queryset for the instance field is restricted to instances which have an associated betatest application and has been successfully provisioned. In the devstack, this can be done by creating a betatest application, creating an associated Open edX instance, and manually setting its
successfully_provisioned
field toTrue
. - Verify that the valid data submitted through this page is captured and available in Matomo.
- Try any other tests to try and break the functionality implemented in this PR. :)