diff --git a/src/gatsby/gatsby-browser.js b/src/gatsby/gatsby-browser.js index 0bd433882..49b0da54e 100644 --- a/src/gatsby/gatsby-browser.js +++ b/src/gatsby/gatsby-browser.js @@ -8,6 +8,8 @@ import "./src/styles/style.scss" export const onRouteUpdate = ({ location, prevLocation }) => { if (typeof window.snowplow === 'function') { window.snowplow("trackPageView"); + // refresh snowplow link click tracking to pick up new links + window.snowplow("refreshLinkClickTracking"); } sessionStorage.setItem("prevPath", prevLocation ? prevLocation.pathname : null); };