Add Google Analytics 4 Support (Issue #1152) #1183
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Google announced that on July 1st, 2023 they will no longer process Universal Analytics data and users should transition to Google Analytics 4 by this point. Currently, the only way I'm aware of to add support for google analytics 4 in this repo is to modify the template in _includes/analytics-providers/custom.html.
As users may wish to have this feature supported in the _config.yml, (see Issue #1152, I added an extra analytics template and allowed the user to specify their analytics provider in _config.yml. I have not changed the default provider in _config.yml to google analytics 4. If you think that is appropriate at this time please feel free to add that.
Please let me know if you encounter any bugs. Additional comments are also welcome.