Auth0 Home Blog Docs

Google Analytics on hosted login page is not registering events



I’m trying to add Google Analytics to the hosted Lock page. I followed the guide here but no events are registered in the GA panel.

Seems simple enough, so what am I doing wrong here?

My hosted page with Lock looks like this:

    window.auth0AnalyticsOptions = {
      'google-analytics': {
        id: 'UA-01234567-1'
  <script src=""></script>
  <script src=""></script>
    // Lock config params...
    var config = JSON.parse(decodeURIComponent(escape(window.atob('@@config@@'))));
    config.extraParams = config.extraParams || {};
    var connection = config.connection;
    var prompt = config.prompt;

Help is greatly appreciated!