Skip to content

Plausible response is always a 202 #13

Open
@thely

Description

@thely

I'm not sure if this is more relevant here or over on plausible-tracker, but I'm having a hell of a time getting this module working properly.

I'd like to just set a proxy to go straight to plausible.io/js/script.js, and it seemed like this package was part of the road to get there, but the instructions provided by this module don't apply to my use case. I'm not self-hosting Plausible, so setting apiHost to my domain will never work. Instead, I'm trying what seems like the right direction (though I have no idea), which is to set Plausible as normal, and set a proxy to go from my site to the Plausible API via nuxt-proxy. But no matter what I do, if I get anywhere close to right with either of these libraries, I'm only getting as far as 202 Accepted, and the traffic isn't registering on the dashboard.

Here are my current settings:

nuxt.config.js

...
plausible: {
    domain: "https://my-site-name.com",
},
proxy {
  "/api/event": {
      target: "https://plausible.io/api/event",
   },
},

Is this unnecessary? Is there some way to use the apiHost property to proxy without self-hosting, or is there something else I should be doing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions