Coder Social home page Coder Social logo

Comments (6)

tobiaslins avatar tobiaslins commented on April 30, 2024

Hey @samuelcole!
Have you enabled audiences in the dashboard for that domain? -> https://vercel.com/docs/concepts/analytics/audiences/quickstart

What's the basePath of your project?

Thanks!

from analytics.

samuelcole avatar samuelcole commented on April 30, 2024

so this app, directory has the basePath of /directory

foodhelpline.org is managed by another app, foodhelpline, which does not have analytics enabled at all. i would prefer not to have analytics enabled for both apps, but maybe you're saying it's required to have analytics enabled on the domain level as well as the project level?

from analytics.

tobiaslins avatar tobiaslins commented on April 30, 2024

You could maybe add a rewrite to vercel.json or next.config.js that proxies
/_vercel/insights/script.js to the subpath? Where is you're project with basePath accessible?

from analytics.

gsheppard avatar gsheppard commented on April 30, 2024

This is an issue for my team as well. We have basePath: '/collection', but <Analytics /> requests /_vercel/insights/script.js, not /collection/_vercel/insights/script.js.

We fixed it by proxying all /_vercel traffic to the appropriate app, but that is configured externally.

What is interesting though is that it is available under /collection/_vercel, it's just not being requested there.

from analytics.

gsheppard avatar gsheppard commented on April 30, 2024

Have there been any updates to this? We're about to be expanding into more of a multi-tenant setup and can't have the Vercel Analytics script loading from the same /_vercel route for 3 applications.

from analytics.

tobiaslins avatar tobiaslins commented on April 30, 2024

Hey @gsheppard !

You can use the HTML integration to inject the script with a custom path + custom endpoint (instead of using inject or <Analytics />

For example:

<script data-endpoint="/blog/_vercel/insights" src="/blog/_vercel/insights/script.js" defer></script>

We will add support for the package later on.

Let me know if that helps!

from analytics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.