plausible
This module allows you to interact with the Plausible analytics APIas a part of your Dagger pipeline. Right now it only implements the
stats API, but in the future we may also include events.
Installation
dagger install github.com/levlaz/daggerverse/plausible@v0.5.0Entrypoint
Return Type
Plausible !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| host | String ! | - | Plausible Server Address |
| siteId | String ! | - | Plausibnle Site ID |
| token | Secret ! | - | Plausible API Token |
Example
dagger -m github.com/levlaz/daggerverse/plausible@2a80e0c38e2e3cc721d22b154e8958d207d4a52a call \
--host string --site-id string --token env:MYSECRETfunc (m *MyModule) Example(host string, siteId string, token *dagger.Secret) *dagger.Plausible {
return dag.
Plausible(host, siteId, token)
}@function
def example(host: str, site_id: str, token: dagger.Secret) -> dagger.Plausible:
return (
dag.plausible(host, site_id, token)
)@func()
example(host: string, siteId: string, token: Secret): Plausible {
return dag
.plausible(host, siteId, token)
}Types
Plausible 🔗
Plausible functions
topPages() 🔗
Show 25 top pages from this month
Return Type
String ! Example
dagger -m github.com/levlaz/daggerverse/plausible@2a80e0c38e2e3cc721d22b154e8958d207d4a52a call \
--host string --site-id string --token env:MYSECRET top-pagesfunc (m *MyModule) Example(ctx context.Context, host string, siteId string, token *dagger.Secret) string {
return dag.
Plausible(host, siteId, token).
TopPages(ctx)
}@function
async def example(host: str, site_id: str, token: dagger.Secret) -> str:
return await (
dag.plausible(host, site_id, token)
.top_pages()
)@func()
async example(host: string, siteId: string, token: Secret): Promise<string> {
return dag
.plausible(host, siteId, token)
.topPages()
}