@cuemath/web-utils 1.0.35 → 1.0.37-arun.0
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/ab-variant.js +1 -1
- package/dist/cjs/constants/index.d.ts +1 -0
- package/dist/cjs/constants/index.js +1 -0
- package/dist/cjs/constants/index.js.map +1 -1
- package/dist/cjs/constants/instrumentation/index.d.ts +5 -0
- package/dist/cjs/constants/instrumentation/index.js +9 -0
- package/dist/cjs/constants/instrumentation/index.js.map +1 -0
- package/dist/cjs/data/utm-source.json +52 -0
- package/dist/cjs/growth-source/index.d.ts +11 -3
- package/dist/cjs/growth-source/index.js +62 -104
- package/dist/cjs/growth-source/index.js.map +1 -1
- package/dist/cjs/growth-source/scripts/source-channel.d.ts +1 -0
- package/dist/cjs/growth-source/scripts/source-channel.js +44 -0
- package/dist/cjs/growth-source/scripts/source-channel.js.map +1 -0
- package/dist/cjs/growth-source/types.d.ts +20 -2
- package/dist/cjs/website-category/constants/index.js +44 -32
- package/dist/cjs/website-category/constants/index.js.map +1 -1
- package/dist/cjs/website-category/constants/instrumentation.d.ts +12 -0
- package/dist/cjs/website-category/constants/instrumentation.js +13 -1
- package/dist/cjs/website-category/constants/instrumentation.js.map +1 -1
- package/dist/cjs/website-category/utils/instrumentation.d.ts +1 -1
- package/dist/esm/ab-experiment/utils/ab-variant.js +1 -1
- package/dist/esm/constants/index.d.ts +1 -0
- package/dist/esm/constants/index.js +1 -0
- package/dist/esm/constants/index.js.map +1 -1
- package/dist/esm/constants/instrumentation/index.d.ts +5 -0
- package/dist/esm/constants/instrumentation/index.js +6 -0
- package/dist/esm/constants/instrumentation/index.js.map +1 -0
- package/dist/esm/data/utm-source.json +52 -0
- package/dist/esm/growth-source/index.d.ts +11 -3
- package/dist/esm/growth-source/index.js +57 -94
- package/dist/esm/growth-source/index.js.map +1 -1
- package/dist/esm/growth-source/scripts/source-channel.d.ts +1 -0
- package/dist/esm/growth-source/scripts/source-channel.js +44 -0
- package/dist/esm/growth-source/scripts/source-channel.js.map +1 -0
- package/dist/esm/growth-source/types.d.ts +20 -2
- package/dist/esm/website-category/constants/index.js +44 -32
- package/dist/esm/website-category/constants/index.js.map +1 -1
- package/dist/esm/website-category/constants/instrumentation.d.ts +12 -0
- package/dist/esm/website-category/constants/instrumentation.js +13 -1
- package/dist/esm/website-category/constants/instrumentation.js.map +1 -1
- package/dist/esm/website-category/utils/instrumentation.d.ts +1 -1
- package/package.json +4 -1
|
@@ -4,7 +4,7 @@ exports.getABExperimentCacheKey = exports.getABVariant = void 0;
|
|
|
4
4
|
const url_parser_1 = require("../../url-parser");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const experiments_1 = require("./experiments");
|
|
7
|
-
const EXPERIMENT_VERSION = '2.0.
|
|
7
|
+
const EXPERIMENT_VERSION = '2.0.1';
|
|
8
8
|
const getABVariant = (url, countryCode, currentABVariant) => {
|
|
9
9
|
const path = (0, url_parser_1.removeHrefLangFromPath)((0, url_parser_1.removeQueryStringFromPath)(url));
|
|
10
10
|
const newAbVariants = {
|
|
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./country"), exports);
|
|
18
18
|
__exportStar(require("./date-time"), exports);
|
|
19
19
|
__exportStar(require("./currency-symbols"), exports);
|
|
20
|
+
__exportStar(require("./instrumentation"), exports);
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,8CAA4B;AAC5B,qDAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,8CAA4B;AAC5B,qDAAmC;AACnC,oDAAkC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,52 @@
|
|
|
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,14 +1,22 @@
|
|
|
1
|
-
import type { SourceDetails, SourceDetailsCookie, Platform, SignupFlow,
|
|
1
|
+
import type { SourceDetails, SourceDetailsCookie, Platform, SignupFlow, SignupForm, RevenueChannel } from './types';
|
|
2
2
|
export declare const readSourceCookie: () => SourceDetailsCookie;
|
|
3
3
|
export declare const isSourcePresent: () => boolean;
|
|
4
|
-
export declare const initSourceDetails: ({ platform, experiments, flow, affiliateChannel, offlineChannel,
|
|
4
|
+
export declare const initSourceDetails: ({ platform, experiments, flow, affiliateChannel, offlineChannel, pageProfile, performanceChannel, revenueChannel, salesProcess, guestId, landingPage, referrer, sourceChannel, }: SourceDetails) => Promise<void>;
|
|
5
5
|
export declare const setLastPage: (pagePath: string) => Promise<void>;
|
|
6
6
|
export declare const setFlowEntryPoint: (flowEntry: string) => Promise<void>;
|
|
7
7
|
export declare const setFlow: (flow: SignupFlow) => Promise<void>;
|
|
8
|
-
export declare const setOrganicChannel: (organicChannel: OrganicChannel) => Promise<void>;
|
|
9
8
|
export declare const setRevenueChannel: (revenueChannel: RevenueChannel) => Promise<void>;
|
|
10
9
|
export declare const setSalesProcess: (salesProcess: string) => Promise<void>;
|
|
11
10
|
export declare const clearSalesProcess: () => Promise<void>;
|
|
12
11
|
export declare const updateGuestId: (guestId: string) => Promise<void>;
|
|
13
12
|
export declare const setFirstPage: (pagePath: string) => Promise<void>;
|
|
14
13
|
export declare const setPlatformChannel: (platformChannel: Platform) => Promise<void>;
|
|
14
|
+
export declare const setLandingPage: (landingPage: string) => Promise<void>;
|
|
15
|
+
export declare const setReferrer: (referrer: string) => Promise<void>;
|
|
16
|
+
export declare const setSourceChannel: (sourceChannel: string) => Promise<void>;
|
|
17
|
+
export declare const setSubPlatform: (subPlatform: string) => Promise<void>;
|
|
18
|
+
export declare const setCurrentPage: (currentPage: string) => Promise<void>;
|
|
19
|
+
export declare const setPageProfile: (pageProfile: string) => Promise<void>;
|
|
20
|
+
export declare const setSignupForm: (signupForm: SignupForm) => Promise<void>;
|
|
21
|
+
export declare const clearSignupForm: () => Promise<void>;
|
|
22
|
+
export declare const getSourceChannel: (utmSource: string) => string;
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setPlatformChannel = exports.setFirstPage = exports.updateGuestId = exports.clearSalesProcess = exports.setSalesProcess = exports.setRevenueChannel = exports.
|
|
6
|
+
exports.getSourceChannel = exports.clearSignupForm = exports.setSignupForm = exports.setPageProfile = exports.setCurrentPage = exports.setSubPlatform = exports.setSourceChannel = exports.setReferrer = exports.setLandingPage = exports.setPlatformChannel = exports.setFirstPage = exports.updateGuestId = exports.clearSalesProcess = exports.setSalesProcess = exports.setRevenueChannel = exports.setFlow = exports.setFlowEntryPoint = exports.setLastPage = exports.initSourceDetails = exports.isSourcePresent = exports.readSourceCookie = void 0;
|
|
4
7
|
const cookie_1 = require("../cookie");
|
|
8
|
+
const utm_source_json_1 = __importDefault(require("../data/utm-source.json"));
|
|
5
9
|
const url_parser_1 = require("../url-parser");
|
|
6
10
|
const SOURCE_DETAILS_COOKIE = 'source_details';
|
|
7
|
-
const UTM_PARAMS = [
|
|
8
|
-
'utm_source',
|
|
9
|
-
'utm_medium',
|
|
10
|
-
'utm_campaign',
|
|
11
|
-
'utm_term',
|
|
12
|
-
];
|
|
13
11
|
const readSourceCookie = () => {
|
|
14
12
|
const sourceDetails = (0, cookie_1.getCookie)(SOURCE_DETAILS_COOKIE);
|
|
15
13
|
return sourceDetails ? JSON.parse(decodeURIComponent(sourceDetails)) : undefined;
|
|
@@ -26,34 +24,21 @@ const updateSourceCookie = (sourceDetail) => {
|
|
|
26
24
|
if (!(0, exports.isSourcePresent)())
|
|
27
25
|
return;
|
|
28
26
|
const sourceDetails = (0, exports.readSourceCookie)();
|
|
27
|
+
const { current = {}, ...restAttributes } = sourceDetails || {};
|
|
29
28
|
const updatedDetails = {
|
|
30
29
|
...sourceDetails,
|
|
31
|
-
|
|
30
|
+
current: !current
|
|
31
|
+
? { ...restAttributes, ...sourceDetail } // Copy FTP attributes for the first time
|
|
32
|
+
: { ...current, ...sourceDetail }, // Update current attributes when already created
|
|
32
33
|
};
|
|
33
34
|
writeSourceCookie(updatedDetails);
|
|
34
35
|
};
|
|
35
|
-
const getRevenueChannel = (platform
|
|
36
|
+
const getRevenueChannel = (platform) => {
|
|
36
37
|
let revenueChannel = 'unknown';
|
|
37
38
|
// set defaults for WEBSITE and ASTRO
|
|
38
39
|
if (platform === 'website') {
|
|
39
40
|
revenueChannel = 'organic';
|
|
40
41
|
}
|
|
41
|
-
if (utmSource) {
|
|
42
|
-
switch (true) {
|
|
43
|
-
case /^affiliate-/.test(utmSource):
|
|
44
|
-
revenueChannel = 'affiliate';
|
|
45
|
-
break;
|
|
46
|
-
case /^offline-/.test(utmSource):
|
|
47
|
-
revenueChannel = 'offline';
|
|
48
|
-
break;
|
|
49
|
-
case /^referral-/.test(utmSource):
|
|
50
|
-
revenueChannel = 'referral';
|
|
51
|
-
break;
|
|
52
|
-
case /^performance-/.test(utmSource):
|
|
53
|
-
revenueChannel = 'performance';
|
|
54
|
-
break;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
42
|
return revenueChannel;
|
|
58
43
|
};
|
|
59
44
|
/*
|
|
@@ -72,115 +57,47 @@ const getFlow = (platform, experiments) => {
|
|
|
72
57
|
}
|
|
73
58
|
return flow;
|
|
74
59
|
};
|
|
75
|
-
const getUTMParams = () => {
|
|
76
|
-
if (typeof window === undefined)
|
|
77
|
-
return {};
|
|
78
|
-
const search = new URLSearchParams(window.location.search);
|
|
79
|
-
const utmParams = UTM_PARAMS.reduce((acc, param) => {
|
|
80
|
-
const utmParam = search.get(param);
|
|
81
|
-
if (utmParam) {
|
|
82
|
-
acc[param] = utmParam;
|
|
83
|
-
}
|
|
84
|
-
return acc;
|
|
85
|
-
}, {});
|
|
86
|
-
return utmParams;
|
|
87
|
-
};
|
|
88
60
|
const getFirstPage = () => {
|
|
89
61
|
if (typeof window === undefined)
|
|
90
62
|
return '';
|
|
91
63
|
return (0, url_parser_1.removeHrefLangFromPath)(window.location.pathname);
|
|
92
64
|
};
|
|
93
|
-
/* TODO: Align Marketing Team on UTM source convention
|
|
94
|
-
affiliate-<channel>
|
|
95
|
-
performance-<channel>
|
|
96
|
-
organic-<channel>
|
|
97
|
-
offline-<channel>
|
|
98
|
-
*/
|
|
99
|
-
const getChannel = (utmSource) => {
|
|
100
|
-
// TODO: UTM source patter for FB, GOOGLE...
|
|
101
|
-
if (!utmSource)
|
|
102
|
-
return '';
|
|
103
|
-
let channel = '';
|
|
104
|
-
if (utmSource) {
|
|
105
|
-
switch (true) {
|
|
106
|
-
case /^affiliate-/.test(utmSource):
|
|
107
|
-
case /^offline-/.test(utmSource):
|
|
108
|
-
case /^referral-/.test(utmSource):
|
|
109
|
-
case /^performance-/.test(utmSource):
|
|
110
|
-
channel = utmSource.split('-')[1];
|
|
111
|
-
break;
|
|
112
|
-
default:
|
|
113
|
-
break;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
return channel;
|
|
117
|
-
};
|
|
118
65
|
/*
|
|
119
66
|
Set Static Source Details of user on Visit of Platform
|
|
120
67
|
*/
|
|
121
68
|
const initSourceDetails = async ({ platform, experiments, // only for website.
|
|
122
|
-
flow, affiliateChannel, offlineChannel,
|
|
123
|
-
const utmParams = getUTMParams();
|
|
124
|
-
const { utm_source: utmSource } = utmParams;
|
|
125
|
-
const leadChannel = getChannel(utmSource);
|
|
69
|
+
flow, affiliateChannel, offlineChannel, pageProfile, performanceChannel, revenueChannel, salesProcess, guestId, landingPage, referrer, sourceChannel, }) => {
|
|
126
70
|
/*
|
|
127
71
|
source cookie was added in cross subdomain for few days initially,
|
|
128
72
|
which was later changed to subdomain specific. Now to sending older cookie to backend, removing older cookie
|
|
129
73
|
*/
|
|
130
74
|
(0, cookie_1.removeCookie)(SOURCE_DETAILS_COOKIE, true);
|
|
131
|
-
revenueChannel = revenueChannel || getRevenueChannel(platform
|
|
132
|
-
if (utmSource) {
|
|
133
|
-
switch (revenueChannel) {
|
|
134
|
-
case 'affiliate':
|
|
135
|
-
affiliateChannel = affiliateChannel || leadChannel;
|
|
136
|
-
break;
|
|
137
|
-
case 'offline':
|
|
138
|
-
offlineChannel = offlineChannel || leadChannel;
|
|
139
|
-
break;
|
|
140
|
-
case 'organic':
|
|
141
|
-
organicChannel = organicChannel || leadChannel;
|
|
142
|
-
break;
|
|
143
|
-
case 'performance':
|
|
144
|
-
performanceChannel = performanceChannel || leadChannel;
|
|
145
|
-
break;
|
|
146
|
-
default:
|
|
147
|
-
break;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
75
|
+
revenueChannel = revenueChannel || getRevenueChannel(platform);
|
|
150
76
|
if (!(0, exports.isSourcePresent)()) {
|
|
151
77
|
const sourceDetails = {
|
|
152
78
|
platform_channel: platform,
|
|
153
79
|
experiment_dict: experiments,
|
|
154
|
-
utm_params: utmParams,
|
|
155
80
|
flow: flow || getFlow(platform, experiments),
|
|
156
81
|
affiliate_channel: affiliateChannel,
|
|
157
82
|
offline_channel: offlineChannel,
|
|
158
|
-
|
|
83
|
+
page_profile: pageProfile,
|
|
159
84
|
performance_channel: performanceChannel,
|
|
160
85
|
revenue_channel: revenueChannel,
|
|
161
86
|
first_page: getFirstPage(),
|
|
162
87
|
sales_process: salesProcess,
|
|
163
88
|
guest_id: guestId,
|
|
89
|
+
landing_page: landingPage,
|
|
90
|
+
referrer,
|
|
91
|
+
source_channel: sourceChannel,
|
|
164
92
|
};
|
|
165
93
|
writeSourceCookie(sourceDetails);
|
|
166
94
|
}
|
|
167
95
|
else {
|
|
168
|
-
|
|
96
|
+
const updatedSource = {
|
|
169
97
|
experiment_dict: experiments,
|
|
170
98
|
flow: flow || getFlow(platform, experiments),
|
|
171
99
|
guest_id: guestId,
|
|
172
100
|
};
|
|
173
|
-
if (utmSource) {
|
|
174
|
-
updatedSource = {
|
|
175
|
-
...updatedSource,
|
|
176
|
-
utm_params: utmParams,
|
|
177
|
-
affiliate_channel: affiliateChannel,
|
|
178
|
-
offline_channel: offlineChannel,
|
|
179
|
-
organic_channel: organicChannel,
|
|
180
|
-
performance_channel: performanceChannel,
|
|
181
|
-
revenue_channel: revenueChannel,
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
101
|
updateSourceCookie(updatedSource);
|
|
185
102
|
}
|
|
186
103
|
};
|
|
@@ -200,10 +117,6 @@ const setFlow = async (flow) => {
|
|
|
200
117
|
updateSourceCookie({ flow });
|
|
201
118
|
};
|
|
202
119
|
exports.setFlow = setFlow;
|
|
203
|
-
const setOrganicChannel = async (organicChannel) => {
|
|
204
|
-
updateSourceCookie({ organic_channel: organicChannel });
|
|
205
|
-
};
|
|
206
|
-
exports.setOrganicChannel = setOrganicChannel;
|
|
207
120
|
const setRevenueChannel = async (revenueChannel) => {
|
|
208
121
|
updateSourceCookie({ revenue_channel: revenueChannel });
|
|
209
122
|
};
|
|
@@ -228,4 +141,49 @@ const setPlatformChannel = async (platformChannel) => {
|
|
|
228
141
|
updateSourceCookie({ platform_channel: platformChannel });
|
|
229
142
|
};
|
|
230
143
|
exports.setPlatformChannel = setPlatformChannel;
|
|
144
|
+
const setLandingPage = async (landingPage) => {
|
|
145
|
+
updateSourceCookie({ landing_page: landingPage });
|
|
146
|
+
};
|
|
147
|
+
exports.setLandingPage = setLandingPage;
|
|
148
|
+
const setReferrer = async (referrer) => {
|
|
149
|
+
updateSourceCookie({ referrer });
|
|
150
|
+
};
|
|
151
|
+
exports.setReferrer = setReferrer;
|
|
152
|
+
const setSourceChannel = async (sourceChannel) => {
|
|
153
|
+
updateSourceCookie({ source_channel: sourceChannel });
|
|
154
|
+
};
|
|
155
|
+
exports.setSourceChannel = setSourceChannel;
|
|
156
|
+
const setSubPlatform = async (subPlatform) => {
|
|
157
|
+
updateSourceCookie({ sub_platform: subPlatform });
|
|
158
|
+
};
|
|
159
|
+
exports.setSubPlatform = setSubPlatform;
|
|
160
|
+
const setCurrentPage = async (currentPage) => {
|
|
161
|
+
updateSourceCookie({ current_page: currentPage });
|
|
162
|
+
};
|
|
163
|
+
exports.setCurrentPage = setCurrentPage;
|
|
164
|
+
const setPageProfile = async (pageProfile) => {
|
|
165
|
+
updateSourceCookie({ page_profile: pageProfile });
|
|
166
|
+
};
|
|
167
|
+
exports.setPageProfile = setPageProfile;
|
|
168
|
+
const setSignupForm = async (signupForm) => {
|
|
169
|
+
updateSourceCookie({ signup_form: signupForm });
|
|
170
|
+
};
|
|
171
|
+
exports.setSignupForm = setSignupForm;
|
|
172
|
+
const clearSignupForm = async () => {
|
|
173
|
+
updateSourceCookie({ signup_form: {} });
|
|
174
|
+
};
|
|
175
|
+
exports.clearSignupForm = clearSignupForm;
|
|
176
|
+
const getSourceChannel = (utmSource) => {
|
|
177
|
+
const utmSourceMap = {
|
|
178
|
+
...utm_source_json_1.default,
|
|
179
|
+
};
|
|
180
|
+
if (!utmSource) {
|
|
181
|
+
return 'organic';
|
|
182
|
+
}
|
|
183
|
+
if (utmSourceMap[utmSource]) {
|
|
184
|
+
return utmSourceMap[utmSource];
|
|
185
|
+
}
|
|
186
|
+
return 'Others';
|
|
187
|
+
};
|
|
188
|
+
exports.getSourceChannel = getSourceChannel;
|
|
231
189
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/growth-source/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/growth-source/index.ts"],"names":[],"mappings":";;;;;;AAUA,sCAAkE;AAClE,8EAAiE;AACjE,8CAAuD;AAEvD,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAExC,MAAM,gBAAgB,GAAG,GAAwB,EAAE;IACxD,MAAM,aAAa,GAAG,IAAA,kBAAS,EAAC,qBAAqB,CAAC,CAAC;IAEvD,OAAO,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACnF,CAAC,CAAC;A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|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,CAAC,OAAO,CAClC,SAAS,EACT,GAAG,EACH,cAAc,uBAAuB,MAAM,CAC5C,CAAC;IACF,MAAM,gBAAgB,GAAG,IAAI,CAAC,OAAO,CACnC,SAAS,EACT,GAAG,EACH,cAAc,uBAAuB,OAAO,CAC7C,CAAC;IAEF,IAAI;QACF,EAAE,CAAC,QAAQ,CAAC,eAAe,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YAClD,IAAI,GAAG;gBAAE,MAAM,GAAG,CAAC;YAEnB,MAAM,OAAO,GAAG;gBACd,MAAM,EAAE,IAAI;gBACZ,SAAS,EAAE,GAAG;gBACd,SAAS,EAAE,GAAG;gBACd,UAAU,EAAE,IAAI;aACjB,CAAC;YACF,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;YAE9C,IAAI,iBAAiB,GAAG,EAAE,CAAC;YAE3B,OAAO,CAAC,OAAO,CAAC,sBAAsB,CAAC,EAAE;gBACvC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,aAAa,EAAE,GAC5D,sBAAsB,IAAI,EAAE,CAAC;gBAE/B,IAAI,iBAAiB,CAAC,SAAS,CAAC,EAAE;oBAChC,MAAM,IAAI,KAAK,CAAC,8BAA8B,SAAS,EAAE,CAAC,CAAC;iBAC5D;gBAED,iBAAiB,CAAC,SAAS,CAAC,GAAG,aAAa,CAAC;YAC/C,CAAC,CAAC,CAAC;YACH,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,iBAAiB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YAE9D,EAAE,CAAC,SAAS,CAAC,gBAAgB,EAAE,UAAU,EAAE,CAAC,CAAC,EAAE;gBAC7C,IAAI,CAAC;oBAAE,MAAM,CAAC,CAAC;gBACf,sCAAsC;gBACtC,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;YAC5C,CAAC,CAAC,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"}
|
|
@@ -9,8 +9,15 @@ export type UTMParams = {
|
|
|
9
9
|
utm_medium?: string;
|
|
10
10
|
utm_campaign?: string;
|
|
11
11
|
utm_term?: string;
|
|
12
|
+
utm_content?: string;
|
|
13
|
+
utm_adcontent?: string;
|
|
12
14
|
};
|
|
13
15
|
export type UTMParamsKeys = keyof UTMParams;
|
|
16
|
+
export type SignupForm = {
|
|
17
|
+
form_id?: string;
|
|
18
|
+
product?: string;
|
|
19
|
+
process?: string;
|
|
20
|
+
};
|
|
14
21
|
export type SourceDetailsCookie = {
|
|
15
22
|
platform_channel: Platform;
|
|
16
23
|
experiment_dict?: Experiments;
|
|
@@ -20,12 +27,19 @@ export type SourceDetailsCookie = {
|
|
|
20
27
|
offline_channel?: string;
|
|
21
28
|
performance_channel?: string;
|
|
22
29
|
revenue_channel: RevenueChannel;
|
|
23
|
-
organic_channel?: string;
|
|
24
30
|
flow_entry?: string;
|
|
25
31
|
first_page?: string;
|
|
26
32
|
last_page?: string;
|
|
27
33
|
sales_process?: string;
|
|
28
34
|
guest_id?: string;
|
|
35
|
+
current?: Partial<SourceDetailsCookie>;
|
|
36
|
+
landing_page?: string;
|
|
37
|
+
referrer?: string;
|
|
38
|
+
source_channel?: string;
|
|
39
|
+
page_profile?: string;
|
|
40
|
+
sub_platform?: string;
|
|
41
|
+
current_page?: string;
|
|
42
|
+
signup_form?: SignupForm;
|
|
29
43
|
};
|
|
30
44
|
export type SourceDetails = {
|
|
31
45
|
platform: Platform;
|
|
@@ -36,10 +50,14 @@ export type SourceDetails = {
|
|
|
36
50
|
offlineChannel?: string;
|
|
37
51
|
performanceChannel?: string;
|
|
38
52
|
revenueChannel: RevenueChannel;
|
|
39
|
-
organicChannel?: string;
|
|
40
53
|
flowEntry?: string;
|
|
41
54
|
firstPage?: string;
|
|
42
55
|
lastPage?: string;
|
|
43
56
|
guestId?: string;
|
|
44
57
|
salesProcess?: string;
|
|
58
|
+
landingPage?: string;
|
|
59
|
+
referrer?: string;
|
|
60
|
+
sourceChannel?: string;
|
|
61
|
+
pageProfile?: string;
|
|
62
|
+
subPlatform?: string;
|
|
45
63
|
};
|
|
@@ -68,11 +68,13 @@ const URL_PATH_MAP = {
|
|
|
68
68
|
ABOUT: '/about/',
|
|
69
69
|
LOGIN: '/login',
|
|
70
70
|
MATH_CLASS: '/maths/class-',
|
|
71
|
+
MATH_CLASSES: '/math-classes',
|
|
71
72
|
ONLINE_MATH: '/online-math-',
|
|
72
73
|
HYBRID_TEACHER: '/hybrid-teacher',
|
|
73
74
|
TUITION_TEACHER: 'tuition-teacher',
|
|
74
75
|
CLASS: '/class-',
|
|
75
|
-
GRADE:
|
|
76
|
+
GRADE: /^(?!.*(?:worksheet|math-puzzle|chapter|program|learn)).*grade-/g,
|
|
77
|
+
MATHS: /^(?!.*(?:worksheet|formula|learn)).*\/maths/g,
|
|
76
78
|
GRADES: /^\/grades\/$/,
|
|
77
79
|
LEAP_PAYMENT: '/leap-payment/',
|
|
78
80
|
LEARN_MATH_ONLINE: 'learn-math-online-',
|
|
@@ -94,6 +96,10 @@ const URL_PATH_MAP = {
|
|
|
94
96
|
PHILOSOPHY: '/philosophy',
|
|
95
97
|
PRICING: '/pricing',
|
|
96
98
|
MATHS_YEAR: '/maths/year-',
|
|
99
|
+
POD_LEARNING: '/pod-learning/',
|
|
100
|
+
MATHS_CLASSROOM: '/maths-classroom',
|
|
101
|
+
MATHLETE_STUDENT_DETAILS: '/mathlete/student-details/',
|
|
102
|
+
FEE: '-fee-',
|
|
97
103
|
};
|
|
98
104
|
exports.BRAND_PAGES = [
|
|
99
105
|
URL_PATH_MAP.HOMEPAGE,
|
|
@@ -105,51 +111,57 @@ exports.BRAND_PAGES = [
|
|
|
105
111
|
URL_PATH_MAP.USA_HOMEPAGE,
|
|
106
112
|
URL_PATH_MAP.ABOUT,
|
|
107
113
|
URL_PATH_MAP.LOGIN,
|
|
114
|
+
URL_PATH_MAP.PARENT_SIGNUP,
|
|
108
115
|
];
|
|
109
116
|
exports.INTENT_PAGES = [
|
|
110
|
-
URL_PATH_MAP.
|
|
111
|
-
URL_PATH_MAP.
|
|
117
|
+
URL_PATH_MAP.AFTER_SCHOOL_TUTORING,
|
|
118
|
+
URL_PATH_MAP.ALGEBRA_TUTORS,
|
|
119
|
+
URL_PATH_MAP.CENTRES,
|
|
120
|
+
URL_PATH_MAP.COURSE_OLYMPIAD,
|
|
121
|
+
URL_PATH_MAP.CURRICULUM,
|
|
122
|
+
URL_PATH_MAP.FEE,
|
|
123
|
+
URL_PATH_MAP.GEOMETRY_TUTORS,
|
|
124
|
+
URL_PATH_MAP.GRADE_MATH,
|
|
125
|
+
URL_PATH_MAP.GRADE,
|
|
126
|
+
URL_PATH_MAP.GRADES,
|
|
112
127
|
URL_PATH_MAP.HOME_TUTION,
|
|
113
128
|
URL_PATH_MAP.HOME_TUTOR,
|
|
114
|
-
URL_PATH_MAP.HOME_TUTORS,
|
|
115
129
|
URL_PATH_MAP.HOME_TUTORING,
|
|
130
|
+
URL_PATH_MAP.HOME_TUTORS,
|
|
116
131
|
URL_PATH_MAP.HYBRID_TEACHER_PROFILE,
|
|
117
132
|
URL_PATH_MAP.HYBRID_TEACHER,
|
|
133
|
+
URL_PATH_MAP.LEAP_PAYMENT,
|
|
134
|
+
URL_PATH_MAP.LEARN_MATH_ONLINE,
|
|
135
|
+
URL_PATH_MAP.LIVE_ONLINE_CLASSES,
|
|
136
|
+
URL_PATH_MAP.MATH_CLASS,
|
|
137
|
+
URL_PATH_MAP.MATH_CLASSES,
|
|
138
|
+
URL_PATH_MAP.MATHS_CLASSROOM,
|
|
118
139
|
URL_PATH_MAP.MATH_TUITION,
|
|
119
|
-
URL_PATH_MAP.
|
|
140
|
+
URL_PATH_MAP.MATHLETE_STUDENT_DETAILS,
|
|
141
|
+
URL_PATH_MAP.MATHS,
|
|
142
|
+
URL_PATH_MAP.MATHS_PROGRAM,
|
|
143
|
+
URL_PATH_MAP.MATHS_TEACHER,
|
|
120
144
|
URL_PATH_MAP.MATHS_TUITION,
|
|
121
|
-
URL_PATH_MAP.
|
|
122
|
-
URL_PATH_MAP.ONLINE_MATH_COURSES,
|
|
123
|
-
URL_PATH_MAP.TUITION_TUTORS,
|
|
124
|
-
URL_PATH_MAP.TEACHER_PROFILE,
|
|
145
|
+
URL_PATH_MAP.MATHS_YEAR,
|
|
125
146
|
URL_PATH_MAP.NEAR_ME,
|
|
126
|
-
URL_PATH_MAP.CURRICULUM,
|
|
127
|
-
URL_PATH_MAP.PRIVATE_TUTORS,
|
|
128
|
-
URL_PATH_MAP.ONLINE_MATH_TUTORS,
|
|
129
|
-
URL_PATH_MAP.MATHS_PROGRAM,
|
|
130
147
|
URL_PATH_MAP.ONLINE_MATH_COURSE,
|
|
131
|
-
URL_PATH_MAP.
|
|
132
|
-
URL_PATH_MAP.
|
|
133
|
-
URL_PATH_MAP.ALGEBRA_TUTORS,
|
|
134
|
-
URL_PATH_MAP.AFTER_SCHOOL_TUTORING,
|
|
135
|
-
URL_PATH_MAP.MATHS_TEACHER,
|
|
136
|
-
URL_PATH_MAP.LIVE_ONLINE_CLASSES,
|
|
137
|
-
URL_PATH_MAP.PARENT_SIGNUP,
|
|
138
|
-
URL_PATH_MAP.PARENT_STUDENT_SEO,
|
|
139
|
-
URL_PATH_MAP.MATH_CLASS,
|
|
140
|
-
URL_PATH_MAP.GRADE_MATH,
|
|
141
|
-
URL_PATH_MAP.TUITION_TEACHER,
|
|
142
|
-
URL_PATH_MAP.LEAP_PAYMENT,
|
|
143
|
-
URL_PATH_MAP.GRADE,
|
|
144
|
-
URL_PATH_MAP.GRADES,
|
|
145
|
-
URL_PATH_MAP.LEARN_MATH_ONLINE,
|
|
146
|
-
URL_PATH_MAP.UPGRADE,
|
|
147
|
-
URL_PATH_MAP.HCL,
|
|
148
|
+
URL_PATH_MAP.ONLINE_MATH_COURSES,
|
|
149
|
+
URL_PATH_MAP.ONLINE_MATH_TUTORS,
|
|
148
150
|
URL_PATH_MAP.ONLINE_MATH,
|
|
149
|
-
URL_PATH_MAP.
|
|
151
|
+
URL_PATH_MAP.ONLINE_TUITIONS,
|
|
152
|
+
URL_PATH_MAP.PARENT_STUDENT_SEO,
|
|
150
153
|
URL_PATH_MAP.PHILOSOPHY,
|
|
151
154
|
URL_PATH_MAP.PRICING,
|
|
152
|
-
URL_PATH_MAP.
|
|
155
|
+
URL_PATH_MAP.PRIVATE_TUTORS,
|
|
156
|
+
URL_PATH_MAP.POD_LEARNING,
|
|
157
|
+
URL_PATH_MAP.TEACH,
|
|
158
|
+
URL_PATH_MAP.TEACHER_PROFILE,
|
|
159
|
+
URL_PATH_MAP.TRIGONOMETRY_TUTORS,
|
|
160
|
+
URL_PATH_MAP.TUITION_TEACHER,
|
|
161
|
+
URL_PATH_MAP.TUITION_TUTORS,
|
|
162
|
+
URL_PATH_MAP.TUTORING_SERVICES,
|
|
163
|
+
URL_PATH_MAP.UPGRADE,
|
|
164
|
+
URL_PATH_MAP.WHY_CHOOSE_US,
|
|
153
165
|
];
|
|
154
166
|
exports.SUPPLY_PAGES = [
|
|
155
167
|
URL_PATH_MAP.WORK_FROM_HOME,
|