@cuemath/web-utils 1.0.29-beta.11 → 1.0.29-beta.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/dist/cjs/ab-experiment/utils/experiments.js +11 -3
- package/dist/cjs/ab-experiment/utils/experiments.js.map +1 -1
- package/dist/cjs/analytics/index.d.ts +0 -1
- package/dist/cjs/analytics/index.js +0 -1
- package/dist/cjs/analytics/index.js.map +1 -1
- package/dist/cjs/constants/index.d.ts +0 -1
- package/dist/cjs/constants/index.js +0 -1
- package/dist/cjs/constants/index.js.map +1 -1
- package/dist/cjs/growth-source/index.d.ts +3 -11
- package/dist/cjs/growth-source/index.js +103 -55
- package/dist/cjs/growth-source/index.js.map +1 -1
- package/dist/cjs/growth-source/types.d.ts +2 -19
- package/dist/cjs/website-category/constants/index.d.ts +1 -3
- package/dist/cjs/website-category/constants/index.js +25 -110
- package/dist/cjs/website-category/constants/index.js.map +1 -1
- package/dist/cjs/website-category/index.d.ts +2 -3
- package/dist/cjs/website-category/index.js +2 -6
- package/dist/cjs/website-category/index.js.map +1 -1
- package/dist/cjs/website-category/utils/index.d.ts +1 -1
- package/dist/cjs/website-category/utils/index.js +15 -6
- package/dist/cjs/website-category/utils/index.js.map +1 -1
- package/dist/esm/ab-experiment/utils/experiments.js +12 -4
- package/dist/esm/ab-experiment/utils/experiments.js.map +1 -1
- package/dist/esm/analytics/index.d.ts +0 -1
- package/dist/esm/analytics/index.js +0 -1
- package/dist/esm/analytics/index.js.map +1 -1
- package/dist/esm/constants/index.d.ts +0 -1
- package/dist/esm/constants/index.js +0 -1
- package/dist/esm/constants/index.js.map +1 -1
- package/dist/esm/growth-source/index.d.ts +3 -11
- package/dist/esm/growth-source/index.js +93 -40
- package/dist/esm/growth-source/index.js.map +1 -1
- package/dist/esm/growth-source/types.d.ts +2 -19
- package/dist/esm/website-category/constants/index.d.ts +1 -3
- package/dist/esm/website-category/constants/index.js +24 -109
- package/dist/esm/website-category/constants/index.js.map +1 -1
- package/dist/esm/website-category/index.d.ts +2 -3
- package/dist/esm/website-category/index.js +2 -3
- package/dist/esm/website-category/index.js.map +1 -1
- package/dist/esm/website-category/utils/index.d.ts +1 -1
- package/dist/esm/website-category/utils/index.js +13 -4
- package/dist/esm/website-category/utils/index.js.map +1 -1
- package/package.json +2 -5
- package/dist/cjs/analytics/data-props.d.ts +0 -3
- package/dist/cjs/analytics/data-props.js +0 -20
- package/dist/cjs/analytics/data-props.js.map +0 -1
- package/dist/cjs/constants/instrumentation/index.d.ts +0 -5
- package/dist/cjs/constants/instrumentation/index.js +0 -9
- package/dist/cjs/constants/instrumentation/index.js.map +0 -1
- package/dist/cjs/data/utm-source.json +0 -52
- package/dist/cjs/growth-source/scripts/source-channel.d.ts +0 -1
- package/dist/cjs/growth-source/scripts/source-channel.js +0 -44
- package/dist/cjs/growth-source/scripts/source-channel.js.map +0 -1
- package/dist/cjs/website-category/constants/instrumentation.d.ts +0 -138
- package/dist/cjs/website-category/constants/instrumentation.js +0 -142
- package/dist/cjs/website-category/constants/instrumentation.js.map +0 -1
- package/dist/cjs/website-category/utils/instrumentation.d.ts +0 -2
- package/dist/cjs/website-category/utils/instrumentation.js +0 -61
- package/dist/cjs/website-category/utils/instrumentation.js.map +0 -1
- package/dist/esm/analytics/data-props.d.ts +0 -3
- package/dist/esm/analytics/data-props.js +0 -17
- package/dist/esm/analytics/data-props.js.map +0 -1
- package/dist/esm/constants/instrumentation/index.d.ts +0 -5
- package/dist/esm/constants/instrumentation/index.js +0 -6
- package/dist/esm/constants/instrumentation/index.js.map +0 -1
- package/dist/esm/data/utm-source.json +0 -52
- package/dist/esm/growth-source/scripts/source-channel.d.ts +0 -1
- package/dist/esm/growth-source/scripts/source-channel.js +0 -44
- package/dist/esm/growth-source/scripts/source-channel.js.map +0 -1
- package/dist/esm/website-category/constants/instrumentation.d.ts +0 -138
- package/dist/esm/website-category/constants/instrumentation.js +0 -139
- package/dist/esm/website-category/constants/instrumentation.js.map +0 -1
- package/dist/esm/website-category/utils/instrumentation.d.ts +0 -2
- package/dist/esm/website-category/utils/instrumentation.js +0 -56
- package/dist/esm/website-category/utils/instrumentation.js.map +0 -1
|
@@ -1,123 +1,65 @@
|
|
|
1
1
|
const URL_PATH_MAP = {
|
|
2
2
|
HOMEPAGE: '/',
|
|
3
3
|
WHY_CHOOSE_US: '/math-online-classes',
|
|
4
|
-
ABOUT_US: '/about-us
|
|
4
|
+
ABOUT_US: '/about-us',
|
|
5
5
|
TUTORING_SERVICES: '/tutoring-services',
|
|
6
|
-
HOME_TUTION: '/home-tuition',
|
|
6
|
+
HOME_TUTION: '/home-tuition-in',
|
|
7
7
|
HOME_TUTOR: '/home-tutor',
|
|
8
|
-
HOME_TUTORS: '/home-tutors/',
|
|
9
8
|
HOME_TUTORING: '/home-tutoring',
|
|
10
9
|
HYBRID_TEACHER_PROFILE: '/hybrid-teacher-profile/',
|
|
11
|
-
MATH_TUITION: '/math-tuition
|
|
10
|
+
MATH_TUITION: '/math-tuition',
|
|
12
11
|
CENTRES: '/centres/',
|
|
13
|
-
|
|
14
|
-
ONLINE_TUITIONS: '/online-tuitions
|
|
15
|
-
GRADE_MATH: 'grade-math
|
|
16
|
-
ONLINE_MATH_COURSES: '/online-math-courses
|
|
12
|
+
MATHS: '/maths/',
|
|
13
|
+
ONLINE_TUITIONS: '/online-tuitions',
|
|
14
|
+
GRADE_MATH: '-grade-math',
|
|
15
|
+
ONLINE_MATH_COURSES: '/online-math-courses',
|
|
17
16
|
TUITION_TUTORS: '/tuition-tutors',
|
|
18
|
-
TEACH: '/teach
|
|
19
|
-
TEACHER_PROFILE: '
|
|
20
|
-
NEAR_ME: 'near-me
|
|
21
|
-
CONTACT: '/contact
|
|
17
|
+
TEACH: '/teach',
|
|
18
|
+
TEACHER_PROFILE: 'teacher-profile',
|
|
19
|
+
NEAR_ME: 'near-me',
|
|
20
|
+
CONTACT: '/contact',
|
|
22
21
|
PARENT_SIGNUP: '/parent/signup',
|
|
23
|
-
FREQUENTLY_ASKED_QUESTIONS: '/frequently-asked-questions
|
|
22
|
+
FREQUENTLY_ASKED_QUESTIONS: '/frequently-asked-questions',
|
|
24
23
|
HASH_HOMEPAGE: '/#',
|
|
25
24
|
QUERY_HOMEPAGE: '/?',
|
|
26
|
-
USA_HOMEPAGE: '/usa
|
|
27
|
-
CURRICULUM: '/curriculum
|
|
25
|
+
USA_HOMEPAGE: '/usa',
|
|
26
|
+
CURRICULUM: '/curriculum',
|
|
28
27
|
PRIVATE_TUTORS: '/private-tutors',
|
|
29
28
|
ONLINE_MATH_TUTORS: '/online-math-tutors',
|
|
30
|
-
MATHS_PROGRAM: '/maths-program
|
|
29
|
+
MATHS_PROGRAM: '/maths-program',
|
|
31
30
|
ONLINE_MATH_COURSE: '/online-math-course/',
|
|
32
|
-
TRIGONOMETRY_TUTORS: '/trigonometry-tutors
|
|
33
|
-
GEOMETRY_TUTORS: '/geometry-tutors
|
|
34
|
-
ALGEBRA_TUTORS: '/algebra-tutors
|
|
35
|
-
AFTER_SCHOOL_TUTORING: '/after-school-tutoring
|
|
36
|
-
MATHS_TEACHER: '/maths-teacher
|
|
31
|
+
TRIGONOMETRY_TUTORS: '/trigonometry-tutors',
|
|
32
|
+
GEOMETRY_TUTORS: '/geometry-tutors',
|
|
33
|
+
ALGEBRA_TUTORS: '/algebra-tutors',
|
|
34
|
+
AFTER_SCHOOL_TUTORING: '/after-school-tutoring',
|
|
35
|
+
MATHS_TEACHER: '/maths-teacher',
|
|
37
36
|
LIVE_ONLINE_CLASSES: '/live-online-classes',
|
|
38
|
-
PARENT_STUDENT_SEO: '/parent-signup-seo',
|
|
39
|
-
WORKSHEETS: '/worksheets/',
|
|
40
|
-
WORKSHEET: '/worksheet/',
|
|
41
|
-
QUESTIONS: '/questions/',
|
|
42
|
-
MATH_PUZZLES: '/math-puzzles/',
|
|
43
|
-
MATH_GAMES: '/math-games/',
|
|
44
|
-
FORMULA: '-formula',
|
|
45
|
-
FORMULAS: '-formulas/',
|
|
46
|
-
CALCULATORS: '/calculators/',
|
|
47
|
-
MULTIPLICATION_TABLE: '/multiplication-tables/',
|
|
48
|
-
MULTIPLICATION: '/multiplication/',
|
|
49
|
-
LEARNING: '/learning/',
|
|
50
|
-
LEARN: '/learn/',
|
|
51
|
-
MATH_OLYMPIAD: '/math-olympiad/',
|
|
52
|
-
GEOMETRY: '/geometry/',
|
|
53
|
-
DATA: '/data/',
|
|
54
|
-
NUMBERS: '/numbers/',
|
|
55
|
-
ALGEBRA: '/algebra/',
|
|
56
|
-
CALCULUS: '/calculus/',
|
|
57
|
-
MEASURMENT: '/measurement/',
|
|
58
|
-
TRIGONOMETRY: '/trigonometry/',
|
|
59
|
-
COMMERCIAL_MATH: '/commercial-math/',
|
|
60
|
-
NCERT: '/ncert',
|
|
61
|
-
NCERT2: '/NCERT',
|
|
62
|
-
NCERT_SOLUTIONS: '/ncert-solutions/',
|
|
63
|
-
STORIES_FOR_KIDS: '/stories-for-kids',
|
|
64
|
-
EN_HOMEPAGE: '/en-',
|
|
65
|
-
ABOUT: '/about/',
|
|
66
|
-
LOGIN: '/login',
|
|
67
|
-
MATH_CLASS: '/maths/class-',
|
|
68
|
-
ONLINE_MATH: '/online-math-',
|
|
69
|
-
HYBRID_TEACHER: '/hybrid-teacher',
|
|
70
|
-
TUITION_TEACHER: 'tuition-teacher',
|
|
71
|
-
CLASS: '/class-',
|
|
72
|
-
GRADE: /^\/grade-\d+\/$/,
|
|
73
|
-
GRADES: /^\/grades\/$/,
|
|
74
|
-
LEAP_PAYMENT: '/leap-payment/',
|
|
75
|
-
LEARN_MATH_ONLINE: 'learn-math-online-',
|
|
76
|
-
UPGRADE: '/upgrade/',
|
|
77
|
-
HCL: '/hcl/',
|
|
78
|
-
WORK_FROM_HOME: 'work-from-home',
|
|
79
|
-
TEACHER_JOBS: 'teacher-jobs',
|
|
80
|
-
TEACHERS_JOBS: 'teachers-jobs',
|
|
81
|
-
PART_TIME_JOBS: 'part-time-jobs',
|
|
82
|
-
ONLINE_TUTORING_JOBS: '/online-tutoring-jobs/',
|
|
83
|
-
TEACHER_SIGNUP: '/teacher/signup',
|
|
84
|
-
TEACHER: '/teacher/',
|
|
85
|
-
PDF: 'pdf',
|
|
86
|
-
DOWNLOAD: 'download',
|
|
87
|
-
CUEMATH_OLYMPIAD: 'cuemath-olympiad',
|
|
88
|
-
GIFT: '/gift/',
|
|
89
|
-
MATH_FORMULA: '/math-formulas',
|
|
90
|
-
COURSE_OLYMPIAD: '/course/olympiad/',
|
|
91
|
-
PHILOSOPHY: '/philosophy',
|
|
92
|
-
PRICING: '/pricing',
|
|
93
|
-
MATHS_YEAR: '/maths/year-',
|
|
94
37
|
};
|
|
95
38
|
export const BRAND_PAGES = [
|
|
96
39
|
URL_PATH_MAP.HOMEPAGE,
|
|
97
40
|
URL_PATH_MAP.ABOUT_US,
|
|
98
41
|
URL_PATH_MAP.CONTACT,
|
|
42
|
+
URL_PATH_MAP.PARENT_SIGNUP,
|
|
99
43
|
URL_PATH_MAP.HASH_HOMEPAGE,
|
|
100
44
|
URL_PATH_MAP.QUERY_HOMEPAGE,
|
|
101
45
|
URL_PATH_MAP.FREQUENTLY_ASKED_QUESTIONS,
|
|
102
46
|
URL_PATH_MAP.USA_HOMEPAGE,
|
|
103
|
-
URL_PATH_MAP.ABOUT,
|
|
104
|
-
URL_PATH_MAP.LOGIN,
|
|
105
47
|
];
|
|
106
48
|
export const INTENT_PAGES = [
|
|
107
49
|
URL_PATH_MAP.WHY_CHOOSE_US,
|
|
108
50
|
URL_PATH_MAP.TUTORING_SERVICES,
|
|
109
51
|
URL_PATH_MAP.HOME_TUTION,
|
|
110
52
|
URL_PATH_MAP.HOME_TUTOR,
|
|
111
|
-
URL_PATH_MAP.HOME_TUTORS,
|
|
112
53
|
URL_PATH_MAP.HOME_TUTORING,
|
|
113
54
|
URL_PATH_MAP.HYBRID_TEACHER_PROFILE,
|
|
114
|
-
URL_PATH_MAP.HYBRID_TEACHER,
|
|
115
55
|
URL_PATH_MAP.MATH_TUITION,
|
|
116
56
|
URL_PATH_MAP.CENTRES,
|
|
117
|
-
URL_PATH_MAP.
|
|
57
|
+
URL_PATH_MAP.MATHS,
|
|
118
58
|
URL_PATH_MAP.ONLINE_TUITIONS,
|
|
59
|
+
URL_PATH_MAP.GRADE_MATH,
|
|
119
60
|
URL_PATH_MAP.ONLINE_MATH_COURSES,
|
|
120
61
|
URL_PATH_MAP.TUITION_TUTORS,
|
|
62
|
+
URL_PATH_MAP.TEACH,
|
|
121
63
|
URL_PATH_MAP.TEACHER_PROFILE,
|
|
122
64
|
URL_PATH_MAP.NEAR_ME,
|
|
123
65
|
URL_PATH_MAP.CURRICULUM,
|
|
@@ -131,32 +73,5 @@ export const INTENT_PAGES = [
|
|
|
131
73
|
URL_PATH_MAP.AFTER_SCHOOL_TUTORING,
|
|
132
74
|
URL_PATH_MAP.MATHS_TEACHER,
|
|
133
75
|
URL_PATH_MAP.LIVE_ONLINE_CLASSES,
|
|
134
|
-
URL_PATH_MAP.PARENT_SIGNUP,
|
|
135
|
-
URL_PATH_MAP.PARENT_STUDENT_SEO,
|
|
136
|
-
URL_PATH_MAP.MATH_CLASS,
|
|
137
|
-
URL_PATH_MAP.GRADE_MATH,
|
|
138
|
-
URL_PATH_MAP.TUITION_TEACHER,
|
|
139
|
-
URL_PATH_MAP.LEAP_PAYMENT,
|
|
140
|
-
URL_PATH_MAP.GRADE,
|
|
141
|
-
URL_PATH_MAP.GRADES,
|
|
142
|
-
URL_PATH_MAP.LEARN_MATH_ONLINE,
|
|
143
|
-
URL_PATH_MAP.UPGRADE,
|
|
144
|
-
URL_PATH_MAP.HCL,
|
|
145
|
-
URL_PATH_MAP.ONLINE_MATH,
|
|
146
|
-
URL_PATH_MAP.COURSE_OLYMPIAD,
|
|
147
|
-
URL_PATH_MAP.PHILOSOPHY,
|
|
148
|
-
URL_PATH_MAP.PRICING,
|
|
149
|
-
URL_PATH_MAP.MATHS_YEAR,
|
|
150
|
-
];
|
|
151
|
-
export const SUPPLY_PAGES = [
|
|
152
|
-
URL_PATH_MAP.WORK_FROM_HOME,
|
|
153
|
-
URL_PATH_MAP.MATHS_TEACHER,
|
|
154
|
-
URL_PATH_MAP.TEACHERS_JOBS,
|
|
155
|
-
URL_PATH_MAP.TEACHER_JOBS,
|
|
156
|
-
URL_PATH_MAP.PART_TIME_JOBS,
|
|
157
|
-
URL_PATH_MAP.ONLINE_TUTORING_JOBS,
|
|
158
|
-
URL_PATH_MAP.TEACHER_SIGNUP,
|
|
159
|
-
URL_PATH_MAP.TEACHER,
|
|
160
76
|
];
|
|
161
|
-
export const REFERRAL_PAGES = [URL_PATH_MAP.GIFT];
|
|
162
77
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/website-category/constants/index.ts"],"names":[],"mappings":"AAAA,MAAM,YAAY,GAAG;IACnB,QAAQ,EAAE,GAAG;IACb,aAAa,EAAE,sBAAsB;IACrC,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/website-category/constants/index.ts"],"names":[],"mappings":"AAAA,MAAM,YAAY,GAAG;IACnB,QAAQ,EAAE,GAAG;IACb,aAAa,EAAE,sBAAsB;IACrC,QAAQ,EAAE,WAAW;IACrB,iBAAiB,EAAE,oBAAoB;IACvC,WAAW,EAAE,kBAAkB;IAC/B,UAAU,EAAE,aAAa;IACzB,aAAa,EAAE,gBAAgB;IAC/B,sBAAsB,EAAE,0BAA0B;IAClD,YAAY,EAAE,eAAe;IAC7B,OAAO,EAAE,WAAW;IACpB,KAAK,EAAE,SAAS;IAChB,eAAe,EAAE,kBAAkB;IACnC,UAAU,EAAE,aAAa;IACzB,mBAAmB,EAAE,sBAAsB;IAC3C,cAAc,EAAE,iBAAiB;IACjC,KAAK,EAAE,QAAQ;IACf,eAAe,EAAE,iBAAiB;IAClC,OAAO,EAAE,SAAS;IAClB,OAAO,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AAY,CAAC,aAAa;IAC1B,YAAY,CAAC,kBAAkB;IAC/B,YAAY,CAAC,mBAAmB;IAChC,YAAY,CAAC,eAAe;IAC5B,YAAY,CAAC,cAAc;IAC3B,YAAY,CAAC,qBAAqB;IAClC,YAAY,CAAC,aAAa;IAC1B,YAAY,CAAC,mBAAmB;CACjC,CAAC"}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { BRAND_PAGES, INTENT_PAGES
|
|
3
|
-
export { getSubRevenueChannel } from './utils/instrumentation';
|
|
1
|
+
export { isBrandOrIntentPage } from './utils';
|
|
2
|
+
export { BRAND_PAGES, INTENT_PAGES } from './constants';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { BRAND_PAGES, INTENT_PAGES
|
|
3
|
-
export { getSubRevenueChannel } from './utils/instrumentation';
|
|
1
|
+
export { isBrandOrIntentPage } from './utils';
|
|
2
|
+
export { BRAND_PAGES, INTENT_PAGES } from './constants';
|
|
4
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/website-category/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/website-category/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const isBrandOrIntentPage: (path: string) => boolean;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { removeTrailingSlashFromPath } from '../../url-parser';
|
|
2
|
+
import { BRAND_PAGES, INTENT_PAGES } from '../constants';
|
|
3
|
+
export const isBrandOrIntentPage = (path) => {
|
|
4
|
+
if (path === '/') {
|
|
5
|
+
return true;
|
|
6
|
+
}
|
|
7
|
+
const urlWithoutTrailingSlash = removeTrailingSlashFromPath(path);
|
|
8
|
+
const isBrandPage = BRAND_PAGES.some(pagePath => pagePath === '/' ? false : urlWithoutTrailingSlash.includes(pagePath));
|
|
9
|
+
const isIntentPage = INTENT_PAGES.some(pagePath => pagePath === '/' ? false : urlWithoutTrailingSlash.includes(pagePath));
|
|
10
|
+
if (isBrandPage || isIntentPage) {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
return false;
|
|
5
14
|
};
|
|
6
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/website-category/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/website-category/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAAY,EAAE,EAAE;IAClD,IAAI,IAAI,KAAK,GAAG,EAAE;QAChB,OAAO,IAAI,CAAC;KACb;IAED,MAAM,uBAAuB,GAAG,2BAA2B,CAAC,IAAI,CAAC,CAAC;IAElE,MAAM,WAAW,GAAG,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAC9C,QAAQ,KAAK,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,uBAAuB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CACtE,CAAC;IACF,MAAM,YAAY,GAAG,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAChD,QAAQ,KAAK,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,uBAAuB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CACtE,CAAC;IAEF,IAAI,WAAW,IAAI,YAAY,EAAE;QAC/B,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cuemath/web-utils",
|
|
3
|
-
"version": "1.0.29-beta.
|
|
3
|
+
"version": "1.0.29-beta.2",
|
|
4
4
|
"description": "Shared web utils package",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -74,10 +74,7 @@
|
|
|
74
74
|
"husky": "8.0.2",
|
|
75
75
|
"lint-staged": ">=10",
|
|
76
76
|
"prettier": "^2.8.1",
|
|
77
|
-
"typescript": "4.9.4"
|
|
78
|
-
"fs": "^0.0.1-security",
|
|
79
|
-
"papaparse": "^5.4.1",
|
|
80
|
-
"path": "^0.12.7"
|
|
77
|
+
"typescript": "4.9.4"
|
|
81
78
|
},
|
|
82
79
|
"dependencies": {
|
|
83
80
|
"@types/node": "^18.11.18",
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDataProps = void 0;
|
|
4
|
-
const analytics_1 = require("../constants/analytics");
|
|
5
|
-
const getDataProps = (entryPoint = '', entrySection = '', topic = '', isCustomTracking) => {
|
|
6
|
-
const dataProps = {
|
|
7
|
-
[analytics_1.DATA_VARIABLES.ENTRY_POINT]: entryPoint,
|
|
8
|
-
[analytics_1.DATA_VARIABLES.ENTRY_SECTION]: entrySection,
|
|
9
|
-
[analytics_1.DATA_VARIABLES.TOPIC]: topic,
|
|
10
|
-
[analytics_1.DATA_VARIABLES.CUSTOM_TRACKING]: isCustomTracking,
|
|
11
|
-
};
|
|
12
|
-
Object.keys(dataProps)?.forEach(key => {
|
|
13
|
-
if (!dataProps[key]) {
|
|
14
|
-
delete dataProps[key];
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
return dataProps;
|
|
18
|
-
};
|
|
19
|
-
exports.getDataProps = getDataProps;
|
|
20
|
-
//# sourceMappingURL=data-props.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data-props.js","sourceRoot":"","sources":["../../../src/analytics/data-props.ts"],"names":[],"mappings":";;;AAAA,sDAAwD;AAEjD,MAAM,YAAY,GAAG,CAC1B,UAAU,GAAG,EAAE,EACf,YAAY,GAAG,EAAE,EACjB,KAAK,GAAG,EAAE,EACV,gBAAyB,EACY,EAAE;IACvC,MAAM,SAAS,GAAG;QAChB,CAAC,0BAAc,CAAC,WAAW,CAAC,EAAE,UAAU;QACxC,CAAC,0BAAc,CAAC,aAAa,CAAC,EAAE,YAAY;QAC5C,CAAC,0BAAc,CAAC,KAAK,CAAC,EAAE,KAAK;QAC7B,CAAC,0BAAc,CAAC,eAAe,CAAC,EAAE,gBAAgB;KACnD,CAAC;IAEF,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE;QACpC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE;YACnB,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;SACvB;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AApBW,QAAA,YAAY,gBAoBvB"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.REVENUE_CHANNEL = exports.REFERRAL_PAGE_PATH = void 0;
|
|
4
|
-
exports.REFERRAL_PAGE_PATH = ['gift/invite/', 'gift/referral/'];
|
|
5
|
-
exports.REVENUE_CHANNEL = {
|
|
6
|
-
REFERRAL: 'referral',
|
|
7
|
-
ORGANIC: 'organic',
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/constants/instrumentation/index.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;AAExD,QAAA,eAAe,GAAG;IAC7B,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;CACnB,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"Affiliate": "paid_affiliate_others",
|
|
3
|
-
"D_g": "paid_ad_google",
|
|
4
|
-
"d_fb_m": "paid_ad_fb",
|
|
5
|
-
"d_sem_m": "paid_ad_google",
|
|
6
|
-
"D_s": "paid_ad_google",
|
|
7
|
-
"dr_fb_m": "paid_ad_fb",
|
|
8
|
-
"system": "referral_others",
|
|
9
|
-
"dc_fb_m": "paid_ad_fb",
|
|
10
|
-
"dr_sem_m": "paid_ad_google",
|
|
11
|
-
"dc_sem_m": "paid_ad_google",
|
|
12
|
-
"CUEMATHAPP": "organic",
|
|
13
|
-
"CUETEACHERAPP": "organic",
|
|
14
|
-
"IM": "paid_affiliate_bp_influencer",
|
|
15
|
-
"la": "referral_parent",
|
|
16
|
-
"social": "organic_social",
|
|
17
|
-
"website": "Organic",
|
|
18
|
-
"google": "paid_ad_biddables",
|
|
19
|
-
"CUEMATH": "organic",
|
|
20
|
-
"SocialMedia": "Organic_social",
|
|
21
|
-
"d_apex": "paid_affiliate_others",
|
|
22
|
-
"D-Social": "Organic_social",
|
|
23
|
-
"ORM": "paid_affiliate_bp_influencer",
|
|
24
|
-
"d_disc_m": "paid_ad_google",
|
|
25
|
-
"Facebook": "organic_facebook",
|
|
26
|
-
"gbl": "organic_gbl",
|
|
27
|
-
"youtube": "organic_social",
|
|
28
|
-
"offline_community": "offline_events",
|
|
29
|
-
"cj": "paid_affiliate_others",
|
|
30
|
-
"D_email": "organic_email",
|
|
31
|
-
"dc_disc_m": "paid_ad_google",
|
|
32
|
-
"affiliate-brainly": "paid_affiliate_others",
|
|
33
|
-
"Offline_Event_UAE_Local": "offline_events",
|
|
34
|
-
"CE-Messenger": "organic_Messenger",
|
|
35
|
-
"CE-Inbound": "organic_inbound",
|
|
36
|
-
"CE-Instagram": "organic_insta",
|
|
37
|
-
"referral": "referral_others",
|
|
38
|
-
"d_momentus": "paid_affiliate_others",
|
|
39
|
-
"promotion_mushrif_mall_QR_Code": "offline_events",
|
|
40
|
-
"affiliate-bark": "paid_affiliate_others",
|
|
41
|
-
"PAID-EXP": "paid_ad_biddables",
|
|
42
|
-
"utm_source": "test",
|
|
43
|
-
"email": "organic_email",
|
|
44
|
-
"PAID-EXP-AUS": "paid_ad_biddables",
|
|
45
|
-
"d_opicle": "paid_affiliate_others",
|
|
46
|
-
"REFERRAL": "referral_others",
|
|
47
|
-
"Old Leads": "others",
|
|
48
|
-
"Outbound Phone call": "organic_outbound",
|
|
49
|
-
"chatbot": "organic",
|
|
50
|
-
"d_magixengage": "paid_affiliate_others",
|
|
51
|
-
"CE-Info": "organic_info"
|
|
52
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
3
|
-
const fs = require('fs');
|
|
4
|
-
const path = require('path');
|
|
5
|
-
const csv = require('papaparse');
|
|
6
|
-
const ClusterMetaInfoFileName = 'utm-source';
|
|
7
|
-
(function csvFileToJSON() {
|
|
8
|
-
const INPUT_FILE_PATH = path.resolve(__dirname, '.', `../../data/${ClusterMetaInfoFileName}.csv`);
|
|
9
|
-
const OUTPUT_FILE_PATH = path.resolve(__dirname, '.', `../../data/${ClusterMetaInfoFileName}.json`);
|
|
10
|
-
try {
|
|
11
|
-
fs.readFile(INPUT_FILE_PATH, 'utf-8', (err, data) => {
|
|
12
|
-
if (err)
|
|
13
|
-
throw err;
|
|
14
|
-
const options = {
|
|
15
|
-
header: true,
|
|
16
|
-
delimiter: ',',
|
|
17
|
-
quoteChar: '"',
|
|
18
|
-
escapeChar: '\\',
|
|
19
|
-
};
|
|
20
|
-
const jsonObj = csv.parse(data, options).data;
|
|
21
|
-
let sourceChannelData = {};
|
|
22
|
-
jsonObj.forEach(utmSourceChannelObject => {
|
|
23
|
-
const { utm_source: utmSource, source_channel: sourceChannel } = utmSourceChannelObject || {};
|
|
24
|
-
if (sourceChannelData[utmSource]) {
|
|
25
|
-
throw new Error(`Duplicate utm_source Found ${utmSource}`);
|
|
26
|
-
}
|
|
27
|
-
sourceChannelData[utmSource] = sourceChannel;
|
|
28
|
-
});
|
|
29
|
-
const jsonString = JSON.stringify(sourceChannelData, null, 2);
|
|
30
|
-
fs.writeFile(OUTPUT_FILE_PATH, jsonString, e => {
|
|
31
|
-
if (e)
|
|
32
|
-
throw e;
|
|
33
|
-
// eslint-disable-next-line no-console
|
|
34
|
-
console.log('CSV file converted to JSON');
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
catch (err) {
|
|
39
|
-
// eslint-disable-next-line no-console
|
|
40
|
-
console.log(err);
|
|
41
|
-
process.exit(1);
|
|
42
|
-
}
|
|
43
|
-
})();
|
|
44
|
-
//# sourceMappingURL=source-channel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"source-channel.js","sourceRoot":"","sources":["../../../../src/growth-source/scripts/source-channel.js"],"names":[],"mappings":";AAAA,uDAAuD;AACvD,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAE7B,MAAM,GAAG,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAEjC,MAAM,uBAAuB,GAAG,YAAY,CAAC;AAE7C,CAAC,SAAS,aAAa;IACrB,MAAM,eAAe,GAAG,IAAI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C,CAAC;QACL,CAAC,CAAC,CAAC;KACJ;IAAC,OAAO,GAAG,EAAE;QACZ,sCAAsC;QACtC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACjB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;AACH,CAAC,CAAC,EAAE,CAAC"}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
export declare const seoPageNames: {
|
|
2
|
-
numbers: {
|
|
3
|
-
title: string;
|
|
4
|
-
route: string;
|
|
5
|
-
};
|
|
6
|
-
algebra: {
|
|
7
|
-
title: string;
|
|
8
|
-
route: string;
|
|
9
|
-
};
|
|
10
|
-
geometry: {
|
|
11
|
-
title: string;
|
|
12
|
-
route: string;
|
|
13
|
-
};
|
|
14
|
-
data: {
|
|
15
|
-
title: string;
|
|
16
|
-
route: string;
|
|
17
|
-
};
|
|
18
|
-
measurement: {
|
|
19
|
-
title: string;
|
|
20
|
-
route: string;
|
|
21
|
-
};
|
|
22
|
-
'commercial-math': {
|
|
23
|
-
title: string;
|
|
24
|
-
route: string;
|
|
25
|
-
};
|
|
26
|
-
trigonometry: {
|
|
27
|
-
title: string;
|
|
28
|
-
route: string;
|
|
29
|
-
};
|
|
30
|
-
calculus: {
|
|
31
|
-
title: string;
|
|
32
|
-
route: string;
|
|
33
|
-
};
|
|
34
|
-
learn: {
|
|
35
|
-
title: string;
|
|
36
|
-
route: string;
|
|
37
|
-
};
|
|
38
|
-
learning: {
|
|
39
|
-
title: string;
|
|
40
|
-
route: string;
|
|
41
|
-
};
|
|
42
|
-
'multiplication-tables': {
|
|
43
|
-
title: string;
|
|
44
|
-
route: string;
|
|
45
|
-
};
|
|
46
|
-
calculators: {
|
|
47
|
-
title: string;
|
|
48
|
-
route: string;
|
|
49
|
-
};
|
|
50
|
-
'math-formulas': {
|
|
51
|
-
title: string;
|
|
52
|
-
route: string;
|
|
53
|
-
};
|
|
54
|
-
'ncert-solutions': {
|
|
55
|
-
title: string;
|
|
56
|
-
route: string;
|
|
57
|
-
};
|
|
58
|
-
'math-olympiad': {
|
|
59
|
-
title: string;
|
|
60
|
-
route: string;
|
|
61
|
-
};
|
|
62
|
-
questions: {
|
|
63
|
-
title: string;
|
|
64
|
-
route: string;
|
|
65
|
-
};
|
|
66
|
-
worksheets: {
|
|
67
|
-
title: string;
|
|
68
|
-
route: string;
|
|
69
|
-
};
|
|
70
|
-
worksheet: {
|
|
71
|
-
title: string;
|
|
72
|
-
route: string;
|
|
73
|
-
};
|
|
74
|
-
'math-puzzles': {
|
|
75
|
-
title: string;
|
|
76
|
-
route: string;
|
|
77
|
-
};
|
|
78
|
-
'math-games': {
|
|
79
|
-
title: string;
|
|
80
|
-
route: string;
|
|
81
|
-
};
|
|
82
|
-
formula: {
|
|
83
|
-
title: string;
|
|
84
|
-
route: string;
|
|
85
|
-
};
|
|
86
|
-
multiplication: {
|
|
87
|
-
title: string;
|
|
88
|
-
route: string;
|
|
89
|
-
};
|
|
90
|
-
teach: {
|
|
91
|
-
title: string;
|
|
92
|
-
route: string;
|
|
93
|
-
};
|
|
94
|
-
ncert: {
|
|
95
|
-
title: string;
|
|
96
|
-
route: string;
|
|
97
|
-
};
|
|
98
|
-
ncert2: {
|
|
99
|
-
title: string;
|
|
100
|
-
route: string;
|
|
101
|
-
};
|
|
102
|
-
'stories-for-kids': {
|
|
103
|
-
title: string;
|
|
104
|
-
route: string;
|
|
105
|
-
};
|
|
106
|
-
pdf: {
|
|
107
|
-
title: string;
|
|
108
|
-
route: string;
|
|
109
|
-
};
|
|
110
|
-
download: {
|
|
111
|
-
title: string;
|
|
112
|
-
route: string;
|
|
113
|
-
};
|
|
114
|
-
'cuemath-olympiad': {
|
|
115
|
-
title: string;
|
|
116
|
-
route: string;
|
|
117
|
-
};
|
|
118
|
-
Maths: {
|
|
119
|
-
title: string;
|
|
120
|
-
route: string;
|
|
121
|
-
};
|
|
122
|
-
Grades: {
|
|
123
|
-
title: string;
|
|
124
|
-
route: string;
|
|
125
|
-
};
|
|
126
|
-
Concept: {
|
|
127
|
-
title: string;
|
|
128
|
-
route: string;
|
|
129
|
-
};
|
|
130
|
-
Properties: {
|
|
131
|
-
title: string;
|
|
132
|
-
route: string;
|
|
133
|
-
};
|
|
134
|
-
'Complex-numbers': {
|
|
135
|
-
title: string;
|
|
136
|
-
route: string;
|
|
137
|
-
};
|
|
138
|
-
};
|