cuoral-ionic 0.0.2 → 0.0.3

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 +41 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -157,6 +157,47 @@ export class SupportPage implements OnInit, OnDestroy {
157
157
  }
158
158
  ```
159
159
 
160
+ ### Enable Page View Tracking (One-Time Setup)
161
+
162
+ To automatically track page views, add router tracking to your **app.component.ts** (or main app component):
163
+
164
+ ```typescript
165
+ import { Component } from '@angular/core';
166
+ import { Router, NavigationEnd } from '@angular/router';
167
+ import { Cuoral } from 'cuoral-ionic';
168
+
169
+ @Component({
170
+ selector: 'app-root',
171
+ templateUrl: 'app.component.html',
172
+ })
173
+ export class AppComponent {
174
+ private cuoral: Cuoral;
175
+
176
+ constructor(private router: Router) {
177
+ this.cuoral = new Cuoral({
178
+ publicKey: 'your-public-key-here',
179
+ email: 'user@example.com',
180
+ firstName: 'John',
181
+ lastName: 'Doe',
182
+ });
183
+ }
184
+
185
+ async ngOnInit() {
186
+ // Initialize Cuoral (intelligence auto-enabled from dashboard)
187
+ await this.cuoral.initialize();
188
+
189
+ // Track all page navigation automatically
190
+ this.router.events.subscribe(event => {
191
+ if (event instanceof NavigationEnd) {
192
+ this.cuoral.trackPageView(event.url);
193
+ }
194
+ });
195
+ }
196
+ }
197
+ ```
198
+
199
+ **That's it!** All page views are now automatically tracked. Console errors, network errors, and native crashes are tracked with zero additional setup.
200
+
160
201
  ## Configuration
161
202
 
162
203
  ### CuoralOptions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cuoral-ionic",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Cuoral Ionic Framework Library - Proactive customer success platform with support ticketing, customer intelligence, screen recording, and engagement tools",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",