Adding 3rd party front-end services

Hi

I’m looking to include some 3rd party services in and instance of Open Edx that I manage.

Simple plugins like Logrocket, Microsoft Clarity which just require that some basic JS be included in the MFE.

Are there any solutions that already exist or some boilerplate code I can look at?

Kind regards,
Stelio

You can see how 2U is adding Datadog support using this dependency: GitHub - edx/frontend-logging: Used by 2U for Datadog specific monitoring., if this helps.

Thanks for the suggestion @robrap

As per Configuring Site-Wide Analytics Tools — Latest documentation

“header_extra.html has been renamed to head-extra.html. This file was always inserted into the element of the page, rather than the header of the element, so this change makes the name more accurate.”

{theme}/lms/templates/head-extra.html contents could contain something like

<script src="https://cdn.lrkt-in.com/LogRocket.min.js" crossorigin="anonymous"></script>
<script>window.LogRocket && window.LogRocket.init('x/y');</script>

See edx-platform/lms/templates/main.html at master · openedx/edx-platform · GitHub, <%static:optional_include_mako file="head-extra.html" is_theming_enabled="True" />

But i’m not having much luck getting similar changes into the MFEs, anyone have other ideas or other methods to use?