analytics-plugin-pirsch
v1.0.0
Published
Pirsch support for the analytics abstraction layer by David Wells.
Maintainers
Readme
Analytics Plugin Pirsch
This plugin adds support for Pirsch Analytics to the analytics abstraction layer by David Wells.
The plugin currently only supports browsers. Node or other server-side tracking isn't supported. Please consider using the SDK directly in that case.
Usage
import Analytics from "analytics";
import pirschPlugin from "@analytics/plugin-pirsch";
const analytics = Analytics({
app: "myapp",
plugins: [
pirschPlugin({
identificationCode: "<identification_code>"
})
]
});Options
pirschPlugin accepts a few options that you may want to provide:
| Option | Type | Description |
| ------------------ | -------- | -------------------------------------------------------------------------------------------------- |
| identificationCode | string | The identification code for your website. This is the same as for the Pirsch JS snippet. Required. |
| hostname | string | An optional hostname for your website. Otherwise, it will use the hostname from the URL. |
| baseUrl | string | The base URL for the Pirsch API. This is only required when testing Pirsch. |
| timeout | number | A request timeout in milliseconds. 5000 by default. |
License
MIT
