guidewhale 0.1.26 → 1.0.1

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
@@ -17,31 +17,33 @@ Make sure to replace placeholder values with your actual environment token and u
17
17
  ```typescript
18
18
  import gwhale from 'guidewhale';
19
19
 
20
- gwhale.init("<guidewhale_environment_code>", {
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
+ 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
21
23
  user: {
22
- user_id: <user_id>, // REQUIRED - unique user identifier (e.g. 100000356, '6099047b-660b-4f2e-a878-fb66a12c1840', 'john.smith@example.com')
23
- email: <user_email>, // RECOMMENDED - email is used as the key to map user data for most integrations (e.g. 'john.smith@example.com')
24
- first_name: <user_first_name>, // RECOMMENDED - can be used to personalize GuideWhale content (e.g. 'John')
25
- last_name: <user_last_name>, // RECOMMENDED - can be used to personalize GuideWhale content (e.g. 'Smith')
26
- date_signed_up: <user_signup_date>, // RECOMMENDED - can be used to selectively show content to new users (Must be ISO8601 string - e.g. "2024-01-01T12:00:00Z")
27
- ... // OPTIONAL - additional user properties (e.g. gender: 'female')
24
+ user_id: <user_id>, // REQUIRED - string - unique user identifier (e.g. '100000356', '6099047b-660b-4f2e-a878-fb66a12c1840', 'john.smith@example.com')
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
+ first_name: <user_first_name>, // RECOMMENDED - string - can be used to personalize GuideWhale content (e.g. 'John')
27
+ last_name: <user_last_name>, // RECOMMENDED - string - can be used to personalize GuideWhale content (e.g. 'Smith')
28
+ 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")
29
+ ... // OPTIONAL - string | number | date - custom user properties (e.g. gender: 'female')
28
30
  },
29
- company: {
30
- company_id: <company_id>, // REQUIRED - unique company identifier (e.g. 100000356, '6099047b-660b-4f2e-a878-fb66a12c1840')
31
- name: <company_name>, // RECOMMENDED - can be used to personalize GuideWhale content (e.g. 'GuideWhale Inc.')
32
- plan: <company_subscription_plan>, // RECOMMENDED - can be used to target users for upselling, discounts, and promotions (e.g. 'free', 'basic', 'pro')
33
- date_signed_up: <company_signup_date>, // RECOMMENDED - can be used to selectively show content to new companies (Must be ISO8601 string - e.g. "2024-01-01T12:00:00Z")
34
- date_renewal: <company_renewal_date>, // RECOMMENDED - can be used to encourage companies to renew their contract (Must be ISO8601 string - e.g. "2024-01-01T12:00:00Z")
35
- mrr: <company_mrr>, // RECOMMENDED - can be used to target companies spending more or less (e.g. 100.0, 500.0, 1000.0)
36
- license_count: <company_license_count>, // RECOMMENDED - can be used to target bigger customers (e.g. 1, 5, 10, 50)
37
- industry: <company_industry>, // RECOMMENDED - can be used to segment companies by industries (e.g. 'Medical', 'Financial Services')
38
- size: <company_size>, // RECOMMENDED - can be used to segment companies by their size (e.g. 100, 250, 1000)
39
- ... // OPTIONAL - additional company properties (e.g. location: 'United States')
31
+ company: {
32
+ company_id: <company_id>, // REQUIRED - string - unique company identifier (e.g. '100000356', '6099047b-660b-4f2e-a878-fb66a12c1840')
33
+ name: <company_name>, // RECOMMENDED - string - can be used to personalize GuideWhale content (e.g. 'GuideWhale Inc.')
34
+ plan: <company_subscription_plan>, // RECOMMENDED - string - can be used to target users for upselling, discounts, and promotions (e.g. 'free', 'basic', 'pro')
35
+ 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")
36
+ 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")
37
+ mrr: <company_mrr>, // RECOMMENDED - number - can be used to target companies spending more or less (e.g. 100.0, 500.0, 1000.0)
38
+ license_count: <company_license_count>, // RECOMMENDED - number - can be used to target bigger customers (e.g. 1, 5, 10, 50)
39
+ industry: <company_industry>, // RECOMMENDED - string - can be used to segment companies by industries (e.g. 'Medical', 'Financial Services')
40
+ size: <company_size>, // RECOMMENDED - number - can be used to segment companies by their size (e.g. 100, 250, 1000)
41
+ ... // OPTIONAL - string | number | date - custom company properties (e.g. location: 'United States')
40
42
  },
41
43
  membership: {
42
- is_primary: <user_is_primary_contact>, // RECOMMENDED - whether user is the primary contact for the company (e.g. true, false)
43
- role: <user_company_role>, // RECOMMENDED - you can target users based on their role in the company (e.g. 'admin', 'user', 'guest')
44
- ... // OPTIONAL - additional user company membership properties (e.g. employee_number: 12345)
44
+ is_primary: <user_is_primary_contact>, // RECOMMENDED - boolean - whether user is the primary contact for the company (e.g. true, false)
45
+ role: <user_company_role>, // RECOMMENDED - string - you can target users based on their role in the company (e.g. 'admin', 'user', 'guest')
46
+ ... // OPTIONAL - string | number | date - custom user company membership properties (e.g. employee_number: 12345)
45
47
  }
46
48
  });
47
49
  ```
@@ -1,4 +1,12 @@
1
- var r = ["init", "reset", "track", "on", "off", "onRedirect"], t = typeof window < "u" ? window : {}, o = t.document, e = t.gwhale;
1
+ var r = [
2
+ "init",
3
+ /*'identify', 'group',*/
4
+ "reset",
5
+ "track",
6
+ "on",
7
+ "off",
8
+ "onRedirect"
9
+ ], t = typeof window < "u" ? window : {}, o = t.document, e = t.gwhale;
2
10
  if (!e) {
3
11
  e = t.gwhale = {
4
12
  location: t.location.href.toString(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "guidewhale",
3
- "version": "0.1.26",
3
+ "version": "1.0.1",
4
4
  "description": "GuideWhale SDK client script loader",
5
5
  "type": "module",
6
6
  "main": "dist/guidewhale.js",