@metrone-io/react 1.2.1 → 1.2.2
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 +1 -1
- package/dist/index.d.ts +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -44,7 +44,7 @@ function MyComponent() {
|
|
|
44
44
|
- **`useMetrone()`** — Hook returning all tracking methods
|
|
45
45
|
- **`withMetrone(Component)`** — HOC injecting Metrone props
|
|
46
46
|
- **Automatic route tracking** — SPA pageviews handled by the SDK (`autoTrackSPA: true`)
|
|
47
|
-
- **Automatic click tracking** — Outbound links, tel:, mailto:, downloads, and `data-track` elements
|
|
47
|
+
- **Automatic click tracking** — Outbound links, tel:, mailto:, downloads, and `data-track` elements. Requires `@metrone-io/sdk` ≥ 1.4.4 so query strings and `mailto:` local-parts are stripped, and Global Privacy Control is honored.
|
|
48
48
|
|
|
49
49
|
### Available tracking methods from `useMetrone()`
|
|
50
50
|
|
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export interface MetroneProviderProps {
|
|
|
15
15
|
trackRouteChanges?: boolean;
|
|
16
16
|
eventPrefix?: string;
|
|
17
17
|
}
|
|
18
|
-
export declare function MetroneProvider({ config, children, }: MetroneProviderProps):
|
|
18
|
+
export declare function MetroneProvider({ config, children, }: MetroneProviderProps): React.JSX.Element;
|
|
19
19
|
export interface UseMetroneReturn {
|
|
20
20
|
analytics: Metrone | null;
|
|
21
21
|
isInitialized: boolean;
|
|
@@ -66,5 +66,5 @@ export declare function useMetrone(): UseMetroneReturn;
|
|
|
66
66
|
export declare function withMetrone<P extends object>(Component: React.ComponentType<P>, options?: {
|
|
67
67
|
trackPageViews?: boolean;
|
|
68
68
|
trackInteractions?: boolean;
|
|
69
|
-
}): (props: P) =>
|
|
69
|
+
}): (props: P) => React.JSX.Element;
|
|
70
70
|
export type { MetroneProviderProps, UseMetroneReturn, EventData, CampaignData, AnalyticsConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metrone-io/react",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Metrone React integration - Privacy-first analytics for React",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"node": ">=16.0.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@metrone-io/sdk": "^1.4.
|
|
47
|
+
"@metrone-io/sdk": "^1.4.4",
|
|
48
48
|
"react": ">=16.8.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|