go-plausible icon indicating copy to clipboard operation
go-plausible copied to clipboard

Add support for the Events API

Open andrerfcsantos opened this issue 3 years ago • 1 comments

Recently Plausible introduced the Events API that allows custom events to be sent to Plausible. go-plausible should also support this endpoint.

Notes about this task

  • Since this request requires a domain, this probably should be implemented as method on Site , which contains the domain in the id field
  • This endpoint requires information to be sent in the body of the request. The method client.acquireRequest can be used for this, where formVals QueryArgs represents the body data.
  • This endpoint also requires some extra headers compared to the other requests, as mentioned on the Plausible docs.

Tasks

  • [ ] Implement the functionality for the new kind of request
  • [ ] Write tests for the new functionality
  • [ ] Update the documentation

andrerfcsantos avatar Nov 07 '21 00:11 andrerfcsantos