lxndrblz / anatole

Anatole is a minimalistic two-column theme for Hugo.
https://themes.gohugo.io/themes/anatole/
MIT License
651 stars 363 forks source link

fix: loading the correct internal Google Analytics template for v4 token #341

Closed vladimirdoroch closed 2 years ago

vladimirdoroch commented 2 years ago

Description

Issue with Google Analytics v4 token. Hugo provides a separate internal template for v4 token which can be identified by their Prefix (v3 UA-XXXXXXX-X and v4 G-XXXXXXXX).

I added an if-clause to check the prefix of googleAnalytics variable for v4 format. Loading according internal template as specified in hugo docs.

Issue Number:

Google Analytics v4 requires different internal Template than currently used #339


Checklist

Yes, I included all necessary artefacts, including:


Testing Checklist

Yes, I ensured that all of the following scenarios were tested:


netlify[bot] commented 2 years ago

Deploy Preview for anatole-demo ready!

Name Link
Latest commit ec0175a4ed4131f4cf26d723c243d388b421d7eb
Latest deploy log https://app.netlify.com/sites/anatole-demo/deploys/624561f64293390008f7ec56
Deploy Preview https://deploy-preview-341--anatole-demo.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information