guidewhale 1.0.1 → 1.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.
- package/README.md +23 -21
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,32 +18,34 @@ Make sure to replace placeholder values with your actual environment token and u
|
|
|
18
18
|
import gwhale from 'guidewhale';
|
|
19
19
|
|
|
20
20
|
gwhale.init("<guidewhale_environment_code>", { // REQUIRED - string - make sure to use the correct environment code for desired application environment (e.g. 'prod-1234abcd')
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
gdpr: true, // OPTIONAL - true | false - enable GDPR mode to require user consent before tracking data under their user_id
|
|
22
|
+
gdprConsent: true, // OPTIONAL - true | false - Whether user has given consent to track their data
|
|
23
23
|
user: {
|
|
24
|
-
|
|
24
|
+
user_id: <user_id>, // REQUIRED - string - unique user identifier (e.g. '100000356', '6099047b-660b-4f2e-a878-fb66a12c1840', 'john.smith@example.com')
|
|
25
25
|
email: <user_email>, // RECOMMENDED - string - email is used as the key to map user data for most integrations (e.g. 'john.smith@example.com')
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
image_url: <profile_image_url>, // RECOMMENDED - string - used to display user's profile image inside GuideWhale dashboard (e.g. 'https://cdn.guidewhale.com/users/1234abcd/profile.png')
|
|
27
|
+
first_name: <user_first_name>, // RECOMMENDED - string - can be used to personalize GuideWhale content (e.g. 'John')
|
|
28
|
+
last_name: <user_last_name>, // RECOMMENDED - string - can be used to personalize GuideWhale content (e.g. 'Smith')
|
|
29
|
+
date_signed_up: <user_signup_date>, // RECOMMENDED - date - can be used to selectively show content to new users (Must be ISO8601 string - e.g. "2024-01-01T12:00:00Z")
|
|
30
|
+
... // OPTIONAL - string | number | date - custom user properties (e.g. gender: 'female')
|
|
30
31
|
},
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
company: {
|
|
33
|
+
company_id: <company_id>, // REQUIRED - string - unique company identifier (e.g. '100000356', '6099047b-660b-4f2e-a878-fb66a12c1840')
|
|
33
34
|
name: <company_name>, // RECOMMENDED - string - can be used to personalize GuideWhale content (e.g. 'GuideWhale Inc.')
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
image_url: <logo_image_url>, // RECOMMENDED - string - used to display logo image inside GuideWhale dashboard (e.g. 'https://cdn.guidewhale.com/companies/1234abcd/logo.png')
|
|
36
|
+
plan: <company_subscription_plan>, // RECOMMENDED - string - can be used to target users for upselling, discounts, and promotions (e.g. 'free', 'basic', 'pro')
|
|
37
|
+
date_signed_up: <company_signup_date>, // RECOMMENDED - date - can be used to selectively show content to new companies (Must be ISO8601 string - e.g. "2024-01-01T12:00:00Z")
|
|
38
|
+
date_renewal: <company_renewal_date>, // RECOMMENDED - date - can be used to encourage companies to renew their contract (Must be ISO8601 string - e.g. "2024-01-01T12:00:00Z")
|
|
39
|
+
mrr: <company_mrr>, // RECOMMENDED - number - can be used to target companies spending more or less (e.g. 100.0, 500.0, 1000.0)
|
|
40
|
+
license_count: <company_license_count>, // RECOMMENDED - number - can be used to target bigger customers (e.g. 1, 5, 10, 50)
|
|
41
|
+
industry: <company_industry>, // RECOMMENDED - string - can be used to segment companies by industries (e.g. 'Medical', 'Financial Services')
|
|
42
|
+
size: <company_size>, // RECOMMENDED - number - can be used to segment companies by their size (e.g. 100, 250, 1000)
|
|
43
|
+
... // OPTIONAL - string | number | date - custom company properties (e.g. location: 'United States')
|
|
42
44
|
},
|
|
43
45
|
membership: {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
is_primary: <user_is_primary_contact>, // RECOMMENDED - boolean - whether user is the primary contact for the company (e.g. true, false)
|
|
47
|
+
role: <user_company_role>, // RECOMMENDED - string - you can target users based on their role in the company (e.g. 'admin', 'user', 'guest')
|
|
48
|
+
... // OPTIONAL - string | number | date - custom user company membership properties (e.g. employee_number: 12345)
|
|
47
49
|
}
|
|
48
50
|
});
|
|
49
51
|
```
|
|
@@ -53,7 +55,7 @@ By default, GuideWhale client uses `window.location.assign` to redirect users be
|
|
|
53
55
|
|
|
54
56
|
```typescript
|
|
55
57
|
gwhale.onRedirect((url: string) => {
|
|
56
|
-
|
|
58
|
+
//Your custom redirect logic
|
|
57
59
|
});
|
|
58
60
|
```
|
|
59
61
|
|