marketempower / axiom

Axiom - A Hugo Theme. GitTip: https://gitcoin.co/tip?username=jhauraw
https://www.axiomtheme.com/
Creative Commons Attribution Share Alike 4.0 International
74 stars 21 forks source link

Avoid contacting GA if the id isn't set #2

Closed cargaji closed 4 years ago

cargaji commented 4 years ago

Currently, if no Google Tag Manager id is set, the script is still loaded, just without an id.

jhauraw commented 4 years ago

Hi, can't imagine anyone not using GA these days, but I guess Axiom shouldn't expect it. I just pushed a new release v0.5.68 with the patch. We need to also not load the rest of the GA script below the end of your if statement, and the preconnects above it. LMK if the patch solves your request. Thx.