vercel / analytics

Privacy-friendly, real-time traffic insights
https://vercel.com/analytics
Mozilla Public License 2.0
429 stars 26 forks source link

Not working - Uncaught SyntaxError: Unexpected token '<' (at script.js:1:1) #28

Closed arimendelow closed 1 year ago

arimendelow commented 1 year ago

Hi!

I've just integrated Vercel Analytics to my RedwoodJS app via the <Analytics /> component.

An hour later, and with no luck on debugging, the analytics page is stuck at this:

Screenshot 2023-01-08 at 9 41 30 PM

The only "error" I've been able to find is that script.js throws: Uncaught SyntaxError: Unexpected token '<':

Screenshot 2023-01-08 at 9 39 52 PM Screenshot 2023-01-08 at 9 42 27 PM

Any ideas why this is happening? You can see this live by visiting Spoonjoy.app.

Thanks!

timolins commented 1 year ago

Hi Ari!

It looks like you enabled Web Vitals instead of Audiences. Can you try switching over to the Audiences tab and enabling it there? After Audiences is enabled, you can re-deploy your project which should fix this issue.

Screenshot 2023-01-09 at 09 36 05

We know this can be a bit confusing right now, and we are working hard to make this more intuitive in the future. 🤞

arimendelow commented 1 year ago

Ha oh!! Yeah, very confusing UI :) the popup telling you to set up looks as though it's for both!

Thanks for the quick response!