juliencoquet

Handling HTML5 geolocation with Google Tag Manager

Jul 21st, 2017
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function getLocation() {
  2.     ST_dataLayer.push({'event':'geolocask'});
  3.     if (navigator.geolocation) {
  4.         // traitement de la géoloc
  5.         ST_dataLayer.push({'event':'geolocok'});
  6.     } else {
  7.         // geoloc refusée
  8.         ST_dataLayer.push({'event':'geolocko'});
  9.     }
  10. }
Add Comment
Please, Sign In to add comment