4 ms·
Hi, for the speed aspect I just use Google Tag Manager to inject a tag on "minimal user interaction" which is Scrollstart,touchdown for mobile devices mousemo
by franze 6y ago
Hi, for the speed aspect I just use Google Tag Manager to inject a tag on "minimal user interaction" which is
Scrollstart,touchdown for mobile devices
mousemove for desktop
onfocus for keyboard navigation / screenreaders
and an event that triggers on execution of this tag.
On that event I bind all the third party stuff, mostly with in some trigger group.
So basically it loads late - does not hold up rendering of the site - but also soon if there is interaction with the site.
Here is the Gist https://www.franz-enzenhofer.com/a/gtag-make-faster https://www.franz-enzenhofer.com/a/gtag-make-faster
So is this kinda the approach zaraz is doing?
- yoavm 6y agoNot quite what we do... Delaying everything to when there's an interaction will make your analytics data (including conversions and remarketing pixels) miss a lot of information, and could easily make the browser lag exactly when your users want to interact with the page. It's far from ideal. Zaraz isn't delaying your scripts, it truly is sending less JS to the browser.