Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading _vercel/insights/script.js returns 404 with Vite project #65

Closed
gsantiago opened this issue Apr 6, 2023 · 4 comments
Closed

Comments

@gsantiago
Copy link

image

The project uses Vite and you can see the source code here: https://github.com/gsantiago/SereneBreath

I already enabled the analytics on the dashboard and tried a few redeploys after it. I also tried to disabled and re-enable the analytics but it also didn't work.

image

@tobiaslins
Copy link
Collaborator

Hey!
You have enabled Web Vitals Analytics and not Audiences which is required to make this work.
It is a sub tab in the "Analytics" tab.
We're working on improving that experience which should be available soon.

Let me know if that works!

@gsantiago
Copy link
Author

That's it!

I enabled the audiences, redeployed the project and now it's working!

Thanks!

@emrecoban
Copy link

emrecoban commented Apr 12, 2023

Hey! You have enabled Web Vitals Analytics and not Audiences which is required to make this work. It is a sub tab in the "Analytics" tab. We're working on improving that experience which should be available soon.

Let me know if that works!

@tobiaslins
I have been researching for hours to solve this problem, and it turns out the solution was this simple. Please add this explanation to your documentation page.

@AnthonyVNgo
Copy link

AnthonyVNgo commented Oct 1, 2023

@tobiaslins I'm running in to a similar problem

  • I'm trying to add analytics to my project
  • I've followed the instructiosn on astro's docs and vercels
    https://vercel.com/docs/analytics/quickstart
  • I've deployed, redeployed, promoted to production, deleted project and re-deployed and nothing has worked.
  • I'm using / under the hobby price plan and have deployed another project with analytics on it (am I limited to one project only?)
  "dependencies": {
    "@astrojs/react": "^3.0.2",
    "@astrojs/tailwind": "^5.0.0",
    "@astrojs/vercel": "^5.0.1",
    "@types/react": "^18.2.23",
    "@types/react-dom": "^18.2.7",
    "@vercel/analytics": "^1.0.2",
    "astro": "^3.1.4",
    "hamburger-react": "^2.5.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "tailwindcss": "^3.3.3"
  },
import { defineConfig } from "astro/config";
import vercel from "@astrojs/vercel/serverless";
import tailwind from "@astrojs/tailwind";
import react from "@astrojs/react";

// https://astro.build/config
export default defineConfig({
  integrations: [tailwind(), react()],
  output: "server",
  adapter: vercel({
    webAnalytics: {
      enabled: true,
    },
  }),
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants