Is it possible to add google analytics to the NEW universal login experience?
As I understood, with the classic universal login it is possible to customize the login page using the HTML template and insert the google analytics script https://cdn.auth0.com/js/analytics/1.3.1/analytics.min.js in the template.
But how do I do that for the new universal login?
Many thanks!
New Universal Login Experience is rendered on server and does not support customization like Classic Login Experience.
The key structural difference from the Classic Experience is that the former uses Javascript widgets in all the pages, while the New Experience is rendered on the server and does not require Javascript.
As we can not customize it, I do NOT think it will be possible to add google analytics like Classic Login Experience. It has some limitation as It is not yet at feature parity with the Classic Experience
Yep that’s true. Basically New Universal Login Experience was designed to be much more light-weight in comparison to the Classic one but at the cost of being less customisable and feature packed
When I try to set to the template below I get following error:
{"statusCode":400,"error":"Bad Request","message":"The template must contain a single auth0:head tag and at least one auth0:widget tag.","errorCode":"invalid_body"}
There is an issue with my request? Or you designed not to work this way?
If I remove the script tag it works.
I don’t know to be honest. For sure there’s some hacky workaround that you will need to figure out yourself as unfortunately we do not support it officially.
I managed to add GTM (Google Tag Manager) to the template.
Simply add the script tag, but make sure to use double quotes " and not single ' everywhere in the code.