Skip to content

Commit 4ce51a6

Browse files
committed
Improved GA tracking
1 parent ca7eccc commit 4ce51a6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

gatsby-browser.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
const onRouteUpdate = (location) => {
3+
if (window.ga) {
4+
window.ga('send', location.pathname);
5+
}
6+
}
7+
8+
export {onRouteUpdate};

0 commit comments

Comments
 (0)