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

Feature request: REST API #68

Open
sanderpick opened this issue Apr 20, 2023 · 17 comments
Open

Feature request: REST API #68

sanderpick opened this issue Apr 20, 2023 · 17 comments
Labels
enhancement New feature or request

Comments

@sanderpick
Copy link

sanderpick commented Apr 20, 2023

I know this just launched on Vercel, but I'm curious if there will be an API to query page views and events... ideally w/ SQL? Let me know if there's a better place to ask this too.

@timolins
Copy link
Member

timolins commented May 2, 2023

Yes, an API is on our roadmap. We will keep you updated. 🙌

@mt-hagen
Copy link

mt-hagen commented Jun 7, 2023

Hi @timolins - Will this also apply to the Speed Insights data? I would love to use this data for a cusotm reporting dashboard!

@Svish
Copy link

Svish commented Jun 25, 2023

I was also looking for this, as it would be a great tool to use for example in generateStaticParams with Next.js.

Instead of pre-generating all or none of the dynamic pages, one could instead use this to for example generate the top N visited pages.

Would be awesome if @vercel/analytics exported some simple utility functions for this!

// Imagined usage in `./src/app/products/[id]/[slug]/page.tsx`

export async function generateStaticParams() {
  return getStaticParamsMatching('/products/[id]/[slug]', { limit: 50 })
}

@masnwilliams
Copy link

Pinging this again to see where this is on the roadmap. Would pay to be able to query analytics through this npm library with a queryAnalytics({ queryParams... }).

@camcamcamcam
Copy link

Really hoping this happens sometime in 2023 so I can use the analytics coming out of Vercel in a BI tool. Especially now that GA has become pretty useless with some recent law changes in Canada.

@feugy feugy added the enhancement New feature or request label Feb 21, 2024
@jtewright
Copy link

  • 1 for this: want to automate analytics reporting / give a business person access to the analytics without giving them access to the whole dashboard

@spacecat
Copy link

Hi, I thought that this was already implemented but I learned today that it is not! 😬

Any ETA?

Thanks!

@shubhanshusingh
Copy link

any ETA?

@tobiaslins
Copy link
Collaborator

@shubhanshusingh @spacecat what are your usecases if you can share? Thanks!

@camcamcamcam
Copy link

@shubhanshusingh @spacecat what are your usecases if you can share? Thanks!

Pulling it into Power BI for analysis along side other sources of web analytics.

@tobiaslins
Copy link
Collaborator

@shubhanshusingh @spacecat what are your usecases if you can share? Thanks!

Pulling it into Power BI for analysis along side other sources of web analytics.

How would the connection work? Would you need aggregated or raw data? How many requests do you think you would make?

@spacecat
Copy link

spacecat commented Dec 5, 2024

@shubhanshusingh @spacecat what are your usecases if you can share? Thanks!

@tobiaslins Here's my use case:

vercel/next.js#73095

@sunech
Copy link

sunech commented Dec 5, 2024

@shubhanshusingh @spacecat what are your usecases if you can share? Thanks!

I also miss the capability to pull visitors/page views via API, ideally for a specific period and with filtering capabilities on countries and URLs with wildcard support (like /usa/*).

We use the data to estimate available page views for our advertisers, and pulling the data via the user interface is a bit of a pain.

@camcamcamcam
Copy link

@shubhanshusingh @spacecat what are your usecases if you can share? Thanks!

Pulling it into Power BI for analysis along side other sources of web analytics.

How would the connection work? Would you need aggregated or raw data? How many requests do you think you would make?

I can build a custom connector for Power BI to talk to a REST API. Raw data would be the best because then I can filter it down to match the way platforms like Google Analytics aggregates data based on the date range. But also if it is aggregated in the same way, I'd still be happy.

As for number of requests? A few dozen a day at most? It'd be negligible seeing as these are for internal use.

@spacecat
Copy link

spacecat commented Dec 5, 2024

@shubhanshusingh @spacecat what are your usecases if you can share? Thanks!

I also miss the capability to pull visitors/page views via API, ideally for a specific period and with filtering capabilities on countries and URLs with wildcard support (like /usa/*).

We use the data to estimate available page views for our advertisers, and pulling the data via the user interface is a bit of a pain.

@sunech so you're currently scraping vercel.com web analytics dashboard?

@sunech
Copy link

sunech commented Dec 5, 2024

@sunech so you're currently scraping vercel.com web analytics dashboard?

No, for most cases I can currently do with manually querying the numbers via the GUI and copying out the numbers I need.

@miguelalcalde
Copy link

Use case

A prospect resells their own Software as a whitelabled website, they host everything in Vercel using subdomains in one project. They're planning on splitting this into diff projects and, they want to be able to see reports for web analytics that

  1. aggregates all the websites' analytics data, for their own internal reporting, so they can see how customers and business is going
  2. shows within each project so they can give their customers access to the platform so they can also see web analytics.

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

No branches or pull requests