hugo-clarity
hugo-clarity copied to clipboard
Feature request: Support for google tag manager
I use Google tag manager in my site to deploy analytics and more. For now I have made customization to the theme to enable tag manager. Would it be possible to add support for this in the theme?
I could give it a go to try and add it in.
Ping @onweru and @rootwork for opinions.
Default does google configure a g4 account and that is not working with the default clarity module setup. You have to specify that you want a universal account. That's not clear in the clarity theme setup. Also the universal account is stopping the first of july. So I think this has some more priority to fix
@daemenseth, I will look into it.
@daemenseth, @rasmusson, if you can please test #419.
What is the easiest method to test? I used the hugo modules (option 2) to install the theme
@daemenseth, I figured I would just merge 🤞🏼 . Please test and let me know
Hi @onweru
I get some errors It lookds like he cannot find: "vendor/google/tag-manager" not found
Start building sites … hugo v0.110.0-e32a493b7826d02763c3b79623952e625402b168+extended windows/amd64 BuildDate=2023-01-17T12:16:09Z VendorInfo=gohugoio ERROR 2023/02/04 10:47:58 render of "home" failed: "C:\Users\sethd\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\github.com\chipzoller\[email protected]\layouts_default\baseof.html:21:8": execute of template failed: template: index.html:21:8: executing "index.html" at <partial "head" .>: error calling partial: "C:\Users\sethd\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\github.com\chipzoller\[email protected]\layouts\partials\head.html:47:4": execute of template failed: template: partials/head.html:47:4: executing "partials/head.html" at <partial "vendor/google/tag-manager" (dict "noscript" false)>: error calling partial: partial "vendor/google/tag-manager" not found ERROR 2023/02/04 10:47:58 render of "page" failed: "C:\Users\sethd\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\github.com\chipzoller\[email protected]\layouts_default\baseof.html:21:8": execute of template failed: template: _default/single.html:21:8: executing "_default/single.html" at <partial "head" .>: error calling partial: "C:\Users\sethd\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\github.com\chipzoller\[email protected]\layouts\partials\head.html:47:4": execute of template failed: template: partials/head.html:47:4: executing "partials/head.html" at <partial "vendor/google/tag-manager" (dict "noscript" false)>: error calling partial: partial "vendor/google/tag-manager" not found ERROR 2023/02/04 10:47:58 render of "term" failed: "C:\Users\sethd\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\github.com\chipzoller\[email protected]\layouts_default\baseof.html:21:8": execute of template failed: template: _default/list.html:21:8: executing "_default/list.html" at <partial "head" .>: error calling partial: "C:\Users\sethd\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\github.com\chipzoller\[email protected]\layouts\partials\head.html:47:4": execute of template failed: template: partials/head.html:47:4: executing "partials/head.html" at <partial "vendor/google/tag-manager" (dict "noscript" false)>: error calling partial: partial "vendor/google/tag-manager" not found ERROR 2023/02/04 10:47:58 render of "page" failed: "C:\Users\sethd\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\github.com\chipzoller\[email protected]\layouts_default\baseof.html:21:8": execute of template failed: template: _default/single.html:21:8: executing "_default/single.html" at <partial "head" .>: error calling partial: "C:\Users\sethd\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\github.com\chipzoller\[email protected]\layouts\partials\head.html:47:4": execute of template failed: template: partials/head.html:47:4: executing "partials/head.html" at <partial "vendor/google/tag-manager" (dict "noscript" false)>: error calling partial: partial "vendor/google/tag-manager" not found Error: Error building site: failed to render pages: render of "page" failed: "C:\Users\sethd\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\github.com\chipzoller\[email protected]\layouts_default\baseof.html:21:8": execute of template failed: template: _default/single.html:21:8: executing "_default/single.html" at <partial "head" .>: error calling partial: "C:\Users\sethd\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\github.com\chipzoller\[email protected]\layouts\partials\head.html:47:4": execute of template failed: template: partials/head.html:47:4: executing "partials/head.html" at <partial "vendor/google/tag-manager" (dict "noscript" false)>: error calling partial: partial "vendor/google/tag-manager" not found Built in 99 ms
@daemenseth, since you installed the theme as a Hugo module, have you updated the module? Like
hugo mod get -u ./...
Yess I did that.
@daemenseth. Phew! that was a close call, the bug is here. Fixing it now
@daemenseth, I have tested with your installation type. Run hugo mod get -u ./...
and re-test
@onweru thx for the fast response. No erros anymore with deployment. It looks promising, but I have to check it tomorrow when I have some more data.
@onweru Its working I receive data in the GA4 tags accounts. Thx for the fast support.