Skip to content

Commit 8816e25

Browse files
committed
Update readme documentation on providers
1 parent f2b12ab commit 8816e25

File tree

1 file changed

+43
-1
lines changed

1 file changed

+43
-1
lines changed

README.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,51 @@ Properties are used to generate reports, currently the widgets are limited in co
250250

251251
### Plausible
252252

253+
We support Plausible's Stats API, more [information on their website](https://plausible.io/docs/stats-api).
254+
255+
- **source** | "plausible" | required
256+
257+
- **apiSecret** | string | required
258+
You can generate an API secret in the admin panel of Plausible.
259+
260+
- **siteId** | string | required
261+
262+
- **host** | string | optional
263+
264+
Set this value to the full domain host including protocol if you're self hosting Plausible, eg. `https://plausible.example.com`
265+
266+
Example
267+
268+
```ts
269+
const plausibleProvider: PlausibleProvider = {
270+
source: "plausible",
271+
apiSecret: PLAUSIBLE_API_KEY,
272+
siteId: PLAUSIBLE_SITE_ID,
273+
host: PLAUSIBLE_HOST,
274+
};
275+
```
276+
253277
### Google Analytics
254278

255-
tbd
279+
We support the GA4 Analytics API only. You will need to get a credentials file from [Google here](https://developers.google.com/analytics/devguides/reporting/data/v1/quickstart-client-libraries), and follow the initial setup instructions so that these credentials have the correct read access to your analytics data.
280+
281+
- **source** | "google" | required
282+
283+
- **propertyId** | string | required
284+
The id of your target property, you can find this information in the GA property settings panel.
285+
286+
- **credentials** | string | optional
287+
Path to your credentials.json file, make sure the filesystem has access to this, alternatively, set an environment variable named `GOOGLE_APPLICATION_CREDENTIALS` with the path to the credentials file.
288+
289+
Example
290+
291+
```ts
292+
const googleProvider: GoogleProvider = {
293+
source: "google",
294+
credentials: GOOGLE_CREDENTIALS_FILE,
295+
propertyId: GOOGLE_PROPERTY_ID,
296+
};
297+
```
256298

257299
## API
258300

0 commit comments

Comments
 (0)