Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Mikael Malmgren
Added: Aug 14, 2018 12:51 PM
Modified: Aug 14, 2018 1:00 PM
Views: 8
Tags: no tags
A trigger to fire 3rd part tags after when the page loaded, A good way to keep the page speed up
  1. <script>
  2. (function (){
  3.         try{
  4.         window.setTimeout (function() {
  5.                 dataLayer.push({'event' : 'afterLoad'});
  6.         },1500);
  7.         }catch (err) {}
  8. })();
  9. </script>