vercel/analytics

Error 400 when using analytics/server track in server actions

mtsdalmolin opened this issue · 2 comments

Error 400 when using analytics/server track in server actions

I am getting http error 400 on analytics when using analytics/server track in server actions.
Following the documentation, this is the code snippet I am running:

export async function getTeamStatistics(_: any, formData: FormData) {
  const teamId = formData.get('teamId')!
  const teamName = formData.get('teamName')!

  await track('action:getTeamStatistics', {
    teamId: teamId as unknown as string,
    teamName: teamName as unknown as string
  })
  ...
}

I haven't seen any custom event in my analytics page and the logs of the request is showing this:
image

No custom events in analytics page:
no-custom-events

Is there anything I am doing wrong?

P.S.: I made a stackblitz with a simplistic reproduction of the code I am running.

Hey @mtsdalmolin !

sorry for the inconvenience. there were some issues for some deployments that are now fixed. can you please redeploy and try again? it should be working fine now! 🙂

Yep, it's working now, @tobiaslins.
Sorry for bothering you guys here in github with this issue, I thought it was something I was doing wrong.