Start tracking verified

Use the Radar Verify app to continuously verify the user's location.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
  </head>

  <body>
    <script>
      Radar.initialize('<RADAR_PUBLISHABLE_KEY>');

      // Listen for token updates
      Radar.onTokenUpdated((token) => {
        console.log('Token updated:', token);
      });

      // Start tracking
      Radar.startTrackingVerified({ interval: 20 });

      // Get current token
      Radar.getVerifiedLocationToken()
        .then((token) => {
          console.log('Current token:', token);
        });

      // Stop tracking when done
      // Radar.stopTrackingVerified();
    </script>
  </body>
</html>