Skip to content

Conversation

@akeeste
Copy link
Contributor

@akeeste akeeste commented Apr 22, 2022

Our current website analytics, Universal Analytics, is being depreciating in 2023. To begin tracking web usage we need to upgrade to Google Analytics 4.

Google cannot convert tags automatically because this was set-up a few years ago with a format that is now outdated (analytics.js instead of gtag.js). Also, we don't want to remove the old analytics yet until both are working, so I cannot simply change the ID in conf.py:

html_theme_options = {
    'analytics_id': 'UA-XXXXXXXXXXX'
}

So, we must manually add new tags into the docs compilation process. I extended the sphinx_rtd_theme layout to include custom HTML. This will append a code block to each .html file's header that will connect pages with our new analytics stream.

Ready for review, but leaving as a draft since this will not go into v5.0

@akeeste akeeste added Feature new feature request Documentation related to docs labels Apr 22, 2022
@akeeste akeeste requested a review from H0R5E April 22, 2022 17:29
@akeeste akeeste changed the base branch from dev to master April 22, 2022 17:33
@akeeste akeeste changed the base branch from master to dev April 22, 2022 20:31
@akeeste akeeste marked this pull request as ready for review April 22, 2022 20:35
@akeeste akeeste requested review from kmruehl and removed request for H0R5E April 22, 2022 20:35
@kmruehl kmruehl merged commit fceb0a8 into WEC-Sim:dev Apr 22, 2022
@akeeste akeeste deleted the add_GA4 branch May 20, 2022 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation related to docs Feature new feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants