plausible

package
v0.0.2-rc-ci Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware

func Middleware(c *Client) func(next http.Handler) http.Handler

Middleware sends an event request to the plausible server for every http request.

func MiddlewareWithName

func MiddlewareWithName(c *Client, name string) func(next http.Handler) http.Handler

MiddlewareWithName sends an event request to the plausible server for every http request.

func TrackPageView

func TrackPageView(c *Client, r *http.Request)

func TrackRequest

func TrackRequest(c *Client, r *http.Request, name string)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(host string, domain string) (*Client, error)

func (*Client) Event

func (c *Client) Event(ctx context.Context, name string, url string, ipAddress string, userAgent string, referer string) error

Event makes an api request to the plausible evnt api. See: https://plausible.io/docs/events-api

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL