Skip to content

Commit 759be21

Browse files
authored
Add gatsby tracking event (#59)
1 parent 1a10b5d commit 759be21

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/html/_layout.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,8 @@
5050
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
5151
})(window,document,'script','dataLayer','GTM-GDFN');</script>
5252
<!-- End Google Tag Manager -->
53+
54+
<!-- Fire route change event -->
55+
<script>window.dataLayer.push({event: 'gatsby-route-change'});</script>
5356
</body>
5457
</html>

0 commit comments

Comments
 (0)