Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Matamo integration for platform. #35812

Conversation

farhaanbukhsh
Copy link
Member

Description

These changes help to add Matamo analytics to the platform, this helps to add the matamo analytics to the launch page.

Useful information to include:

The platform already supports Google Analytics this PR pushes to support Matamo as a tool to capture analytics.

Testing instructions

  1. Configure Tutor to run on this branch.
  2. Once that is done we need to add the value of
MATAMO_SITE_ID = 3
MATAMO_INSTANCE_URL = https://analytics.dummy.com
  1. We need to add this in (tutor config printroot)/env/apps/openedx/settings/lms/development.py
  2. Restart LMS and CMS: tutor dev restart lms cms
  3. Hard reload http://local.edly.io:8000/
  4. Now in the network tab in the browser console should have a request being made to the URL.

@openedx-webhooks
Copy link

Thanks for the pull request, @farhaanbukhsh!

What's next?

Please work through the following steps to get your changes ready for engineering review:

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.

🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads

🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

🔘 Let us know that your PR is ready for review:

Who will review my changes?

This repository is currently maintained by @openedx/wg-maintenance-edx-platform. Tag them in a comment and let them know that your changes are ready for review.

Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Nov 8, 2024
@farhaanbukhsh farhaanbukhsh force-pushed the farhaan/add-matamo-integration branch 2 times, most recently from 76108e7 to 199bb91 Compare November 9, 2024 08:59
Matamo integration for the platform. This adds the integration to the
landing page.

Signed-off-by: Farhaan Bukhsh <[email protected]>
@farhaanbukhsh farhaanbukhsh force-pushed the farhaan/add-matamo-integration branch from d3fbc38 to 08d61b2 Compare November 9, 2024 10:07
@ormsbee
Copy link
Contributor

ormsbee commented Nov 10, 2024

@farhaanbukhsh: My understanding was that we don't want to bake another analytics integration directly into edx-platform, and that we'd actually like to evetually pull Google Analytics out into a plugin of some sort. Is it feasible to implement this Matamo integration in a way that either doesn't touch edx-platform (e.g. comprehensive theming), or that makes establishes a small extension point in edx-platform to allow these things to be done as plugins?

Tagging @arbrandes and @brian-smith-tcril, since they'd know more about this than I would.

@farhaanbukhsh
Copy link
Member Author

@ormsbee You are absolutely right and I found out that we can use head-extra.html and body-initial.html through comprehensive theming.

But what I am very surprise to see is Google analytics gets highlighted because of the documentation and also because it is weaved in the platform.

I feel is maybe we should add documentation about the integration of different analytics in the platform.

I don't know where is the right place to do this.

@ormsbee
Copy link
Contributor

ormsbee commented Nov 15, 2024

@arbrandes, @brian-smith-tcril, @feanil: Could you please point @farhaanbukhsh to the best place to document that?

It would be really nice if we could have installable plugins for various analytics integrations, but I don't have a good sense for how much work that would involve.

@xitij2000
Copy link
Contributor

It would be really nice if we could have installable plugins for various analytics integrations, but I don't have a good sense for how much work that would involve.

I had worked on a plugin-slot mechanism to allow plugins to inject content into templates in this PR. I think now with events and filters, a filter might be the better mechanism for this. However, even 5 years ago (when that PR was made) the final verdict was that a move to MFEs made this change moot. Any similar feature implemented now will have the same concerns.

I think for MFEs the footer slot/component can be used for this, as we can see with this example. For edx-platform comprehensive theming might be the only way, since it's already supported and doesn't need additional work.

@feanil
Copy link
Contributor

feanil commented Nov 15, 2024

I think another How-To here related to how to setup Matamo would be useful even if it's not available by default and that would show people how they could integrate other analytics packages.

@farhaanbukhsh
Copy link
Member Author

Thanks @ormsbee and @feanil probably I should put that in the doc mentioned above, closing this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants