aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/docs/src/material/templates/partials/integrations/analytics/google.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/src/material/templates/partials/integrations/analytics/google.html')
-rw-r--r--docs/src/material/templates/partials/integrations/analytics/google.html7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/src/material/templates/partials/integrations/analytics/google.html b/docs/src/material/templates/partials/integrations/analytics/google.html
new file mode 100644
index 00000000..128854da
--- /dev/null
+++ b/docs/src/material/templates/partials/integrations/analytics/google.html
@@ -0,0 +1,7 @@
+{#-
+ This file was automatically generated - do not edit
+-#}
+{% if config.extra.analytics %}
+ {% set property = config.extra.analytics.property | d("", true) %}
+{% endif %}
+<script id="__analytics">function __md_analytics(){function n(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],n("js",new Date),n("config","{{ property }}"),document.addEventListener("DOMContentLoaded",function(){document.forms.search&&document.forms.search.query.addEventListener("blur",function(){this.value&&n("event","search",{search_term:this.value})}),document$.subscribe(function(){var a=document.forms.feedback;if(void 0!==a)for(var e of a.querySelectorAll("[type=submit]"))e.addEventListener("click",function(e){e.preventDefault();var t=document.location.pathname,e=this.getAttribute("data-md-value");n("event","feedback",{page:t,data:e}),a.firstElementChild.disabled=!0;e=a.querySelector(".md-feedback__note [data-md-value='"+e+"']");e&&(e.hidden=!1)}),a.hidden=!1}),location$.subscribe(function(e){n("config","{{ property }}",{page_path:e.pathname})})});var e=document.createElement("script");e.async=!0,e.src="https://www.googletagmanager.com/gtag/js?id={{ property }}",document.getElementById("__analytics").insertAdjacentElement("afterEnd",e)}</script>