@walkeros/web-destination-plausible 0.0.0-next-20251219153324
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +65 -0
- package/dist/dev.d.mts +94 -0
- package/dist/dev.d.ts +94 -0
- package/dist/dev.js +1 -0
- package/dist/dev.js.map +1 -0
- package/dist/dev.mjs +1 -0
- package/dist/dev.mjs.map +1 -0
- package/dist/examples/index.d.mts +59 -0
- package/dist/examples/index.d.ts +59 -0
- package/dist/examples/index.js +176 -0
- package/dist/examples/index.mjs +153 -0
- package/dist/index.browser.js +1 -0
- package/dist/index.d.mts +53 -0
- package/dist/index.d.ts +53 -0
- package/dist/index.es5.js +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +63 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 elbWalker GmbH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<p align="left">
|
|
2
|
+
<a href="https://www.walkeros.io">
|
|
3
|
+
<img title="elbwalker" src="https://www.walkeros.io/img/elbwalker_logo.png" width="256px"/>
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
# Plausible Destination for walkerOS
|
|
8
|
+
|
|
9
|
+
[Source Code](https://github.com/elbwalker/walkerOS/tree/main/packages/web/destinations/plausible)
|
|
10
|
+
•
|
|
11
|
+
[NPM Package](https://www.npmjs.com/package/@walkeros/web-destination-plausible)
|
|
12
|
+
|
|
13
|
+
This package provides a [Plausible Analytics](https://plausible.io/) destination
|
|
14
|
+
for walkerOS. Plausible is a simple, and privacy-friendly Google Analytics
|
|
15
|
+
Alternative.
|
|
16
|
+
|
|
17
|
+
walkerOS follows a **source → collector → destination** architecture. This
|
|
18
|
+
Plausible destination receives processed events from the walkerOS collector and
|
|
19
|
+
transforms them into Plausible Analytics format, providing lightweight,
|
|
20
|
+
privacy-focused web analytics without cookies or personal data collection.
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
npm install @walkeros/web-destination-plausible
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
Here's a basic example of how to use the Plausible destination:
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
import { startFlow } from '@walkeros/collector';
|
|
34
|
+
import { destinationPlausible } from '@walkeros/web-destination-plausible';
|
|
35
|
+
|
|
36
|
+
await startFlow({
|
|
37
|
+
destinations: {
|
|
38
|
+
plausible: {
|
|
39
|
+
code: destinationPlausible,
|
|
40
|
+
config: {
|
|
41
|
+
settings: {
|
|
42
|
+
domain: 'walkeros.io', // Optional, domain of your site as registered
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Configuration
|
|
51
|
+
|
|
52
|
+
| Name | Type | Description | Required | Example |
|
|
53
|
+
| -------- | -------- | -------------------------------------------------- | -------- | --------------- |
|
|
54
|
+
| `domain` | `string` | The domain of your site as registered in Plausible | No | `'walkeros.io'` |
|
|
55
|
+
|
|
56
|
+
## Contribute
|
|
57
|
+
|
|
58
|
+
Feel free to contribute by submitting an
|
|
59
|
+
[issue](https://github.com/elbwalker/walkerOS/issues), starting a
|
|
60
|
+
[discussion](https://github.com/elbwalker/walkerOS/discussions), or getting in
|
|
61
|
+
[contact](https://calendly.com/elb-alexander/30min).
|
|
62
|
+
|
|
63
|
+
## License
|
|
64
|
+
|
|
65
|
+
This project is licensed under the MIT License.
|
package/dist/dev.d.mts
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import * as _walkeros_core_dev from '@walkeros/core/dev';
|
|
2
|
+
import { z } from '@walkeros/core/dev';
|
|
3
|
+
import { WalkerOS, Mapping as Mapping$2 } from '@walkeros/core';
|
|
4
|
+
import { DestinationWeb } from '@walkeros/web-core';
|
|
5
|
+
|
|
6
|
+
declare const SettingsSchema: z.ZodObject<{
|
|
7
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
type Settings = z.infer<typeof SettingsSchema>;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Plausible Mapping Schema
|
|
13
|
+
* Plausible has no event-level mapping configuration
|
|
14
|
+
*/
|
|
15
|
+
declare const MappingSchema: z.ZodObject<{}, z.core.$strip>;
|
|
16
|
+
/**
|
|
17
|
+
* Type inference from MappingSchema
|
|
18
|
+
*/
|
|
19
|
+
type Mapping$1 = z.infer<typeof MappingSchema>;
|
|
20
|
+
|
|
21
|
+
declare const settings: _walkeros_core_dev.JSONSchema;
|
|
22
|
+
declare const mapping$1: _walkeros_core_dev.JSONSchema;
|
|
23
|
+
|
|
24
|
+
declare const index$1_MappingSchema: typeof MappingSchema;
|
|
25
|
+
type index$1_Settings = Settings;
|
|
26
|
+
declare const index$1_SettingsSchema: typeof SettingsSchema;
|
|
27
|
+
declare const index$1_settings: typeof settings;
|
|
28
|
+
declare namespace index$1 {
|
|
29
|
+
export { type Mapping$1 as Mapping, index$1_MappingSchema as MappingSchema, type index$1_Settings as Settings, index$1_SettingsSchema as SettingsSchema, mapping$1 as mapping, index$1_settings as settings };
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare global {
|
|
33
|
+
interface Window {
|
|
34
|
+
plausible?: Plausible & {
|
|
35
|
+
q?: IArguments[];
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
type Plausible = (event: string, options?: {
|
|
40
|
+
props?: WalkerOS.AnyObject;
|
|
41
|
+
}) => void;
|
|
42
|
+
interface Mapping {
|
|
43
|
+
}
|
|
44
|
+
interface Env extends DestinationWeb.Env {
|
|
45
|
+
window: {
|
|
46
|
+
plausible: Plausible & {
|
|
47
|
+
q?: IArguments[];
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
type Rule = Mapping$2.Rule<Mapping>;
|
|
52
|
+
|
|
53
|
+
declare const init: Env | undefined;
|
|
54
|
+
declare const push: Env;
|
|
55
|
+
|
|
56
|
+
declare const env_init: typeof init;
|
|
57
|
+
declare const env_push: typeof push;
|
|
58
|
+
declare namespace env {
|
|
59
|
+
export { env_init as init, env_push as push };
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
declare function purchase$1(): unknown[];
|
|
63
|
+
declare function customEvent$1(): unknown[];
|
|
64
|
+
|
|
65
|
+
declare namespace events {
|
|
66
|
+
export { customEvent$1 as customEvent, purchase$1 as purchase };
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
declare const customEvent: Rule;
|
|
70
|
+
declare const purchase: Rule;
|
|
71
|
+
declare const config: {
|
|
72
|
+
entity: {
|
|
73
|
+
action: Rule;
|
|
74
|
+
};
|
|
75
|
+
order: {
|
|
76
|
+
complete: Rule;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
declare const mapping_config: typeof config;
|
|
81
|
+
declare const mapping_customEvent: typeof customEvent;
|
|
82
|
+
declare const mapping_purchase: typeof purchase;
|
|
83
|
+
declare namespace mapping {
|
|
84
|
+
export { mapping_config as config, mapping_customEvent as customEvent, mapping_purchase as purchase };
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
declare const index_env: typeof env;
|
|
88
|
+
declare const index_events: typeof events;
|
|
89
|
+
declare const index_mapping: typeof mapping;
|
|
90
|
+
declare namespace index {
|
|
91
|
+
export { index_env as env, index_events as events, index_mapping as mapping };
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export { index as examples, index$1 as schemas };
|
package/dist/dev.d.ts
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import * as _walkeros_core_dev from '@walkeros/core/dev';
|
|
2
|
+
import { z } from '@walkeros/core/dev';
|
|
3
|
+
import { WalkerOS, Mapping as Mapping$2 } from '@walkeros/core';
|
|
4
|
+
import { DestinationWeb } from '@walkeros/web-core';
|
|
5
|
+
|
|
6
|
+
declare const SettingsSchema: z.ZodObject<{
|
|
7
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
type Settings = z.infer<typeof SettingsSchema>;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Plausible Mapping Schema
|
|
13
|
+
* Plausible has no event-level mapping configuration
|
|
14
|
+
*/
|
|
15
|
+
declare const MappingSchema: z.ZodObject<{}, z.core.$strip>;
|
|
16
|
+
/**
|
|
17
|
+
* Type inference from MappingSchema
|
|
18
|
+
*/
|
|
19
|
+
type Mapping$1 = z.infer<typeof MappingSchema>;
|
|
20
|
+
|
|
21
|
+
declare const settings: _walkeros_core_dev.JSONSchema;
|
|
22
|
+
declare const mapping$1: _walkeros_core_dev.JSONSchema;
|
|
23
|
+
|
|
24
|
+
declare const index$1_MappingSchema: typeof MappingSchema;
|
|
25
|
+
type index$1_Settings = Settings;
|
|
26
|
+
declare const index$1_SettingsSchema: typeof SettingsSchema;
|
|
27
|
+
declare const index$1_settings: typeof settings;
|
|
28
|
+
declare namespace index$1 {
|
|
29
|
+
export { type Mapping$1 as Mapping, index$1_MappingSchema as MappingSchema, type index$1_Settings as Settings, index$1_SettingsSchema as SettingsSchema, mapping$1 as mapping, index$1_settings as settings };
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare global {
|
|
33
|
+
interface Window {
|
|
34
|
+
plausible?: Plausible & {
|
|
35
|
+
q?: IArguments[];
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
type Plausible = (event: string, options?: {
|
|
40
|
+
props?: WalkerOS.AnyObject;
|
|
41
|
+
}) => void;
|
|
42
|
+
interface Mapping {
|
|
43
|
+
}
|
|
44
|
+
interface Env extends DestinationWeb.Env {
|
|
45
|
+
window: {
|
|
46
|
+
plausible: Plausible & {
|
|
47
|
+
q?: IArguments[];
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
type Rule = Mapping$2.Rule<Mapping>;
|
|
52
|
+
|
|
53
|
+
declare const init: Env | undefined;
|
|
54
|
+
declare const push: Env;
|
|
55
|
+
|
|
56
|
+
declare const env_init: typeof init;
|
|
57
|
+
declare const env_push: typeof push;
|
|
58
|
+
declare namespace env {
|
|
59
|
+
export { env_init as init, env_push as push };
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
declare function purchase$1(): unknown[];
|
|
63
|
+
declare function customEvent$1(): unknown[];
|
|
64
|
+
|
|
65
|
+
declare namespace events {
|
|
66
|
+
export { customEvent$1 as customEvent, purchase$1 as purchase };
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
declare const customEvent: Rule;
|
|
70
|
+
declare const purchase: Rule;
|
|
71
|
+
declare const config: {
|
|
72
|
+
entity: {
|
|
73
|
+
action: Rule;
|
|
74
|
+
};
|
|
75
|
+
order: {
|
|
76
|
+
complete: Rule;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
declare const mapping_config: typeof config;
|
|
81
|
+
declare const mapping_customEvent: typeof customEvent;
|
|
82
|
+
declare const mapping_purchase: typeof purchase;
|
|
83
|
+
declare namespace mapping {
|
|
84
|
+
export { mapping_config as config, mapping_customEvent as customEvent, mapping_purchase as purchase };
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
declare const index_env: typeof env;
|
|
88
|
+
declare const index_events: typeof events;
|
|
89
|
+
declare const index_mapping: typeof mapping;
|
|
90
|
+
declare namespace index {
|
|
91
|
+
export { index_env as env, index_events as events, index_mapping as mapping };
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export { index as examples, index$1 as schemas };
|