@getpimms/analytics 0.0.27 → 0.0.30

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/README.md CHANGED
@@ -1,91 +1,137 @@
1
+ # @getpimms/analytics
2
+
3
+ Easily track and optimize your lead and sales conversions using PIMMS across multiple channels and applications.
4
+
1
5
  ## Overview
2
6
 
3
- `@getpimms/analytics` allows you to track leads and sales conversions for PIMMS.
7
+ `@getpimms/analytics` provides a streamlined way to implement conversion tracking on your site or application, helping you identify exactly what generates your leads and conversions.
8
+
9
+ ## Quick Start
4
10
 
5
- ## Quick start
11
+ Follow these steps to quickly integrate PIMMS analytics:
6
12
 
7
- 1. Enable conversion tracking for your PIMMS link.
8
- 2. Install the `@getpimms/analytics` package to your project
13
+ ### 1. Enable Conversion Tracking
9
14
 
10
- ```bash
11
- npm install @getpimms/analytics
12
- ```
15
+ Activate conversion tracking for your PIMMS links via the [PIMMS dashboard](https://app.pimms.io).
13
16
 
14
- 3. Inject the Analytics script to your app
17
+ ### 2. Install the Analytics Package
18
+
19
+ Add the `@getpimms/analytics` package to your project:
20
+
21
+ ```bash
22
+ npm install @getpimms/analytics
23
+ ```
15
24
 
16
- ```tsx
17
- import { Analytics as PimmsAnalytics } from '@getpimms/analytics/react';
25
+ ### 3. Inject the Analytics Script
26
+
27
+ Integrate the tracking script into your application:
28
+
29
+ **React Example:**
30
+
31
+ ```tsx
32
+ import { Analytics as PimmsAnalytics } from '@getpimms/analytics/react';
33
+
34
+ export default function RootLayout({ children }: { children: React.ReactNode }) {
35
+ return (
36
+ <html lang="en">
37
+ <body>{children}</body>
38
+ <PimmsAnalytics />
39
+ </html>
40
+ );
41
+ }
42
+ ```
18
43
 
19
- export default function RootLayout({
20
- children,
21
- }: Readonly<{
22
- children: React.ReactNode;
23
- }>) {
24
- return (
25
- <html lang="en">
26
- <body>{children}</body>
27
- <PimmsAnalytics />
28
- </html>
29
- );
30
- }
31
- ```
32
-
33
- You can all use the `inject()` function to add the tracking script to other frameworks.
44
+ Alternatively, for other frameworks, use the `inject()` method.
34
45
 
35
46
  ## Available Props
36
47
 
37
- You can pass the following props to the `Analytics` component to customize the tracking script.
48
+ Customize the analytics script by passing props to the `Analytics` component:
38
49
 
39
50
  ### `apiHost`
40
51
 
41
- The API host to use for tracking. This is useful for setting up reverse proxies to avoid adblockers. The default is `https://api.pimms.io`.
52
+ Defines a custom API host for tracking requests. Useful when using reverse proxies to bypass ad-blockers.
42
53
 
43
- ### `domainsConfig`
54
+ - **Default:** `https://api.pimms.io`
44
55
 
45
- This is a JSON object that configures the domains that PIMMS will track.
56
+ ### `domainsConfig`
46
57
 
47
- - `refer`: The PIMMS short domain for [referral program client-side click tracking](https://d.to/clicks/refer) (previously `shortDomain`).
48
- - `site`: The PIMMS short domain for [tracking site visits](https://d.to/clicks/site).
49
- - `outbound`: An array of domains for cross-domain tracking. When configured, the existing `pimms_id` cookie will be automatically appended to all outbound links targeting these domains to enable cross-domain tracking across different applications.
58
+ Configure domains for accurate tracking:
50
59
 
51
- ### `shortDomain`
60
+ ```tsx
61
+ <PimmsAnalytics
62
+ domainsConfig={{
63
+ site: "pim.ms",
64
+ outbound: ["yourdomain.com", "anotherdomain.com"],
65
+ }}
66
+ />
67
+ ```
52
68
 
53
- [DEPRECATED: use `domainsConfig.refer` instead] The custom short domain you're using on PIMMS for your short links (for client-side click tracking).
69
+ - `site`: Short domain provided by PIMMS.
70
+ - `outbound`: Array of domains enabling cross-domain tracking.
54
71
 
55
72
  ### `attributionModel`
56
73
 
57
- Decide the attribution model to use for tracking. The default is `last-click`.
74
+ Defines which touchpoint receives conversion credit:
75
+
76
+ - **Default:** `last-click`
77
+
78
+ Available options:
79
+ - `first-click`: Credits the initial user interaction.
80
+ - `last-click`: Credits the final user interaction.
58
81
 
59
- - `first-click` - The first click model gives all the credit to the first touchpoint in the customer journey.
60
- - `last-click` - The last click model gives all the credit to the last touchpoint in the customer journey.
82
+ Example:
83
+
84
+ ```tsx
85
+ <PimmsAnalytics attributionModel="first-click" />
86
+ ```
61
87
 
62
88
  ### `cookieOptions`
63
89
 
64
- The `cookieOptions` prop accepts the following keys:
90
+ Customize the cookie behavior for tracking:
65
91
 
66
- | Key | Default | Description | Example |
67
- |----------|---------|-------------|---------|
68
- | `domain` | `null` | Specifies the value for the `Domain` Set-Cookie attribute. | `example.com` |
69
- | `expires` | 90 days from now | Specifies the `Date` object to be the value for the `Expires` Set-Cookie attribute. | `new Date('2024-12-31')` |
70
- | `expiresInDays` | `90` | Specifies the number (in days) to be the value for the `Expires` Set-Cookie attribute. | `90` |
71
- | `path` | `/` | Specifies the value for the `Path` Set-Cookie attribute. By default, the path is considered the "default path". | `/` |
92
+ | Key | Default | Description | Example |
93
+ |-----------------|---------------------|--------------------------------------------------------------|---------------------------|
94
+ | `domain` | `null` | Domain scope of the cookie | `example.com` |
95
+ | `expires` | 90 days from now | Explicit expiry date | `new Date('2024-12-31')` |
96
+ | `expiresInDays` | `90` | Number of days before the cookie expires | `60` |
97
+ | `path` | `/` | URL path the cookie applies to | `/` |
72
98
 
73
- For example, to set a 60-day cookie window, you can use the following code:
99
+ Example (set a 60-day cookie lifespan):
74
100
 
75
101
  ```tsx
76
- import { Analytics as PimmsAnalytics } from "@getpimms/analytics"
77
-
78
- <PimmsAnalytics
79
- cookieOptions={{
80
- expiresInDays: 60,
81
- }}
82
- />
102
+ <PimmsAnalytics cookieOptions={{ expiresInDays: 60 }} />
83
103
  ```
84
104
 
85
105
  ### `queryParam`
86
106
 
87
- The query parameter to listen to for client-side click-tracking (e.g. `?via=john`, `?ref=jane`). The default is `via`.
107
+ Specifies the URL parameter to use for tracking (e.g., referral codes):
108
+
109
+ - **Default:** `via`
110
+
111
+ Example:
112
+
113
+ ```
114
+ ?ref=john_doe
115
+ ```
116
+
117
+ To use `ref` instead of the default:
118
+
119
+ ```tsx
120
+ <PimmsAnalytics queryParam="ref" />
121
+ ```
88
122
 
89
123
  ### `scriptProps`
90
124
 
91
- Custom properties to pass to the script tag. Refer to [MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLScriptElement) for all available options.
125
+ Custom attributes for the injected `<script>` tag. See [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLScriptElement) for all available options.
126
+
127
+ Example:
128
+
129
+ ```tsx
130
+ <PimmsAnalytics scriptProps={{ defer: true }} />
131
+ ```
132
+
133
+ ## Next Steps
134
+
135
+ [Sign up for PIMMS today →](https://app.pimms.io/register)
136
+
137
+ [Introduction to conversion tracking | blog →](https://pimms.io/blog/introducing-conversion-tracking)
package/dist/index.cjs CHANGED
@@ -27,7 +27,7 @@ module.exports = __toCommonJS(generic_exports);
27
27
 
28
28
  // package.json
29
29
  var name = "@getpimms/analytics";
30
- var version = "0.0.27";
30
+ var version = "0.0.30";
31
31
 
32
32
  // src/utils.tsx
33
33
  function isBrowser() {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/generic.ts","../package.json","../src/utils.tsx"],"sourcesContent":["import { name, version } from '../package.json';\nimport type { AnalyticsProps } from './types';\nimport { isBrowser } from './utils';\n\n/**\n * Injects the PIMMS Web Analytics script into the page head.\n */\nfunction inject(props: AnalyticsProps): void {\n if (!isBrowser()) return;\n\n // Determine script source based on enabled features\n const baseUrl = 'https://cdn.pimms.io/analytics/script';\n const features = [];\n\n if (props.domainsConfig?.site) features.push('site-visit');\n if (props.domainsConfig?.outbound) features.push('outbound-domains');\n\n const src =\n props.scriptProps?.src ||\n (features.length > 0\n ? `${baseUrl}.${features.join('.')}.js`\n : `${baseUrl}.js`);\n\n if (document.head.querySelector(`script[src*=\"${src}\"]`)) return;\n\n const script = document.createElement('script');\n script.src = src;\n script.defer = props.scriptProps?.defer ?? true;\n script.setAttribute('data-sdkn', name);\n script.setAttribute('data-sdkv', version);\n\n if (props.apiHost) {\n script.setAttribute('data-api-host', props.apiHost);\n }\n\n if (props.domainsConfig) {\n script.setAttribute('data-domains', JSON.stringify(props.domainsConfig));\n }\n\n if (props.shortDomain) {\n script.setAttribute('data-short-domain', props.shortDomain);\n }\n\n if (props.attributionModel) {\n script.setAttribute('data-attribution-model', props.attributionModel);\n }\n\n if (props.cookieOptions && Object.keys(props.cookieOptions).length > 0) {\n script.setAttribute(\n 'data-cookie-options',\n JSON.stringify(props.cookieOptions),\n );\n }\n\n if (props.queryParam) {\n script.setAttribute('data-query-param', props.queryParam);\n }\n\n if (props.scriptProps) {\n const { src: _, ...restProps } = props.scriptProps; // we already set the src above\n Object.assign(script, restProps);\n }\n\n script.onerror = (): void => {\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.log(`[PIMMS Web Analytics] failed to load script from ${src}.`);\n };\n\n document.head.appendChild(script);\n}\n\nexport { inject };\nexport type { AnalyticsProps };\n\n// eslint-disable-next-line import/no-default-export -- Default export is intentional\nexport default {\n inject,\n};\n","{\n \"name\": \"@getpimms/analytics\",\n \"version\": \"0.0.27\",\n \"description\": \"\",\n \"keywords\": [\n \"analytics\",\n \"pimms\"\n ],\n \"repository\": {\n \"url\": \"github:getpimms/analytics\",\n \"directory\": \"packages/web\"\n },\n \"license\": \"MPL-2.0\",\n \"type\": \"module\",\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"browser\": \"./dist/index.js\",\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n },\n \"./react\": {\n \"browser\": \"./dist/react/index.js\",\n \"import\": \"./dist/react/index.js\",\n \"require\": \"./dist/react/index.cjs\"\n }\n },\n \"main\": \"dist/index.js\",\n \"types\": \"dist/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \"*\": [\n \"dist/index.d.ts\"\n ],\n \"react\": [\n \"dist/react/index.d.ts\"\n ]\n }\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"dev\": \"tsup --watch\",\n \"lint\": \"eslint .\",\n \"lint-fix\": \"eslint . --fix\",\n \"type-check\": \"tsc --noEmit\"\n },\n \"eslintConfig\": {\n \"extends\": [\n \"@dub/eslint-config\"\n ],\n \"rules\": {\n \"tsdoc/syntax\": \"off\"\n }\n },\n \"dependencies\": {\n \"server-only\": \"^0.0.1\"\n },\n \"devDependencies\": {\n \"@dub/eslint-config\": \"workspace:0.0.0\",\n \"@swc/core\": \"^1.3.66\",\n \"@types/node\": \"^20.3.1\",\n \"@types/react\": \"^18.2.14\",\n \"react\": \"^18.2.0\",\n \"react-dom\": \"^18.2.0\",\n \"tsup\": \"7.1.0\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}","export function isBrowser() {\n return typeof window !== 'undefined';\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCE,WAAQ;AACR,cAAW;;;ACFN,SAAS,YAAY;AAC1B,SAAO,OAAO,WAAW;AAC3B;;;AFKA,SAAS,OAAO,OAA6B;AAP7C;AAQE,MAAI,CAAC,UAAU;AAAG;AAGlB,QAAM,UAAU;AAChB,QAAM,WAAW,CAAC;AAElB,OAAI,WAAM,kBAAN,mBAAqB;AAAM,aAAS,KAAK,YAAY;AACzD,OAAI,WAAM,kBAAN,mBAAqB;AAAU,aAAS,KAAK,kBAAkB;AAEnE,QAAM,QACJ,WAAM,gBAAN,mBAAmB,SAClB,SAAS,SAAS,IACf,GAAG,OAAO,IAAI,SAAS,KAAK,GAAG,CAAC,QAChC,GAAG,OAAO;AAEhB,MAAI,SAAS,KAAK,cAAc,gBAAgB,GAAG,IAAI;AAAG;AAE1D,QAAM,SAAS,SAAS,cAAc,QAAQ;AAC9C,SAAO,MAAM;AACb,SAAO,UAAQ,WAAM,gBAAN,mBAAmB,UAAS;AAC3C,SAAO,aAAa,aAAa,IAAI;AACrC,SAAO,aAAa,aAAa,OAAO;AAExC,MAAI,MAAM,SAAS;AACjB,WAAO,aAAa,iBAAiB,MAAM,OAAO;AAAA,EACpD;AAEA,MAAI,MAAM,eAAe;AACvB,WAAO,aAAa,gBAAgB,KAAK,UAAU,MAAM,aAAa,CAAC;AAAA,EACzE;AAEA,MAAI,MAAM,aAAa;AACrB,WAAO,aAAa,qBAAqB,MAAM,WAAW;AAAA,EAC5D;AAEA,MAAI,MAAM,kBAAkB;AAC1B,WAAO,aAAa,0BAA0B,MAAM,gBAAgB;AAAA,EACtE;AAEA,MAAI,MAAM,iBAAiB,OAAO,KAAK,MAAM,aAAa,EAAE,SAAS,GAAG;AACtE,WAAO;AAAA,MACL;AAAA,MACA,KAAK,UAAU,MAAM,aAAa;AAAA,IACpC;AAAA,EACF;AAEA,MAAI,MAAM,YAAY;AACpB,WAAO,aAAa,oBAAoB,MAAM,UAAU;AAAA,EAC1D;AAEA,MAAI,MAAM,aAAa;AACrB,UAAM,EAAE,KAAK,GAAG,GAAG,UAAU,IAAI,MAAM;AACvC,WAAO,OAAO,QAAQ,SAAS;AAAA,EACjC;AAEA,SAAO,UAAU,MAAY;AAE3B,YAAQ,IAAI,oDAAoD,GAAG,GAAG;AAAA,EACxE;AAEA,WAAS,KAAK,YAAY,MAAM;AAClC;AAMA,IAAO,kBAAQ;AAAA,EACb;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/generic.ts","../package.json","../src/utils.tsx"],"sourcesContent":["import { name, version } from '../package.json';\nimport type { AnalyticsProps } from './types';\nimport { isBrowser } from './utils';\n\n/**\n * Injects the PIMMS Web Analytics script into the page head.\n */\nfunction inject(props: AnalyticsProps): void {\n if (!isBrowser()) return;\n\n // Determine script source based on enabled features\n const baseUrl = 'https://cdn.pimms.io/analytics/script';\n const features = [];\n\n if (props.domainsConfig?.site) features.push('site-visit');\n if (props.domainsConfig?.outbound) features.push('outbound-domains');\n\n const src =\n props.scriptProps?.src ||\n (features.length > 0\n ? `${baseUrl}.${features.join('.')}.js`\n : `${baseUrl}.js`);\n\n if (document.head.querySelector(`script[src*=\"${src}\"]`)) return;\n\n const script = document.createElement('script');\n script.src = src;\n script.defer = props.scriptProps?.defer ?? true;\n script.setAttribute('data-sdkn', name);\n script.setAttribute('data-sdkv', version);\n\n if (props.apiHost) {\n script.setAttribute('data-api-host', props.apiHost);\n }\n\n if (props.domainsConfig) {\n script.setAttribute('data-domains', JSON.stringify(props.domainsConfig));\n }\n\n if (props.shortDomain) {\n script.setAttribute('data-short-domain', props.shortDomain);\n }\n\n if (props.attributionModel) {\n script.setAttribute('data-attribution-model', props.attributionModel);\n }\n\n if (props.cookieOptions && Object.keys(props.cookieOptions).length > 0) {\n script.setAttribute(\n 'data-cookie-options',\n JSON.stringify(props.cookieOptions),\n );\n }\n\n if (props.queryParam) {\n script.setAttribute('data-query-param', props.queryParam);\n }\n\n if (props.scriptProps) {\n const { src: _, ...restProps } = props.scriptProps; // we already set the src above\n Object.assign(script, restProps);\n }\n\n script.onerror = (): void => {\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.log(`[PIMMS Web Analytics] failed to load script from ${src}.`);\n };\n\n document.head.appendChild(script);\n}\n\nexport { inject };\nexport type { AnalyticsProps };\n\n// eslint-disable-next-line import/no-default-export -- Default export is intentional\nexport default {\n inject,\n};\n","{\n \"name\": \"@getpimms/analytics\",\n \"version\": \"0.0.30\",\n \"description\": \"\",\n \"keywords\": [\n \"analytics\",\n \"pimms\"\n ],\n \"repository\": {\n \"url\": \"github:getpimms/analytics\",\n \"directory\": \"packages/web\"\n },\n \"license\": \"MPL-2.0\",\n \"type\": \"module\",\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"browser\": \"./dist/index.js\",\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n },\n \"./react\": {\n \"browser\": \"./dist/react/index.js\",\n \"import\": \"./dist/react/index.js\",\n \"require\": \"./dist/react/index.cjs\"\n }\n },\n \"main\": \"dist/index.js\",\n \"types\": \"dist/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \"*\": [\n \"dist/index.d.ts\"\n ],\n \"react\": [\n \"dist/react/index.d.ts\"\n ]\n }\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"changeset\": \"pnpm version patch --no-script\",\n \"dev\": \"tsup --watch\",\n \"lint\": \"eslint .\",\n \"lint-fix\": \"eslint . --fix\",\n \"type-check\": \"tsc --noEmit\"\n },\n \"eslintConfig\": {\n \"extends\": [\n \"@dub/eslint-config\"\n ],\n \"rules\": {\n \"tsdoc/syntax\": \"off\"\n }\n },\n \"dependencies\": {\n \"server-only\": \"^0.0.1\"\n },\n \"devDependencies\": {\n \"@dub/eslint-config\": \"workspace:0.0.0\",\n \"@swc/core\": \"^1.3.66\",\n \"@types/node\": \"^20.3.1\",\n \"@types/react\": \"^18.2.14\",\n \"react\": \"^18.2.0\",\n \"react-dom\": \"^18.2.0\",\n \"tsup\": \"7.1.0\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}","export function isBrowser() {\n return typeof window !== 'undefined';\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCE,WAAQ;AACR,cAAW;;;ACFN,SAAS,YAAY;AAC1B,SAAO,OAAO,WAAW;AAC3B;;;AFKA,SAAS,OAAO,OAA6B;AAP7C;AAQE,MAAI,CAAC,UAAU;AAAG;AAGlB,QAAM,UAAU;AAChB,QAAM,WAAW,CAAC;AAElB,OAAI,WAAM,kBAAN,mBAAqB;AAAM,aAAS,KAAK,YAAY;AACzD,OAAI,WAAM,kBAAN,mBAAqB;AAAU,aAAS,KAAK,kBAAkB;AAEnE,QAAM,QACJ,WAAM,gBAAN,mBAAmB,SAClB,SAAS,SAAS,IACf,GAAG,OAAO,IAAI,SAAS,KAAK,GAAG,CAAC,QAChC,GAAG,OAAO;AAEhB,MAAI,SAAS,KAAK,cAAc,gBAAgB,GAAG,IAAI;AAAG;AAE1D,QAAM,SAAS,SAAS,cAAc,QAAQ;AAC9C,SAAO,MAAM;AACb,SAAO,UAAQ,WAAM,gBAAN,mBAAmB,UAAS;AAC3C,SAAO,aAAa,aAAa,IAAI;AACrC,SAAO,aAAa,aAAa,OAAO;AAExC,MAAI,MAAM,SAAS;AACjB,WAAO,aAAa,iBAAiB,MAAM,OAAO;AAAA,EACpD;AAEA,MAAI,MAAM,eAAe;AACvB,WAAO,aAAa,gBAAgB,KAAK,UAAU,MAAM,aAAa,CAAC;AAAA,EACzE;AAEA,MAAI,MAAM,aAAa;AACrB,WAAO,aAAa,qBAAqB,MAAM,WAAW;AAAA,EAC5D;AAEA,MAAI,MAAM,kBAAkB;AAC1B,WAAO,aAAa,0BAA0B,MAAM,gBAAgB;AAAA,EACtE;AAEA,MAAI,MAAM,iBAAiB,OAAO,KAAK,MAAM,aAAa,EAAE,SAAS,GAAG;AACtE,WAAO;AAAA,MACL;AAAA,MACA,KAAK,UAAU,MAAM,aAAa;AAAA,IACpC;AAAA,EACF;AAEA,MAAI,MAAM,YAAY;AACpB,WAAO,aAAa,oBAAoB,MAAM,UAAU;AAAA,EAC1D;AAEA,MAAI,MAAM,aAAa;AACrB,UAAM,EAAE,KAAK,GAAG,GAAG,UAAU,IAAI,MAAM;AACvC,WAAO,OAAO,QAAQ,SAAS;AAAA,EACjC;AAEA,SAAO,UAAU,MAAY;AAE3B,YAAQ,IAAI,oDAAoD,GAAG,GAAG;AAAA,EACxE;AAEA,WAAS,KAAK,YAAY,MAAM;AAClC;AAMA,IAAO,kBAAQ;AAAA,EACb;AACF;","names":[]}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // package.json
2
2
  var name = "@getpimms/analytics";
3
- var version = "0.0.27";
3
+ var version = "0.0.30";
4
4
 
5
5
  // src/utils.tsx
6
6
  function isBrowser() {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../package.json","../src/utils.tsx","../src/generic.ts"],"sourcesContent":["{\n \"name\": \"@getpimms/analytics\",\n \"version\": \"0.0.27\",\n \"description\": \"\",\n \"keywords\": [\n \"analytics\",\n \"pimms\"\n ],\n \"repository\": {\n \"url\": \"github:getpimms/analytics\",\n \"directory\": \"packages/web\"\n },\n \"license\": \"MPL-2.0\",\n \"type\": \"module\",\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"browser\": \"./dist/index.js\",\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n },\n \"./react\": {\n \"browser\": \"./dist/react/index.js\",\n \"import\": \"./dist/react/index.js\",\n \"require\": \"./dist/react/index.cjs\"\n }\n },\n \"main\": \"dist/index.js\",\n \"types\": \"dist/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \"*\": [\n \"dist/index.d.ts\"\n ],\n \"react\": [\n \"dist/react/index.d.ts\"\n ]\n }\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"dev\": \"tsup --watch\",\n \"lint\": \"eslint .\",\n \"lint-fix\": \"eslint . --fix\",\n \"type-check\": \"tsc --noEmit\"\n },\n \"eslintConfig\": {\n \"extends\": [\n \"@dub/eslint-config\"\n ],\n \"rules\": {\n \"tsdoc/syntax\": \"off\"\n }\n },\n \"dependencies\": {\n \"server-only\": \"^0.0.1\"\n },\n \"devDependencies\": {\n \"@dub/eslint-config\": \"workspace:0.0.0\",\n \"@swc/core\": \"^1.3.66\",\n \"@types/node\": \"^20.3.1\",\n \"@types/react\": \"^18.2.14\",\n \"react\": \"^18.2.0\",\n \"react-dom\": \"^18.2.0\",\n \"tsup\": \"7.1.0\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}","export function isBrowser() {\n return typeof window !== 'undefined';\n}\n","import { name, version } from '../package.json';\nimport type { AnalyticsProps } from './types';\nimport { isBrowser } from './utils';\n\n/**\n * Injects the PIMMS Web Analytics script into the page head.\n */\nfunction inject(props: AnalyticsProps): void {\n if (!isBrowser()) return;\n\n // Determine script source based on enabled features\n const baseUrl = 'https://cdn.pimms.io/analytics/script';\n const features = [];\n\n if (props.domainsConfig?.site) features.push('site-visit');\n if (props.domainsConfig?.outbound) features.push('outbound-domains');\n\n const src =\n props.scriptProps?.src ||\n (features.length > 0\n ? `${baseUrl}.${features.join('.')}.js`\n : `${baseUrl}.js`);\n\n if (document.head.querySelector(`script[src*=\"${src}\"]`)) return;\n\n const script = document.createElement('script');\n script.src = src;\n script.defer = props.scriptProps?.defer ?? true;\n script.setAttribute('data-sdkn', name);\n script.setAttribute('data-sdkv', version);\n\n if (props.apiHost) {\n script.setAttribute('data-api-host', props.apiHost);\n }\n\n if (props.domainsConfig) {\n script.setAttribute('data-domains', JSON.stringify(props.domainsConfig));\n }\n\n if (props.shortDomain) {\n script.setAttribute('data-short-domain', props.shortDomain);\n }\n\n if (props.attributionModel) {\n script.setAttribute('data-attribution-model', props.attributionModel);\n }\n\n if (props.cookieOptions && Object.keys(props.cookieOptions).length > 0) {\n script.setAttribute(\n 'data-cookie-options',\n JSON.stringify(props.cookieOptions),\n );\n }\n\n if (props.queryParam) {\n script.setAttribute('data-query-param', props.queryParam);\n }\n\n if (props.scriptProps) {\n const { src: _, ...restProps } = props.scriptProps; // we already set the src above\n Object.assign(script, restProps);\n }\n\n script.onerror = (): void => {\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.log(`[PIMMS Web Analytics] failed to load script from ${src}.`);\n };\n\n document.head.appendChild(script);\n}\n\nexport { inject };\nexport type { AnalyticsProps };\n\n// eslint-disable-next-line import/no-default-export -- Default export is intentional\nexport default {\n inject,\n};\n"],"mappings":";AACE,WAAQ;AACR,cAAW;;;ACFN,SAAS,YAAY;AAC1B,SAAO,OAAO,WAAW;AAC3B;;;ACKA,SAAS,OAAO,OAA6B;AAP7C;AAQE,MAAI,CAAC,UAAU;AAAG;AAGlB,QAAM,UAAU;AAChB,QAAM,WAAW,CAAC;AAElB,OAAI,WAAM,kBAAN,mBAAqB;AAAM,aAAS,KAAK,YAAY;AACzD,OAAI,WAAM,kBAAN,mBAAqB;AAAU,aAAS,KAAK,kBAAkB;AAEnE,QAAM,QACJ,WAAM,gBAAN,mBAAmB,SAClB,SAAS,SAAS,IACf,GAAG,OAAO,IAAI,SAAS,KAAK,GAAG,CAAC,QAChC,GAAG,OAAO;AAEhB,MAAI,SAAS,KAAK,cAAc,gBAAgB,GAAG,IAAI;AAAG;AAE1D,QAAM,SAAS,SAAS,cAAc,QAAQ;AAC9C,SAAO,MAAM;AACb,SAAO,UAAQ,WAAM,gBAAN,mBAAmB,UAAS;AAC3C,SAAO,aAAa,aAAa,IAAI;AACrC,SAAO,aAAa,aAAa,OAAO;AAExC,MAAI,MAAM,SAAS;AACjB,WAAO,aAAa,iBAAiB,MAAM,OAAO;AAAA,EACpD;AAEA,MAAI,MAAM,eAAe;AACvB,WAAO,aAAa,gBAAgB,KAAK,UAAU,MAAM,aAAa,CAAC;AAAA,EACzE;AAEA,MAAI,MAAM,aAAa;AACrB,WAAO,aAAa,qBAAqB,MAAM,WAAW;AAAA,EAC5D;AAEA,MAAI,MAAM,kBAAkB;AAC1B,WAAO,aAAa,0BAA0B,MAAM,gBAAgB;AAAA,EACtE;AAEA,MAAI,MAAM,iBAAiB,OAAO,KAAK,MAAM,aAAa,EAAE,SAAS,GAAG;AACtE,WAAO;AAAA,MACL;AAAA,MACA,KAAK,UAAU,MAAM,aAAa;AAAA,IACpC;AAAA,EACF;AAEA,MAAI,MAAM,YAAY;AACpB,WAAO,aAAa,oBAAoB,MAAM,UAAU;AAAA,EAC1D;AAEA,MAAI,MAAM,aAAa;AACrB,UAAM,EAAE,KAAK,GAAG,GAAG,UAAU,IAAI,MAAM;AACvC,WAAO,OAAO,QAAQ,SAAS;AAAA,EACjC;AAEA,SAAO,UAAU,MAAY;AAE3B,YAAQ,IAAI,oDAAoD,GAAG,GAAG;AAAA,EACxE;AAEA,WAAS,KAAK,YAAY,MAAM;AAClC;AAMA,IAAO,kBAAQ;AAAA,EACb;AACF;","names":[]}
1
+ {"version":3,"sources":["../package.json","../src/utils.tsx","../src/generic.ts"],"sourcesContent":["{\n \"name\": \"@getpimms/analytics\",\n \"version\": \"0.0.30\",\n \"description\": \"\",\n \"keywords\": [\n \"analytics\",\n \"pimms\"\n ],\n \"repository\": {\n \"url\": \"github:getpimms/analytics\",\n \"directory\": \"packages/web\"\n },\n \"license\": \"MPL-2.0\",\n \"type\": \"module\",\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"browser\": \"./dist/index.js\",\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n },\n \"./react\": {\n \"browser\": \"./dist/react/index.js\",\n \"import\": \"./dist/react/index.js\",\n \"require\": \"./dist/react/index.cjs\"\n }\n },\n \"main\": \"dist/index.js\",\n \"types\": \"dist/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \"*\": [\n \"dist/index.d.ts\"\n ],\n \"react\": [\n \"dist/react/index.d.ts\"\n ]\n }\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"changeset\": \"pnpm version patch --no-script\",\n \"dev\": \"tsup --watch\",\n \"lint\": \"eslint .\",\n \"lint-fix\": \"eslint . --fix\",\n \"type-check\": \"tsc --noEmit\"\n },\n \"eslintConfig\": {\n \"extends\": [\n \"@dub/eslint-config\"\n ],\n \"rules\": {\n \"tsdoc/syntax\": \"off\"\n }\n },\n \"dependencies\": {\n \"server-only\": \"^0.0.1\"\n },\n \"devDependencies\": {\n \"@dub/eslint-config\": \"workspace:0.0.0\",\n \"@swc/core\": \"^1.3.66\",\n \"@types/node\": \"^20.3.1\",\n \"@types/react\": \"^18.2.14\",\n \"react\": \"^18.2.0\",\n \"react-dom\": \"^18.2.0\",\n \"tsup\": \"7.1.0\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}","export function isBrowser() {\n return typeof window !== 'undefined';\n}\n","import { name, version } from '../package.json';\nimport type { AnalyticsProps } from './types';\nimport { isBrowser } from './utils';\n\n/**\n * Injects the PIMMS Web Analytics script into the page head.\n */\nfunction inject(props: AnalyticsProps): void {\n if (!isBrowser()) return;\n\n // Determine script source based on enabled features\n const baseUrl = 'https://cdn.pimms.io/analytics/script';\n const features = [];\n\n if (props.domainsConfig?.site) features.push('site-visit');\n if (props.domainsConfig?.outbound) features.push('outbound-domains');\n\n const src =\n props.scriptProps?.src ||\n (features.length > 0\n ? `${baseUrl}.${features.join('.')}.js`\n : `${baseUrl}.js`);\n\n if (document.head.querySelector(`script[src*=\"${src}\"]`)) return;\n\n const script = document.createElement('script');\n script.src = src;\n script.defer = props.scriptProps?.defer ?? true;\n script.setAttribute('data-sdkn', name);\n script.setAttribute('data-sdkv', version);\n\n if (props.apiHost) {\n script.setAttribute('data-api-host', props.apiHost);\n }\n\n if (props.domainsConfig) {\n script.setAttribute('data-domains', JSON.stringify(props.domainsConfig));\n }\n\n if (props.shortDomain) {\n script.setAttribute('data-short-domain', props.shortDomain);\n }\n\n if (props.attributionModel) {\n script.setAttribute('data-attribution-model', props.attributionModel);\n }\n\n if (props.cookieOptions && Object.keys(props.cookieOptions).length > 0) {\n script.setAttribute(\n 'data-cookie-options',\n JSON.stringify(props.cookieOptions),\n );\n }\n\n if (props.queryParam) {\n script.setAttribute('data-query-param', props.queryParam);\n }\n\n if (props.scriptProps) {\n const { src: _, ...restProps } = props.scriptProps; // we already set the src above\n Object.assign(script, restProps);\n }\n\n script.onerror = (): void => {\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.log(`[PIMMS Web Analytics] failed to load script from ${src}.`);\n };\n\n document.head.appendChild(script);\n}\n\nexport { inject };\nexport type { AnalyticsProps };\n\n// eslint-disable-next-line import/no-default-export -- Default export is intentional\nexport default {\n inject,\n};\n"],"mappings":";AACE,WAAQ;AACR,cAAW;;;ACFN,SAAS,YAAY;AAC1B,SAAO,OAAO,WAAW;AAC3B;;;ACKA,SAAS,OAAO,OAA6B;AAP7C;AAQE,MAAI,CAAC,UAAU;AAAG;AAGlB,QAAM,UAAU;AAChB,QAAM,WAAW,CAAC;AAElB,OAAI,WAAM,kBAAN,mBAAqB;AAAM,aAAS,KAAK,YAAY;AACzD,OAAI,WAAM,kBAAN,mBAAqB;AAAU,aAAS,KAAK,kBAAkB;AAEnE,QAAM,QACJ,WAAM,gBAAN,mBAAmB,SAClB,SAAS,SAAS,IACf,GAAG,OAAO,IAAI,SAAS,KAAK,GAAG,CAAC,QAChC,GAAG,OAAO;AAEhB,MAAI,SAAS,KAAK,cAAc,gBAAgB,GAAG,IAAI;AAAG;AAE1D,QAAM,SAAS,SAAS,cAAc,QAAQ;AAC9C,SAAO,MAAM;AACb,SAAO,UAAQ,WAAM,gBAAN,mBAAmB,UAAS;AAC3C,SAAO,aAAa,aAAa,IAAI;AACrC,SAAO,aAAa,aAAa,OAAO;AAExC,MAAI,MAAM,SAAS;AACjB,WAAO,aAAa,iBAAiB,MAAM,OAAO;AAAA,EACpD;AAEA,MAAI,MAAM,eAAe;AACvB,WAAO,aAAa,gBAAgB,KAAK,UAAU,MAAM,aAAa,CAAC;AAAA,EACzE;AAEA,MAAI,MAAM,aAAa;AACrB,WAAO,aAAa,qBAAqB,MAAM,WAAW;AAAA,EAC5D;AAEA,MAAI,MAAM,kBAAkB;AAC1B,WAAO,aAAa,0BAA0B,MAAM,gBAAgB;AAAA,EACtE;AAEA,MAAI,MAAM,iBAAiB,OAAO,KAAK,MAAM,aAAa,EAAE,SAAS,GAAG;AACtE,WAAO;AAAA,MACL;AAAA,MACA,KAAK,UAAU,MAAM,aAAa;AAAA,IACpC;AAAA,EACF;AAEA,MAAI,MAAM,YAAY;AACpB,WAAO,aAAa,oBAAoB,MAAM,UAAU;AAAA,EAC1D;AAEA,MAAI,MAAM,aAAa;AACrB,UAAM,EAAE,KAAK,GAAG,GAAG,UAAU,IAAI,MAAM;AACvC,WAAO,OAAO,QAAQ,SAAS;AAAA,EACjC;AAEA,SAAO,UAAU,MAAY;AAE3B,YAAQ,IAAI,oDAAoD,GAAG,GAAG;AAAA,EACxE;AAEA,WAAS,KAAK,YAAY,MAAM;AAClC;AAMA,IAAO,kBAAQ;AAAA,EACb;AACF;","names":[]}
@@ -28,7 +28,7 @@ var import_react = require("react");
28
28
 
29
29
  // package.json
30
30
  var name = "@getpimms/analytics";
31
- var version = "0.0.27";
31
+ var version = "0.0.30";
32
32
 
33
33
  // src/utils.tsx
34
34
  function isBrowser() {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react.tsx","../../package.json","../../src/utils.tsx","../../src/generic.ts"],"sourcesContent":["import { useEffect } from 'react';\nimport { inject } from './generic';\nimport type { AnalyticsProps } from './types';\n\n/**\n * Injects the PIMMS Web Analytics script into the page head.\n * @param props - Analytics options.\n * ```js\n * import { Analytics as PimmsAnalytics } from '@getpimms/analytics/react';\n *\n * export default function App() {\n * return (\n * <div>\n * <PimmsAnalytics />\n * <h1>My App</h1>\n * </div>\n * );\n * }\n * ```\n */\nfunction Analytics(props: AnalyticsProps): null {\n useEffect(() => {\n inject(props);\n }, [props]);\n\n return null;\n}\n\nexport { Analytics };\nexport type { AnalyticsProps };\n","{\n \"name\": \"@getpimms/analytics\",\n \"version\": \"0.0.27\",\n \"description\": \"\",\n \"keywords\": [\n \"analytics\",\n \"pimms\"\n ],\n \"repository\": {\n \"url\": \"github:getpimms/analytics\",\n \"directory\": \"packages/web\"\n },\n \"license\": \"MPL-2.0\",\n \"type\": \"module\",\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"browser\": \"./dist/index.js\",\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n },\n \"./react\": {\n \"browser\": \"./dist/react/index.js\",\n \"import\": \"./dist/react/index.js\",\n \"require\": \"./dist/react/index.cjs\"\n }\n },\n \"main\": \"dist/index.js\",\n \"types\": \"dist/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \"*\": [\n \"dist/index.d.ts\"\n ],\n \"react\": [\n \"dist/react/index.d.ts\"\n ]\n }\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"dev\": \"tsup --watch\",\n \"lint\": \"eslint .\",\n \"lint-fix\": \"eslint . --fix\",\n \"type-check\": \"tsc --noEmit\"\n },\n \"eslintConfig\": {\n \"extends\": [\n \"@dub/eslint-config\"\n ],\n \"rules\": {\n \"tsdoc/syntax\": \"off\"\n }\n },\n \"dependencies\": {\n \"server-only\": \"^0.0.1\"\n },\n \"devDependencies\": {\n \"@dub/eslint-config\": \"workspace:0.0.0\",\n \"@swc/core\": \"^1.3.66\",\n \"@types/node\": \"^20.3.1\",\n \"@types/react\": \"^18.2.14\",\n \"react\": \"^18.2.0\",\n \"react-dom\": \"^18.2.0\",\n \"tsup\": \"7.1.0\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}","export function isBrowser() {\n return typeof window !== 'undefined';\n}\n","import { name, version } from '../package.json';\nimport type { AnalyticsProps } from './types';\nimport { isBrowser } from './utils';\n\n/**\n * Injects the PIMMS Web Analytics script into the page head.\n */\nfunction inject(props: AnalyticsProps): void {\n if (!isBrowser()) return;\n\n // Determine script source based on enabled features\n const baseUrl = 'https://cdn.pimms.io/analytics/script';\n const features = [];\n\n if (props.domainsConfig?.site) features.push('site-visit');\n if (props.domainsConfig?.outbound) features.push('outbound-domains');\n\n const src =\n props.scriptProps?.src ||\n (features.length > 0\n ? `${baseUrl}.${features.join('.')}.js`\n : `${baseUrl}.js`);\n\n if (document.head.querySelector(`script[src*=\"${src}\"]`)) return;\n\n const script = document.createElement('script');\n script.src = src;\n script.defer = props.scriptProps?.defer ?? true;\n script.setAttribute('data-sdkn', name);\n script.setAttribute('data-sdkv', version);\n\n if (props.apiHost) {\n script.setAttribute('data-api-host', props.apiHost);\n }\n\n if (props.domainsConfig) {\n script.setAttribute('data-domains', JSON.stringify(props.domainsConfig));\n }\n\n if (props.shortDomain) {\n script.setAttribute('data-short-domain', props.shortDomain);\n }\n\n if (props.attributionModel) {\n script.setAttribute('data-attribution-model', props.attributionModel);\n }\n\n if (props.cookieOptions && Object.keys(props.cookieOptions).length > 0) {\n script.setAttribute(\n 'data-cookie-options',\n JSON.stringify(props.cookieOptions),\n );\n }\n\n if (props.queryParam) {\n script.setAttribute('data-query-param', props.queryParam);\n }\n\n if (props.scriptProps) {\n const { src: _, ...restProps } = props.scriptProps; // we already set the src above\n Object.assign(script, restProps);\n }\n\n script.onerror = (): void => {\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.log(`[PIMMS Web Analytics] failed to load script from ${src}.`);\n };\n\n document.head.appendChild(script);\n}\n\nexport { inject };\nexport type { AnalyticsProps };\n\n// eslint-disable-next-line import/no-default-export -- Default export is intentional\nexport default {\n inject,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0B;;;ACCxB,WAAQ;AACR,cAAW;;;ACFN,SAAS,YAAY;AAC1B,SAAO,OAAO,WAAW;AAC3B;;;ACKA,SAAS,OAAO,OAA6B;AAP7C;AAQE,MAAI,CAAC,UAAU;AAAG;AAGlB,QAAM,UAAU;AAChB,QAAM,WAAW,CAAC;AAElB,OAAI,WAAM,kBAAN,mBAAqB;AAAM,aAAS,KAAK,YAAY;AACzD,OAAI,WAAM,kBAAN,mBAAqB;AAAU,aAAS,KAAK,kBAAkB;AAEnE,QAAM,QACJ,WAAM,gBAAN,mBAAmB,SAClB,SAAS,SAAS,IACf,GAAG,OAAO,IAAI,SAAS,KAAK,GAAG,CAAC,QAChC,GAAG,OAAO;AAEhB,MAAI,SAAS,KAAK,cAAc,gBAAgB,GAAG,IAAI;AAAG;AAE1D,QAAM,SAAS,SAAS,cAAc,QAAQ;AAC9C,SAAO,MAAM;AACb,SAAO,UAAQ,WAAM,gBAAN,mBAAmB,UAAS;AAC3C,SAAO,aAAa,aAAa,IAAI;AACrC,SAAO,aAAa,aAAa,OAAO;AAExC,MAAI,MAAM,SAAS;AACjB,WAAO,aAAa,iBAAiB,MAAM,OAAO;AAAA,EACpD;AAEA,MAAI,MAAM,eAAe;AACvB,WAAO,aAAa,gBAAgB,KAAK,UAAU,MAAM,aAAa,CAAC;AAAA,EACzE;AAEA,MAAI,MAAM,aAAa;AACrB,WAAO,aAAa,qBAAqB,MAAM,WAAW;AAAA,EAC5D;AAEA,MAAI,MAAM,kBAAkB;AAC1B,WAAO,aAAa,0BAA0B,MAAM,gBAAgB;AAAA,EACtE;AAEA,MAAI,MAAM,iBAAiB,OAAO,KAAK,MAAM,aAAa,EAAE,SAAS,GAAG;AACtE,WAAO;AAAA,MACL;AAAA,MACA,KAAK,UAAU,MAAM,aAAa;AAAA,IACpC;AAAA,EACF;AAEA,MAAI,MAAM,YAAY;AACpB,WAAO,aAAa,oBAAoB,MAAM,UAAU;AAAA,EAC1D;AAEA,MAAI,MAAM,aAAa;AACrB,UAAM,EAAE,KAAK,GAAG,GAAG,UAAU,IAAI,MAAM;AACvC,WAAO,OAAO,QAAQ,SAAS;AAAA,EACjC;AAEA,SAAO,UAAU,MAAY;AAE3B,YAAQ,IAAI,oDAAoD,GAAG,GAAG;AAAA,EACxE;AAEA,WAAS,KAAK,YAAY,MAAM;AAClC;;;AHjDA,SAAS,UAAU,OAA6B;AAC9C,8BAAU,MAAM;AACd,WAAO,KAAK;AAAA,EACd,GAAG,CAAC,KAAK,CAAC;AAEV,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../src/react.tsx","../../package.json","../../src/utils.tsx","../../src/generic.ts"],"sourcesContent":["import { useEffect } from 'react';\nimport { inject } from './generic';\nimport type { AnalyticsProps } from './types';\n\n/**\n * Injects the PIMMS Web Analytics script into the page head.\n * @param props - Analytics options.\n * ```js\n * import { Analytics as PimmsAnalytics } from '@getpimms/analytics/react';\n *\n * export default function App() {\n * return (\n * <div>\n * <PimmsAnalytics />\n * <h1>My App</h1>\n * </div>\n * );\n * }\n * ```\n */\nfunction Analytics(props: AnalyticsProps): null {\n useEffect(() => {\n inject(props);\n }, [props]);\n\n return null;\n}\n\nexport { Analytics };\nexport type { AnalyticsProps };\n","{\n \"name\": \"@getpimms/analytics\",\n \"version\": \"0.0.30\",\n \"description\": \"\",\n \"keywords\": [\n \"analytics\",\n \"pimms\"\n ],\n \"repository\": {\n \"url\": \"github:getpimms/analytics\",\n \"directory\": \"packages/web\"\n },\n \"license\": \"MPL-2.0\",\n \"type\": \"module\",\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"browser\": \"./dist/index.js\",\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n },\n \"./react\": {\n \"browser\": \"./dist/react/index.js\",\n \"import\": \"./dist/react/index.js\",\n \"require\": \"./dist/react/index.cjs\"\n }\n },\n \"main\": \"dist/index.js\",\n \"types\": \"dist/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \"*\": [\n \"dist/index.d.ts\"\n ],\n \"react\": [\n \"dist/react/index.d.ts\"\n ]\n }\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"changeset\": \"pnpm version patch --no-script\",\n \"dev\": \"tsup --watch\",\n \"lint\": \"eslint .\",\n \"lint-fix\": \"eslint . --fix\",\n \"type-check\": \"tsc --noEmit\"\n },\n \"eslintConfig\": {\n \"extends\": [\n \"@dub/eslint-config\"\n ],\n \"rules\": {\n \"tsdoc/syntax\": \"off\"\n }\n },\n \"dependencies\": {\n \"server-only\": \"^0.0.1\"\n },\n \"devDependencies\": {\n \"@dub/eslint-config\": \"workspace:0.0.0\",\n \"@swc/core\": \"^1.3.66\",\n \"@types/node\": \"^20.3.1\",\n \"@types/react\": \"^18.2.14\",\n \"react\": \"^18.2.0\",\n \"react-dom\": \"^18.2.0\",\n \"tsup\": \"7.1.0\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}","export function isBrowser() {\n return typeof window !== 'undefined';\n}\n","import { name, version } from '../package.json';\nimport type { AnalyticsProps } from './types';\nimport { isBrowser } from './utils';\n\n/**\n * Injects the PIMMS Web Analytics script into the page head.\n */\nfunction inject(props: AnalyticsProps): void {\n if (!isBrowser()) return;\n\n // Determine script source based on enabled features\n const baseUrl = 'https://cdn.pimms.io/analytics/script';\n const features = [];\n\n if (props.domainsConfig?.site) features.push('site-visit');\n if (props.domainsConfig?.outbound) features.push('outbound-domains');\n\n const src =\n props.scriptProps?.src ||\n (features.length > 0\n ? `${baseUrl}.${features.join('.')}.js`\n : `${baseUrl}.js`);\n\n if (document.head.querySelector(`script[src*=\"${src}\"]`)) return;\n\n const script = document.createElement('script');\n script.src = src;\n script.defer = props.scriptProps?.defer ?? true;\n script.setAttribute('data-sdkn', name);\n script.setAttribute('data-sdkv', version);\n\n if (props.apiHost) {\n script.setAttribute('data-api-host', props.apiHost);\n }\n\n if (props.domainsConfig) {\n script.setAttribute('data-domains', JSON.stringify(props.domainsConfig));\n }\n\n if (props.shortDomain) {\n script.setAttribute('data-short-domain', props.shortDomain);\n }\n\n if (props.attributionModel) {\n script.setAttribute('data-attribution-model', props.attributionModel);\n }\n\n if (props.cookieOptions && Object.keys(props.cookieOptions).length > 0) {\n script.setAttribute(\n 'data-cookie-options',\n JSON.stringify(props.cookieOptions),\n );\n }\n\n if (props.queryParam) {\n script.setAttribute('data-query-param', props.queryParam);\n }\n\n if (props.scriptProps) {\n const { src: _, ...restProps } = props.scriptProps; // we already set the src above\n Object.assign(script, restProps);\n }\n\n script.onerror = (): void => {\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.log(`[PIMMS Web Analytics] failed to load script from ${src}.`);\n };\n\n document.head.appendChild(script);\n}\n\nexport { inject };\nexport type { AnalyticsProps };\n\n// eslint-disable-next-line import/no-default-export -- Default export is intentional\nexport default {\n inject,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0B;;;ACCxB,WAAQ;AACR,cAAW;;;ACFN,SAAS,YAAY;AAC1B,SAAO,OAAO,WAAW;AAC3B;;;ACKA,SAAS,OAAO,OAA6B;AAP7C;AAQE,MAAI,CAAC,UAAU;AAAG;AAGlB,QAAM,UAAU;AAChB,QAAM,WAAW,CAAC;AAElB,OAAI,WAAM,kBAAN,mBAAqB;AAAM,aAAS,KAAK,YAAY;AACzD,OAAI,WAAM,kBAAN,mBAAqB;AAAU,aAAS,KAAK,kBAAkB;AAEnE,QAAM,QACJ,WAAM,gBAAN,mBAAmB,SAClB,SAAS,SAAS,IACf,GAAG,OAAO,IAAI,SAAS,KAAK,GAAG,CAAC,QAChC,GAAG,OAAO;AAEhB,MAAI,SAAS,KAAK,cAAc,gBAAgB,GAAG,IAAI;AAAG;AAE1D,QAAM,SAAS,SAAS,cAAc,QAAQ;AAC9C,SAAO,MAAM;AACb,SAAO,UAAQ,WAAM,gBAAN,mBAAmB,UAAS;AAC3C,SAAO,aAAa,aAAa,IAAI;AACrC,SAAO,aAAa,aAAa,OAAO;AAExC,MAAI,MAAM,SAAS;AACjB,WAAO,aAAa,iBAAiB,MAAM,OAAO;AAAA,EACpD;AAEA,MAAI,MAAM,eAAe;AACvB,WAAO,aAAa,gBAAgB,KAAK,UAAU,MAAM,aAAa,CAAC;AAAA,EACzE;AAEA,MAAI,MAAM,aAAa;AACrB,WAAO,aAAa,qBAAqB,MAAM,WAAW;AAAA,EAC5D;AAEA,MAAI,MAAM,kBAAkB;AAC1B,WAAO,aAAa,0BAA0B,MAAM,gBAAgB;AAAA,EACtE;AAEA,MAAI,MAAM,iBAAiB,OAAO,KAAK,MAAM,aAAa,EAAE,SAAS,GAAG;AACtE,WAAO;AAAA,MACL;AAAA,MACA,KAAK,UAAU,MAAM,aAAa;AAAA,IACpC;AAAA,EACF;AAEA,MAAI,MAAM,YAAY;AACpB,WAAO,aAAa,oBAAoB,MAAM,UAAU;AAAA,EAC1D;AAEA,MAAI,MAAM,aAAa;AACrB,UAAM,EAAE,KAAK,GAAG,GAAG,UAAU,IAAI,MAAM;AACvC,WAAO,OAAO,QAAQ,SAAS;AAAA,EACjC;AAEA,SAAO,UAAU,MAAY;AAE3B,YAAQ,IAAI,oDAAoD,GAAG,GAAG;AAAA,EACxE;AAEA,WAAS,KAAK,YAAY,MAAM;AAClC;;;AHjDA,SAAS,UAAU,OAA6B;AAC9C,8BAAU,MAAM;AACd,WAAO,KAAK;AAAA,EACd,GAAG,CAAC,KAAK,CAAC;AAEV,SAAO;AACT;","names":[]}
@@ -5,7 +5,7 @@ import { useEffect } from "react";
5
5
 
6
6
  // package.json
7
7
  var name = "@getpimms/analytics";
8
- var version = "0.0.27";
8
+ var version = "0.0.30";
9
9
 
10
10
  // src/utils.tsx
11
11
  function isBrowser() {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react.tsx","../../package.json","../../src/utils.tsx","../../src/generic.ts"],"sourcesContent":["import { useEffect } from 'react';\nimport { inject } from './generic';\nimport type { AnalyticsProps } from './types';\n\n/**\n * Injects the PIMMS Web Analytics script into the page head.\n * @param props - Analytics options.\n * ```js\n * import { Analytics as PimmsAnalytics } from '@getpimms/analytics/react';\n *\n * export default function App() {\n * return (\n * <div>\n * <PimmsAnalytics />\n * <h1>My App</h1>\n * </div>\n * );\n * }\n * ```\n */\nfunction Analytics(props: AnalyticsProps): null {\n useEffect(() => {\n inject(props);\n }, [props]);\n\n return null;\n}\n\nexport { Analytics };\nexport type { AnalyticsProps };\n","{\n \"name\": \"@getpimms/analytics\",\n \"version\": \"0.0.27\",\n \"description\": \"\",\n \"keywords\": [\n \"analytics\",\n \"pimms\"\n ],\n \"repository\": {\n \"url\": \"github:getpimms/analytics\",\n \"directory\": \"packages/web\"\n },\n \"license\": \"MPL-2.0\",\n \"type\": \"module\",\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"browser\": \"./dist/index.js\",\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n },\n \"./react\": {\n \"browser\": \"./dist/react/index.js\",\n \"import\": \"./dist/react/index.js\",\n \"require\": \"./dist/react/index.cjs\"\n }\n },\n \"main\": \"dist/index.js\",\n \"types\": \"dist/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \"*\": [\n \"dist/index.d.ts\"\n ],\n \"react\": [\n \"dist/react/index.d.ts\"\n ]\n }\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"dev\": \"tsup --watch\",\n \"lint\": \"eslint .\",\n \"lint-fix\": \"eslint . --fix\",\n \"type-check\": \"tsc --noEmit\"\n },\n \"eslintConfig\": {\n \"extends\": [\n \"@dub/eslint-config\"\n ],\n \"rules\": {\n \"tsdoc/syntax\": \"off\"\n }\n },\n \"dependencies\": {\n \"server-only\": \"^0.0.1\"\n },\n \"devDependencies\": {\n \"@dub/eslint-config\": \"workspace:0.0.0\",\n \"@swc/core\": \"^1.3.66\",\n \"@types/node\": \"^20.3.1\",\n \"@types/react\": \"^18.2.14\",\n \"react\": \"^18.2.0\",\n \"react-dom\": \"^18.2.0\",\n \"tsup\": \"7.1.0\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}","export function isBrowser() {\n return typeof window !== 'undefined';\n}\n","import { name, version } from '../package.json';\nimport type { AnalyticsProps } from './types';\nimport { isBrowser } from './utils';\n\n/**\n * Injects the PIMMS Web Analytics script into the page head.\n */\nfunction inject(props: AnalyticsProps): void {\n if (!isBrowser()) return;\n\n // Determine script source based on enabled features\n const baseUrl = 'https://cdn.pimms.io/analytics/script';\n const features = [];\n\n if (props.domainsConfig?.site) features.push('site-visit');\n if (props.domainsConfig?.outbound) features.push('outbound-domains');\n\n const src =\n props.scriptProps?.src ||\n (features.length > 0\n ? `${baseUrl}.${features.join('.')}.js`\n : `${baseUrl}.js`);\n\n if (document.head.querySelector(`script[src*=\"${src}\"]`)) return;\n\n const script = document.createElement('script');\n script.src = src;\n script.defer = props.scriptProps?.defer ?? true;\n script.setAttribute('data-sdkn', name);\n script.setAttribute('data-sdkv', version);\n\n if (props.apiHost) {\n script.setAttribute('data-api-host', props.apiHost);\n }\n\n if (props.domainsConfig) {\n script.setAttribute('data-domains', JSON.stringify(props.domainsConfig));\n }\n\n if (props.shortDomain) {\n script.setAttribute('data-short-domain', props.shortDomain);\n }\n\n if (props.attributionModel) {\n script.setAttribute('data-attribution-model', props.attributionModel);\n }\n\n if (props.cookieOptions && Object.keys(props.cookieOptions).length > 0) {\n script.setAttribute(\n 'data-cookie-options',\n JSON.stringify(props.cookieOptions),\n );\n }\n\n if (props.queryParam) {\n script.setAttribute('data-query-param', props.queryParam);\n }\n\n if (props.scriptProps) {\n const { src: _, ...restProps } = props.scriptProps; // we already set the src above\n Object.assign(script, restProps);\n }\n\n script.onerror = (): void => {\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.log(`[PIMMS Web Analytics] failed to load script from ${src}.`);\n };\n\n document.head.appendChild(script);\n}\n\nexport { inject };\nexport type { AnalyticsProps };\n\n// eslint-disable-next-line import/no-default-export -- Default export is intentional\nexport default {\n inject,\n};\n"],"mappings":";;;AAAA,SAAS,iBAAiB;;;ACCxB,WAAQ;AACR,cAAW;;;ACFN,SAAS,YAAY;AAC1B,SAAO,OAAO,WAAW;AAC3B;;;ACKA,SAAS,OAAO,OAA6B;AAP7C;AAQE,MAAI,CAAC,UAAU;AAAG;AAGlB,QAAM,UAAU;AAChB,QAAM,WAAW,CAAC;AAElB,OAAI,WAAM,kBAAN,mBAAqB;AAAM,aAAS,KAAK,YAAY;AACzD,OAAI,WAAM,kBAAN,mBAAqB;AAAU,aAAS,KAAK,kBAAkB;AAEnE,QAAM,QACJ,WAAM,gBAAN,mBAAmB,SAClB,SAAS,SAAS,IACf,GAAG,OAAO,IAAI,SAAS,KAAK,GAAG,CAAC,QAChC,GAAG,OAAO;AAEhB,MAAI,SAAS,KAAK,cAAc,gBAAgB,GAAG,IAAI;AAAG;AAE1D,QAAM,SAAS,SAAS,cAAc,QAAQ;AAC9C,SAAO,MAAM;AACb,SAAO,UAAQ,WAAM,gBAAN,mBAAmB,UAAS;AAC3C,SAAO,aAAa,aAAa,IAAI;AACrC,SAAO,aAAa,aAAa,OAAO;AAExC,MAAI,MAAM,SAAS;AACjB,WAAO,aAAa,iBAAiB,MAAM,OAAO;AAAA,EACpD;AAEA,MAAI,MAAM,eAAe;AACvB,WAAO,aAAa,gBAAgB,KAAK,UAAU,MAAM,aAAa,CAAC;AAAA,EACzE;AAEA,MAAI,MAAM,aAAa;AACrB,WAAO,aAAa,qBAAqB,MAAM,WAAW;AAAA,EAC5D;AAEA,MAAI,MAAM,kBAAkB;AAC1B,WAAO,aAAa,0BAA0B,MAAM,gBAAgB;AAAA,EACtE;AAEA,MAAI,MAAM,iBAAiB,OAAO,KAAK,MAAM,aAAa,EAAE,SAAS,GAAG;AACtE,WAAO;AAAA,MACL;AAAA,MACA,KAAK,UAAU,MAAM,aAAa;AAAA,IACpC;AAAA,EACF;AAEA,MAAI,MAAM,YAAY;AACpB,WAAO,aAAa,oBAAoB,MAAM,UAAU;AAAA,EAC1D;AAEA,MAAI,MAAM,aAAa;AACrB,UAAM,EAAE,KAAK,GAAG,GAAG,UAAU,IAAI,MAAM;AACvC,WAAO,OAAO,QAAQ,SAAS;AAAA,EACjC;AAEA,SAAO,UAAU,MAAY;AAE3B,YAAQ,IAAI,oDAAoD,GAAG,GAAG;AAAA,EACxE;AAEA,WAAS,KAAK,YAAY,MAAM;AAClC;;;AHjDA,SAAS,UAAU,OAA6B;AAC9C,YAAU,MAAM;AACd,WAAO,KAAK;AAAA,EACd,GAAG,CAAC,KAAK,CAAC;AAEV,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../src/react.tsx","../../package.json","../../src/utils.tsx","../../src/generic.ts"],"sourcesContent":["import { useEffect } from 'react';\nimport { inject } from './generic';\nimport type { AnalyticsProps } from './types';\n\n/**\n * Injects the PIMMS Web Analytics script into the page head.\n * @param props - Analytics options.\n * ```js\n * import { Analytics as PimmsAnalytics } from '@getpimms/analytics/react';\n *\n * export default function App() {\n * return (\n * <div>\n * <PimmsAnalytics />\n * <h1>My App</h1>\n * </div>\n * );\n * }\n * ```\n */\nfunction Analytics(props: AnalyticsProps): null {\n useEffect(() => {\n inject(props);\n }, [props]);\n\n return null;\n}\n\nexport { Analytics };\nexport type { AnalyticsProps };\n","{\n \"name\": \"@getpimms/analytics\",\n \"version\": \"0.0.30\",\n \"description\": \"\",\n \"keywords\": [\n \"analytics\",\n \"pimms\"\n ],\n \"repository\": {\n \"url\": \"github:getpimms/analytics\",\n \"directory\": \"packages/web\"\n },\n \"license\": \"MPL-2.0\",\n \"type\": \"module\",\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"browser\": \"./dist/index.js\",\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n },\n \"./react\": {\n \"browser\": \"./dist/react/index.js\",\n \"import\": \"./dist/react/index.js\",\n \"require\": \"./dist/react/index.cjs\"\n }\n },\n \"main\": \"dist/index.js\",\n \"types\": \"dist/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \"*\": [\n \"dist/index.d.ts\"\n ],\n \"react\": [\n \"dist/react/index.d.ts\"\n ]\n }\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"changeset\": \"pnpm version patch --no-script\",\n \"dev\": \"tsup --watch\",\n \"lint\": \"eslint .\",\n \"lint-fix\": \"eslint . --fix\",\n \"type-check\": \"tsc --noEmit\"\n },\n \"eslintConfig\": {\n \"extends\": [\n \"@dub/eslint-config\"\n ],\n \"rules\": {\n \"tsdoc/syntax\": \"off\"\n }\n },\n \"dependencies\": {\n \"server-only\": \"^0.0.1\"\n },\n \"devDependencies\": {\n \"@dub/eslint-config\": \"workspace:0.0.0\",\n \"@swc/core\": \"^1.3.66\",\n \"@types/node\": \"^20.3.1\",\n \"@types/react\": \"^18.2.14\",\n \"react\": \"^18.2.0\",\n \"react-dom\": \"^18.2.0\",\n \"tsup\": \"7.1.0\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}","export function isBrowser() {\n return typeof window !== 'undefined';\n}\n","import { name, version } from '../package.json';\nimport type { AnalyticsProps } from './types';\nimport { isBrowser } from './utils';\n\n/**\n * Injects the PIMMS Web Analytics script into the page head.\n */\nfunction inject(props: AnalyticsProps): void {\n if (!isBrowser()) return;\n\n // Determine script source based on enabled features\n const baseUrl = 'https://cdn.pimms.io/analytics/script';\n const features = [];\n\n if (props.domainsConfig?.site) features.push('site-visit');\n if (props.domainsConfig?.outbound) features.push('outbound-domains');\n\n const src =\n props.scriptProps?.src ||\n (features.length > 0\n ? `${baseUrl}.${features.join('.')}.js`\n : `${baseUrl}.js`);\n\n if (document.head.querySelector(`script[src*=\"${src}\"]`)) return;\n\n const script = document.createElement('script');\n script.src = src;\n script.defer = props.scriptProps?.defer ?? true;\n script.setAttribute('data-sdkn', name);\n script.setAttribute('data-sdkv', version);\n\n if (props.apiHost) {\n script.setAttribute('data-api-host', props.apiHost);\n }\n\n if (props.domainsConfig) {\n script.setAttribute('data-domains', JSON.stringify(props.domainsConfig));\n }\n\n if (props.shortDomain) {\n script.setAttribute('data-short-domain', props.shortDomain);\n }\n\n if (props.attributionModel) {\n script.setAttribute('data-attribution-model', props.attributionModel);\n }\n\n if (props.cookieOptions && Object.keys(props.cookieOptions).length > 0) {\n script.setAttribute(\n 'data-cookie-options',\n JSON.stringify(props.cookieOptions),\n );\n }\n\n if (props.queryParam) {\n script.setAttribute('data-query-param', props.queryParam);\n }\n\n if (props.scriptProps) {\n const { src: _, ...restProps } = props.scriptProps; // we already set the src above\n Object.assign(script, restProps);\n }\n\n script.onerror = (): void => {\n // eslint-disable-next-line no-console -- Logging to console is intentional\n console.log(`[PIMMS Web Analytics] failed to load script from ${src}.`);\n };\n\n document.head.appendChild(script);\n}\n\nexport { inject };\nexport type { AnalyticsProps };\n\n// eslint-disable-next-line import/no-default-export -- Default export is intentional\nexport default {\n inject,\n};\n"],"mappings":";;;AAAA,SAAS,iBAAiB;;;ACCxB,WAAQ;AACR,cAAW;;;ACFN,SAAS,YAAY;AAC1B,SAAO,OAAO,WAAW;AAC3B;;;ACKA,SAAS,OAAO,OAA6B;AAP7C;AAQE,MAAI,CAAC,UAAU;AAAG;AAGlB,QAAM,UAAU;AAChB,QAAM,WAAW,CAAC;AAElB,OAAI,WAAM,kBAAN,mBAAqB;AAAM,aAAS,KAAK,YAAY;AACzD,OAAI,WAAM,kBAAN,mBAAqB;AAAU,aAAS,KAAK,kBAAkB;AAEnE,QAAM,QACJ,WAAM,gBAAN,mBAAmB,SAClB,SAAS,SAAS,IACf,GAAG,OAAO,IAAI,SAAS,KAAK,GAAG,CAAC,QAChC,GAAG,OAAO;AAEhB,MAAI,SAAS,KAAK,cAAc,gBAAgB,GAAG,IAAI;AAAG;AAE1D,QAAM,SAAS,SAAS,cAAc,QAAQ;AAC9C,SAAO,MAAM;AACb,SAAO,UAAQ,WAAM,gBAAN,mBAAmB,UAAS;AAC3C,SAAO,aAAa,aAAa,IAAI;AACrC,SAAO,aAAa,aAAa,OAAO;AAExC,MAAI,MAAM,SAAS;AACjB,WAAO,aAAa,iBAAiB,MAAM,OAAO;AAAA,EACpD;AAEA,MAAI,MAAM,eAAe;AACvB,WAAO,aAAa,gBAAgB,KAAK,UAAU,MAAM,aAAa,CAAC;AAAA,EACzE;AAEA,MAAI,MAAM,aAAa;AACrB,WAAO,aAAa,qBAAqB,MAAM,WAAW;AAAA,EAC5D;AAEA,MAAI,MAAM,kBAAkB;AAC1B,WAAO,aAAa,0BAA0B,MAAM,gBAAgB;AAAA,EACtE;AAEA,MAAI,MAAM,iBAAiB,OAAO,KAAK,MAAM,aAAa,EAAE,SAAS,GAAG;AACtE,WAAO;AAAA,MACL;AAAA,MACA,KAAK,UAAU,MAAM,aAAa;AAAA,IACpC;AAAA,EACF;AAEA,MAAI,MAAM,YAAY;AACpB,WAAO,aAAa,oBAAoB,MAAM,UAAU;AAAA,EAC1D;AAEA,MAAI,MAAM,aAAa;AACrB,UAAM,EAAE,KAAK,GAAG,GAAG,UAAU,IAAI,MAAM;AACvC,WAAO,OAAO,QAAQ,SAAS;AAAA,EACjC;AAEA,SAAO,UAAU,MAAY;AAE3B,YAAQ,IAAI,oDAAoD,GAAG,GAAG;AAAA,EACxE;AAEA,WAAS,KAAK,YAAY,MAAM;AAClC;;;AHjDA,SAAS,UAAU,OAA6B;AAC9C,YAAU,MAAM;AACd,WAAO,KAAK;AAAA,EACd,GAAG,CAAC,KAAK,CAAC;AAEV,SAAO;AACT;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpimms/analytics",
3
- "version": "0.0.27",
3
+ "version": "0.0.30",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "analytics",
@@ -62,6 +62,7 @@
62
62
  },
63
63
  "scripts": {
64
64
  "build": "tsup",
65
+ "changeset": "pnpm version patch --no-script",
65
66
  "dev": "tsup --watch",
66
67
  "lint": "eslint .",
67
68
  "lint-fix": "eslint . --fix",