@formo/analytics 1.11.5 → 1.11.6

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.
Files changed (2) hide show
  1. package/README.md +1 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ---
6
6
 
7
- Add the following to your `index.html`:
7
+ Add the following to your page:
8
8
 
9
9
  ```html
10
10
  <script>
@@ -84,9 +84,6 @@ const HomePage = () => {
84
84
  const analytics = useFormoAnalytics();
85
85
 
86
86
  useEffect(() => {
87
- // Track a page view when the component is mounted
88
- analytics?.page();
89
-
90
87
  // Track a custom event
91
88
  analytics?.track('custom_event', { key: 'value' });
92
89
  }, [analytics]);
@@ -196,7 +193,6 @@ const YourComponent = () => {
196
193
  const track = async () => {
197
194
  try {
198
195
  console.log('Tracking page hit...');
199
- analytics.page(); // Track the page view
200
196
  analytics.track('custom_event', { key: 'value' }); // Track a custom event
201
197
  } catch (error) {
202
198
  console.error('Failed to track page hit', error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formo/analytics",
3
- "version": "1.11.5",
3
+ "version": "1.11.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/getformo/sdk.git"