Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scroll depth GTM - Gatsby

I have a problem with running of gatsby based pages with GTM scroll depth. The problem is that the gtm scroll depth isn't compatible with SPA and doesn't reset when moving to the next page. Does someone use any other script, to measure scroll depth, that is easy and fast to integrate with gatsby and gtm/ga?

like image 878
Michał Styś Avatar asked Apr 02 '19 10:04

Michał Styś


1 Answers

You can change your page view tracking from gtm.historyChange to manual data layer pushes of gtm.load, which is one of the three event types which resets the GTM scroll depth trigger.

like image 159
Andi Avatar answered Oct 10 '22 17:10

Andi