-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
GA 4 parameter does not work #228
Comments
@ryan1-chang There is no need to include the partial in your anatole/layouts/partials/footer.html Line 37 in 5303fca
I've also checked your site and on there I could see the gtag code being loaded in the header, which you had added. What makes you believe that the parameter is not working? |
I can't seem to get this working either, even when manually setting HUGO_ENV = production |
@ryan1-chang I was able to reproduce the error. It seems to have to do with the if condition. However, I haven't found out what triggers the behaviour. |
Hi, I noticed that the problem is related to the if condition. Since the site variables are passed with the key {{- if and (hugo.IsProduction) (.context.Site.Params.gtagId) -}} It seems to work for me after this modification, and I had sent a pull request #230. Hope this helps. |
Good catch, just tested on mine and change works as expected |
@JackywithaWhiteDog Well spotted and thanks for your explanation. |
GA 4 parameter does not work
I added the following code to this file
The text was updated successfully, but these errors were encountered: