Track verified

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

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
    <link href="https://js.radar.com/v4.4.6/radar.css" rel="stylesheet">
    <script src="https://js.radar.com/v4.4.6/radar.min.js"></script>
  </head>

  <body>
    <div id="map" style="width: 100%; height: 500px;" />

    <script>
      $('#track-verified').click(() => {
        Radar.initialize('<RADAR_PUBLISHABLE_KEY>');

        Radar.trackVerified({ userId: 'test-user-id' })
          .then(({ location, user, events, token, expiresAt, expiresIn, passed }) => {
            console.log(location);
            console.log(user);
            console.log(events);
            console.log(token);
            console.log(expiresAt);
            console.log(expiresIn);
            console.log(passed);
          });
      });
    </script>
  </body>
</html>