From dd409708657598532a54a74bc0966001e206d5bc Mon Sep 17 00:00:00 2001 From: squidfunk Date: Fri, 24 Jul 2020 10:20:40 +0200 Subject: [PATCH] Fixed Google Analytics not tracking URLs with instant loading --- material/partials/integrations/analytics.html | 2 +- src/partials/integrations/analytics.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/material/partials/integrations/analytics.html b/material/partials/integrations/analytics.html index 2a130c99b..c5a96f0c8 100644 --- a/material/partials/integrations/analytics.html +++ b/material/partials/integrations/analytics.html @@ -2,5 +2,5 @@ This file was automatically generated - do not edit -#} {% set analytics = config.google_analytics %} - + diff --git a/src/partials/integrations/analytics.html b/src/partials/integrations/analytics.html index 1887a9423..c8820bfbd 100644 --- a/src/partials/integrations/analytics.html +++ b/src/partials/integrations/analytics.html @@ -48,7 +48,7 @@ /* Send page view on document switch (instant loading, custom event) */ document.addEventListener("DOMContentSwitch", function() { - ga("send", "pageview") + ga("send", "pageview", document.location.pathname) })