Adds support for GA4 Google Analytics (#727)
* Update `analytics.html` * Update `config.yml` * Update * Update
This commit is contained in:
parent
f618757b63
commit
2fadee6afb
|
|
@ -91,7 +91,7 @@ contact_note: >
|
||||||
# Analytics and search engine verification
|
# Analytics and search engine verification
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
google_analytics: # your google-analytics ID (format: UA-XXXXXXXXX)
|
google_analytics: # your Goole Analytics measurement ID (format: G-XXXXXXXXXX)
|
||||||
panelbear_analytics: # panelbear analytics site ID (format: XXXXXXXXX)
|
panelbear_analytics: # panelbear analytics site ID (format: XXXXXXXXX)
|
||||||
|
|
||||||
google_site_verification: # your google-site-verification ID (Google Search Console)
|
google_site_verification: # your google-site-verification ID (Google Search Console)
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,12 @@
|
||||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
|
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
|
||||||
<script>
|
<script>
|
||||||
window.dataLayer = window.dataLayer || [];
|
window.dataLayer = window.dataLayer || [];
|
||||||
function gtag() { dataLayer.push(arguments); }
|
function gtag(){ window.dataLayer.push(arguments); }
|
||||||
gtag('js', new Date());
|
gtag('js', new Date());
|
||||||
gtag('config', '{{ site.google_analytics }}');
|
gtag('config', '{{ site.google_analytics }}');
|
||||||
</script>
|
</script>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- if site.enable_panelbear_analytics -%}
|
{%- if site.enable_panelbear_analytics -%}
|
||||||
<!-- Panelbear Analytics - We respect your privacy -->
|
<!-- Panelbear Analytics - We respect your privacy -->
|
||||||
<script async src="https://cdn.panelbear.com/analytics.js?site={{site.panelbear_analytics}}"></script>
|
<script async src="https://cdn.panelbear.com/analytics.js?site={{site.panelbear_analytics}}"></script>
|
||||||
<script>
|
<script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue