@segment/action-destinations 3.132.1-ga4-cloud.16 → 3.132.1-intercom-fix.12
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/destinations/google-analytics-4/addPaymentInfo/generated-types.d.ts +1 -3
- package/dist/destinations/google-analytics-4/addPaymentInfo/index.js +6 -10
- package/dist/destinations/google-analytics-4/addPaymentInfo/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/addToCart/generated-types.d.ts +1 -3
- package/dist/destinations/google-analytics-4/addToCart/index.js +6 -10
- package/dist/destinations/google-analytics-4/addToCart/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/addToWishlist/generated-types.d.ts +1 -3
- package/dist/destinations/google-analytics-4/addToWishlist/index.js +6 -10
- package/dist/destinations/google-analytics-4/addToWishlist/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/beginCheckout/generated-types.d.ts +1 -3
- package/dist/destinations/google-analytics-4/beginCheckout/index.js +6 -10
- package/dist/destinations/google-analytics-4/beginCheckout/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/customEvent/generated-types.d.ts +1 -3
- package/dist/destinations/google-analytics-4/customEvent/index.js +6 -10
- package/dist/destinations/google-analytics-4/customEvent/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/ga4-functions.d.ts +0 -7
- package/dist/destinations/google-analytics-4/ga4-functions.js +1 -38
- package/dist/destinations/google-analytics-4/ga4-functions.js.map +1 -1
- package/dist/destinations/google-analytics-4/ga4-properties.d.ts +0 -2
- package/dist/destinations/google-analytics-4/ga4-properties.js +3 -17
- package/dist/destinations/google-analytics-4/ga4-properties.js.map +1 -1
- package/dist/destinations/google-analytics-4/ga4-types.d.ts +0 -14
- package/dist/destinations/google-analytics-4/ga4-types.js +0 -6
- package/dist/destinations/google-analytics-4/ga4-types.js.map +1 -1
- package/dist/destinations/google-analytics-4/generateLead/generated-types.d.ts +1 -3
- package/dist/destinations/google-analytics-4/generateLead/index.js +6 -10
- package/dist/destinations/google-analytics-4/generateLead/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/generated-types.d.ts +1 -2
- package/dist/destinations/google-analytics-4/index.js +10 -15
- package/dist/destinations/google-analytics-4/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/login/generated-types.d.ts +1 -3
- package/dist/destinations/google-analytics-4/login/index.js +6 -10
- package/dist/destinations/google-analytics-4/login/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/pageView/generated-types.d.ts +1 -3
- package/dist/destinations/google-analytics-4/pageView/index.js +6 -10
- package/dist/destinations/google-analytics-4/pageView/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/purchase/generated-types.d.ts +1 -3
- package/dist/destinations/google-analytics-4/purchase/index.js +6 -10
- package/dist/destinations/google-analytics-4/purchase/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/refund/generated-types.d.ts +1 -3
- package/dist/destinations/google-analytics-4/refund/index.js +6 -10
- package/dist/destinations/google-analytics-4/refund/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/removeFromCart/generated-types.d.ts +1 -3
- package/dist/destinations/google-analytics-4/removeFromCart/index.js +6 -10
- package/dist/destinations/google-analytics-4/removeFromCart/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/search/generated-types.d.ts +1 -3
- package/dist/destinations/google-analytics-4/search/index.js +6 -10
- package/dist/destinations/google-analytics-4/search/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/selectItem/generated-types.d.ts +1 -3
- package/dist/destinations/google-analytics-4/selectItem/index.js +6 -10
- package/dist/destinations/google-analytics-4/selectItem/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/selectPromotion/generated-types.d.ts +1 -3
- package/dist/destinations/google-analytics-4/selectPromotion/index.js +6 -10
- package/dist/destinations/google-analytics-4/selectPromotion/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/signUp/generated-types.d.ts +1 -3
- package/dist/destinations/google-analytics-4/signUp/index.js +6 -10
- package/dist/destinations/google-analytics-4/signUp/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewCart/generated-types.d.ts +1 -3
- package/dist/destinations/google-analytics-4/viewCart/index.js +6 -10
- package/dist/destinations/google-analytics-4/viewCart/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewItem/generated-types.d.ts +1 -3
- package/dist/destinations/google-analytics-4/viewItem/index.js +6 -10
- package/dist/destinations/google-analytics-4/viewItem/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewItemList/generated-types.d.ts +1 -3
- package/dist/destinations/google-analytics-4/viewItemList/index.js +6 -10
- package/dist/destinations/google-analytics-4/viewItemList/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewPromotion/generated-types.d.ts +1 -3
- package/dist/destinations/google-analytics-4/viewPromotion/index.js +6 -10
- package/dist/destinations/google-analytics-4/viewPromotion/index.js.map +1 -1
- package/dist/destinations/intercom/index.js +1 -1
- package/dist/destinations/intercom/index.js.map +1 -1
- package/dist/destinations/mixpanel/identifyUser/index.js +1 -1
- package/dist/destinations/mixpanel/identifyUser/index.js.map +1 -1
- package/dist/destinations/mixpanel/trackEvent/functions.js +2 -2
- package/dist/destinations/mixpanel/trackEvent/functions.js.map +1 -1
- package/dist/destinations/mixpanel/utils.d.ts +2 -2
- package/dist/destinations/mixpanel/utils.js +5 -9
- package/dist/destinations/mixpanel/utils.js.map +1 -1
- package/dist/destinations/saleswings/api.d.ts +4 -35
- package/dist/destinations/saleswings/api.js +7 -16
- package/dist/destinations/saleswings/api.js.map +1 -1
- package/dist/destinations/saleswings/common.d.ts +3 -3
- package/dist/destinations/saleswings/common.js +6 -18
- package/dist/destinations/saleswings/common.js.map +1 -1
- package/dist/destinations/saleswings/fields.d.ts +2 -2
- package/dist/destinations/saleswings/fields.js +3 -3
- package/dist/destinations/saleswings/generated-types.d.ts +1 -0
- package/dist/destinations/saleswings/index.js +12 -2
- package/dist/destinations/saleswings/index.js.map +1 -1
- package/dist/destinations/saleswings/submitIdentifyEvent/generated-types.d.ts +2 -2
- package/dist/destinations/saleswings/submitIdentifyEvent/index.js +4 -18
- package/dist/destinations/saleswings/submitIdentifyEvent/index.js.map +1 -1
- package/dist/destinations/saleswings/submitPageEvent/generated-types.d.ts +2 -2
- package/dist/destinations/saleswings/submitPageEvent/index.js +4 -18
- package/dist/destinations/saleswings/submitPageEvent/index.js.map +1 -1
- package/dist/destinations/saleswings/submitScreenEvent/generated-types.d.ts +2 -2
- package/dist/destinations/saleswings/submitScreenEvent/index.js +4 -21
- package/dist/destinations/saleswings/submitScreenEvent/index.js.map +1 -1
- package/dist/destinations/saleswings/submitTrackEvent/generated-types.d.ts +2 -2
- package/dist/destinations/saleswings/submitTrackEvent/index.js +4 -21
- package/dist/destinations/saleswings/submitTrackEvent/index.js.map +1 -1
- package/dist/destinations/saleswings/testing.d.ts +1 -3
- package/dist/destinations/saleswings/testing.js +13 -23
- package/dist/destinations/saleswings/testing.js.map +1 -1
- package/dist/destinations/webhook/__test__/webhook.test.js +36 -0
- package/dist/destinations/webhook/__test__/webhook.test.js.map +1 -1
- package/dist/destinations/webhook/index.js +3 -4
- package/dist/destinations/webhook/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/destinations/saleswings/converter.d.ts +0 -12
- package/dist/destinations/saleswings/converter.js +0 -34
- package/dist/destinations/saleswings/converter.js.map +0 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const actions_core_1 = require("@segment/actions-core");
|
|
4
|
-
const ga4_types_1 = require("../ga4-types");
|
|
5
4
|
const ga4_functions_1 = require("../ga4-functions");
|
|
6
5
|
const ga4_properties_1 = require("../ga4-properties");
|
|
7
6
|
const action = {
|
|
@@ -9,8 +8,6 @@ const action = {
|
|
|
9
8
|
description: 'Send event when a user submits their payment information',
|
|
10
9
|
defaultSubscription: 'type = "track" and event = "Payment Info Entered"',
|
|
11
10
|
fields: {
|
|
12
|
-
data_stream_type: { ...ga4_properties_1.data_stream_type },
|
|
13
|
-
app_instance_id: { ...ga4_properties_1.app_instance_id },
|
|
14
11
|
client_id: { ...ga4_properties_1.client_id },
|
|
15
12
|
user_id: { ...ga4_properties_1.user_id },
|
|
16
13
|
timestamp_micros: { ...ga4_properties_1.timestamp_micros },
|
|
@@ -26,11 +23,7 @@ const action = {
|
|
|
26
23
|
engagement_time_msec: ga4_properties_1.engagement_time_msec,
|
|
27
24
|
params: ga4_properties_1.params
|
|
28
25
|
},
|
|
29
|
-
perform: (request, { payload, features
|
|
30
|
-
const data_stream_type = payload.data_stream_type ?? ga4_types_1.DataStreamType.Web;
|
|
31
|
-
const stream_params = data_stream_type === ga4_types_1.DataStreamType.MobileApp
|
|
32
|
-
? ga4_functions_1.getMobileStreamParams(settings.apiSecret, settings.firebaseAppId, payload.app_instance_id)
|
|
33
|
-
: ga4_functions_1.getWebStreamParams(settings.apiSecret, settings.measurementId, payload.client_id);
|
|
26
|
+
perform: (request, { payload, features }) => {
|
|
34
27
|
if (payload.items && !payload.items.length) {
|
|
35
28
|
throw new actions_core_1.IntegrationError('Google requires one or more products in add_payment_info events.', 'Misconfigured required field', 400);
|
|
36
29
|
}
|
|
@@ -60,7 +53,7 @@ const action = {
|
|
|
60
53
|
ga4_functions_1.verifyUserProps(payload.user_properties);
|
|
61
54
|
}
|
|
62
55
|
const request_object = {
|
|
63
|
-
|
|
56
|
+
client_id: payload.client_id,
|
|
64
57
|
user_id: payload.user_id,
|
|
65
58
|
events: [
|
|
66
59
|
{
|
|
@@ -81,7 +74,10 @@ const action = {
|
|
|
81
74
|
if (features && features['actions-google-analytics-4-add-timestamp']) {
|
|
82
75
|
request_object.timestamp_micros = ga4_functions_1.convertTimestamp(payload.timestamp_micros);
|
|
83
76
|
}
|
|
84
|
-
return
|
|
77
|
+
return request('https://www.google-analytics.com/mp/collect', {
|
|
78
|
+
method: 'POST',
|
|
79
|
+
json: request_object
|
|
80
|
+
});
|
|
85
81
|
}
|
|
86
82
|
};
|
|
87
83
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/addPaymentInfo/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/addPaymentInfo/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAI1E,oDAAkG;AAClG,sDAa0B;AAE1B,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,0DAA0D;IACvE,mBAAmB,EAAE,mDAAmD;IACxE,MAAM,EAAE;QACN,SAAS,EAAE,EAAE,GAAG,0BAAS,EAAE;QAC3B,OAAO,EAAE,EAAE,GAAG,wBAAO,EAAE;QACvB,gBAAgB,EAAE,EAAE,GAAG,iCAAgB,EAAE;QACzC,QAAQ,EAAE,EAAE,GAAG,yBAAQ,EAAE;QACzB,KAAK,EAAE,EAAE,GAAG,sBAAK,EAAE;QACnB,MAAM,EAAE,EAAE,GAAG,uBAAM,EAAE;QACrB,YAAY,EAAE,EAAE,GAAG,6BAAY,EAAE;QACjC,KAAK,EAAE;YACL,GAAG,qCAAoB;YACvB,QAAQ,EAAE,IAAI;SACf;QACD,eAAe,EAAE,gCAAe;QAChC,oBAAoB,EAAE,qCAAoB;QAC1C,MAAM,EAAE,uBAAM;KACf;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAG1C,IAAI,OAAO,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE;YAC1C,MAAM,IAAI,+BAAgB,CACxB,kEAAkE,EAClE,8BAA8B,EAC9B,GAAG,CACJ,CAAA;SACF;QAED,IAAI,OAAO,CAAC,QAAQ,EAAE;YACpB,8BAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;SACjC;QAGD,IAAI,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C,KAAK;wBACpB,MAAM,EAAE,OAAO,CAAC,MAAM;wBACtB,YAAY,EAAE,OAAO,CAAC,YAAY;wBAClC,KAAK,EAAE,WAAW;wBAClB,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;wBAClD,GAAG,OAAO,CAAC,MAAM;qBAClB;iBACF;aACF;YACD,GAAG,qCAAoB,CAAC,OAAO,CAAC,eAAe,CAAC;SACjD,CAAA;QAED,IAAI,QAAQ,IAAI,QAAQ,CAAC,0CAA0C,CAAC,EAAE;YACpE,cAAc,CAAC,gBAAgB,GAAG,gCAAgB,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;SAC7E;QAED,OAAO,OAAO,CAAC,6CAA6C,EAAE;YAC5D,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,cAAc;SACrB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const actions_core_1 = require("@segment/actions-core");
|
|
4
|
-
const ga4_types_1 = require("../ga4-types");
|
|
5
4
|
const ga4_functions_1 = require("../ga4-functions");
|
|
6
5
|
const ga4_properties_1 = require("../ga4-properties");
|
|
7
6
|
const action = {
|
|
@@ -9,8 +8,6 @@ const action = {
|
|
|
9
8
|
description: 'Send event when a user adds items to a cart',
|
|
10
9
|
defaultSubscription: 'type = "track" and event = "Product Added"',
|
|
11
10
|
fields: {
|
|
12
|
-
data_stream_type: { ...ga4_properties_1.data_stream_type },
|
|
13
|
-
app_instance_id: { ...ga4_properties_1.app_instance_id },
|
|
14
11
|
client_id: { ...ga4_properties_1.client_id },
|
|
15
12
|
user_id: { ...ga4_properties_1.user_id },
|
|
16
13
|
timestamp_micros: { ...ga4_properties_1.timestamp_micros },
|
|
@@ -24,11 +21,7 @@ const action = {
|
|
|
24
21
|
engagement_time_msec: ga4_properties_1.engagement_time_msec,
|
|
25
22
|
params: ga4_properties_1.params
|
|
26
23
|
},
|
|
27
|
-
perform: (request, { payload, features
|
|
28
|
-
const data_stream_type = payload.data_stream_type ?? ga4_types_1.DataStreamType.Web;
|
|
29
|
-
const stream_params = data_stream_type === ga4_types_1.DataStreamType.MobileApp
|
|
30
|
-
? ga4_functions_1.getMobileStreamParams(settings.apiSecret, settings.firebaseAppId, payload.app_instance_id)
|
|
31
|
-
: ga4_functions_1.getWebStreamParams(settings.apiSecret, settings.measurementId, payload.client_id);
|
|
24
|
+
perform: (request, { payload, features }) => {
|
|
32
25
|
let googleItems = [];
|
|
33
26
|
if (payload.currency) {
|
|
34
27
|
ga4_functions_1.verifyCurrency(payload.currency);
|
|
@@ -49,7 +42,7 @@ const action = {
|
|
|
49
42
|
ga4_functions_1.verifyUserProps(payload.user_properties);
|
|
50
43
|
}
|
|
51
44
|
const request_object = {
|
|
52
|
-
|
|
45
|
+
client_id: payload.client_id,
|
|
53
46
|
user_id: payload.user_id,
|
|
54
47
|
events: [
|
|
55
48
|
{
|
|
@@ -68,7 +61,10 @@ const action = {
|
|
|
68
61
|
if (features && features['actions-google-analytics-4-add-timestamp']) {
|
|
69
62
|
request_object.timestamp_micros = ga4_functions_1.convertTimestamp(payload.timestamp_micros);
|
|
70
63
|
}
|
|
71
|
-
return
|
|
64
|
+
return request('https://www.google-analytics.com/mp/collect', {
|
|
65
|
+
method: 'POST',
|
|
66
|
+
json: request_object
|
|
67
|
+
});
|
|
72
68
|
}
|
|
73
69
|
};
|
|
74
70
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/addToCart/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/addToCart/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAI1E,oDAAkG;AAClG,sDAW0B;AAE1B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AC,MAAM,CAAC,CAAA;YAC5B,+BAAe,CAAC,OAAO,CAAC,eAAe,CAAC,CAAA;SACzC;QAED,MAAM,cAAc,GAA2B;YAC7C,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,MAAM,EAAE;gBACN;oBACE,IAAI,EAAE,aAAa;oBACnB,MAAM,EAAE;wBACN,QAAQ,EAAE,OAAO,CAAC,QAAQ;wBAC1B,KAAK,EAAE,WAAW;wBAClB,KAAK,EAAE,OAAO,CAAC,KAAK;wBACpB,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;wBAClD,GAAG,OAAO,CAAC,MAAM;qBAClB;iBACF;aACF;YACD,GAAG,qCAAoB,CAAC,OAAO,CAAC,eAAe,CAAC;SACjD,CAAA;QAED,IAAI,QAAQ,IAAI,QAAQ,CAAC,0CAA0C,CAAC,EAAE;YACpE,cAAc,CAAC,gBAAgB,GAAG,gCAAgB,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;SAC7E;QAED,OAAO,OAAO,CAAC,6CAA6C,EAAE;YAC5D,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,cAAc;SACrB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const actions_core_1 = require("@segment/actions-core");
|
|
4
|
-
const ga4_types_1 = require("../ga4-types");
|
|
5
4
|
const ga4_functions_1 = require("../ga4-functions");
|
|
6
5
|
const ga4_properties_1 = require("../ga4-properties");
|
|
7
6
|
const action = {
|
|
@@ -9,8 +8,6 @@ const action = {
|
|
|
9
8
|
description: 'Send event when a user adds items to a wishlist',
|
|
10
9
|
defaultSubscription: 'type = "track" and event = "Product Added to Wishlist"',
|
|
11
10
|
fields: {
|
|
12
|
-
data_stream_type: { ...ga4_properties_1.data_stream_type },
|
|
13
|
-
app_instance_id: { ...ga4_properties_1.app_instance_id },
|
|
14
11
|
client_id: { ...ga4_properties_1.client_id },
|
|
15
12
|
user_id: { ...ga4_properties_1.user_id },
|
|
16
13
|
timestamp_micros: { ...ga4_properties_1.timestamp_micros },
|
|
@@ -24,11 +21,7 @@ const action = {
|
|
|
24
21
|
engagement_time_msec: ga4_properties_1.engagement_time_msec,
|
|
25
22
|
params: ga4_properties_1.params
|
|
26
23
|
},
|
|
27
|
-
perform: (request, { payload, features
|
|
28
|
-
const data_stream_type = payload.data_stream_type ?? ga4_types_1.DataStreamType.Web;
|
|
29
|
-
const stream_params = data_stream_type === ga4_types_1.DataStreamType.MobileApp
|
|
30
|
-
? ga4_functions_1.getMobileStreamParams(settings.apiSecret, settings.firebaseAppId, payload.app_instance_id)
|
|
31
|
-
: ga4_functions_1.getWebStreamParams(settings.apiSecret, settings.measurementId, payload.client_id);
|
|
24
|
+
perform: (request, { payload, features }) => {
|
|
32
25
|
if (payload.currency) {
|
|
33
26
|
ga4_functions_1.verifyCurrency(payload.currency);
|
|
34
27
|
}
|
|
@@ -55,7 +48,7 @@ const action = {
|
|
|
55
48
|
ga4_functions_1.verifyUserProps(payload.user_properties);
|
|
56
49
|
}
|
|
57
50
|
const request_object = {
|
|
58
|
-
|
|
51
|
+
client_id: payload.client_id,
|
|
59
52
|
user_id: payload.user_id,
|
|
60
53
|
events: [
|
|
61
54
|
{
|
|
@@ -74,7 +67,10 @@ const action = {
|
|
|
74
67
|
if (features && features['actions-google-analytics-4-add-timestamp']) {
|
|
75
68
|
request_object.timestamp_micros = ga4_functions_1.convertTimestamp(payload.timestamp_micros);
|
|
76
69
|
}
|
|
77
|
-
return
|
|
70
|
+
return request('https://www.google-analytics.com/mp/collect', {
|
|
71
|
+
method: 'POST',
|
|
72
|
+
json: request_object
|
|
73
|
+
});
|
|
78
74
|
}
|
|
79
75
|
};
|
|
80
76
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/addToWishlist/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/addToWishlist/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAI1E,oDAAkG;AAClG,sDAW0B;AAE1B,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,iDAAiD;IAC9D,mBAAmB,EAAE,wDAAwD;IAC7E,MAAM,EAAE;QACN,SAAS,EAAE,EAAE,GAAG,0BAAS,EAAE;QAC3B,OAAO,EAAE,EAAE,GAAG,wBAAO,EAAE;QACvB,gBAAgB,EAAE,EAAE,GAAG,iCAAgB,EAAE;QACzC,QAAQ,EAAE,EAAE,GAAG,yBAAQ,EAAE;QACzB,KAAK,EAAE,EAAE,GAAG,sBAAK,EAAE;QACnB,KAAK,EAAE;YACL,GAAG,sCAAqB;YACxB,QAAQ,EAAE,IAAI;SACf;QACD,eAAe,EAAE,gCAAe;QAChC,oBAAoB,EAAE,qCAAoB;QAC1C,MAAM,EAAE,uBAAM;KACf;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC1C,IAAI,OAAO,CAAC,QAAQ,EAAE;YACpB,8BAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;SACjC;QAGD,IAAI,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,QAAQ,KAAK,SAAS,EAAE;YACnD,MAAM,IAAI,+BAAgB,CAAC,uCAAuC,EAAE,8BAA8B,EAAE,GAAG,CAAC,CAAA;SACzG;QAOD,IAAI,OAAO,CAAC,QAAQ,KAAK,SAAS,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,C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,0CAA0C,CAAC,EAAE;YACpE,cAAc,CAAC,gBAAgB,GAAG,gCAAgB,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;SAC7E;QAED,OAAO,OAAO,CAAC,6CAA6C,EAAE;YAC5D,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,cAAc;SACrB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -3,14 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const actions_core_1 = require("@segment/actions-core");
|
|
4
4
|
const ga4_functions_1 = require("../ga4-functions");
|
|
5
5
|
const ga4_properties_1 = require("../ga4-properties");
|
|
6
|
-
const ga4_types_1 = require("../ga4-types");
|
|
7
6
|
const action = {
|
|
8
7
|
title: 'Begin Checkout',
|
|
9
8
|
description: 'Send event when a user begins checkout',
|
|
10
9
|
defaultSubscription: 'type = "track" and event = "Checkout Started"',
|
|
11
10
|
fields: {
|
|
12
|
-
data_stream_type: { ...ga4_properties_1.data_stream_type },
|
|
13
|
-
app_instance_id: { ...ga4_properties_1.app_instance_id },
|
|
14
11
|
client_id: { ...ga4_properties_1.client_id },
|
|
15
12
|
user_id: { ...ga4_properties_1.user_id },
|
|
16
13
|
timestamp_micros: { ...ga4_properties_1.timestamp_micros },
|
|
@@ -25,11 +22,7 @@ const action = {
|
|
|
25
22
|
engagement_time_msec: ga4_properties_1.engagement_time_msec,
|
|
26
23
|
params: ga4_properties_1.params
|
|
27
24
|
},
|
|
28
|
-
perform: (request, { payload, features
|
|
29
|
-
const data_stream_type = payload.data_stream_type ?? ga4_types_1.DataStreamType.Web;
|
|
30
|
-
const stream_params = data_stream_type === ga4_types_1.DataStreamType.MobileApp
|
|
31
|
-
? ga4_functions_1.getMobileStreamParams(settings.apiSecret, settings.firebaseAppId, payload.app_instance_id)
|
|
32
|
-
: ga4_functions_1.getWebStreamParams(settings.apiSecret, settings.measurementId, payload.client_id);
|
|
25
|
+
perform: (request, { payload, features }) => {
|
|
33
26
|
if (payload.currency) {
|
|
34
27
|
ga4_functions_1.verifyCurrency(payload.currency);
|
|
35
28
|
}
|
|
@@ -50,7 +43,7 @@ const action = {
|
|
|
50
43
|
ga4_functions_1.verifyUserProps(payload.user_properties);
|
|
51
44
|
}
|
|
52
45
|
const request_object = {
|
|
53
|
-
|
|
46
|
+
client_id: payload.client_id,
|
|
54
47
|
user_id: payload.user_id,
|
|
55
48
|
events: [
|
|
56
49
|
{
|
|
@@ -70,7 +63,10 @@ const action = {
|
|
|
70
63
|
if (features && features['actions-google-analytics-4-add-timestamp']) {
|
|
71
64
|
request_object.timestamp_micros = ga4_functions_1.convertTimestamp(payload.timestamp_micros);
|
|
72
65
|
}
|
|
73
|
-
return
|
|
66
|
+
return request('https://www.google-analytics.com/mp/collect', {
|
|
67
|
+
method: 'POST',
|
|
68
|
+
json: request_object
|
|
69
|
+
});
|
|
74
70
|
}
|
|
75
71
|
};
|
|
76
72
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/beginCheckout/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/beginCheckout/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,oDAAkG;AAClG,sDAY0B;AAK1B,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,wCAAwC;IACrD,mBAAmB,EAAE,+CAA+C;IACpE,MAAM,EAAE;QACN,SAAS,EAAE,EAAE,GAAG,0BAAS,EAAE;QAC3B,OAAO,EAAE,EAAE,GAAG,wBAAO,EAAE;QACvB,gBAAgB,EAAE,EAAE,GAAG,iCAAgB,EAAE;QACzC,MAAM,EAAE,EAAE,GAAG,uBAAM,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,qB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,MAAM,EAAE;wBACN,MAAM,EAAE,OAAO,CAAC,MAAM;wBACtB,QAAQ,EAAE,OAAO,CAAC,QAAQ;wBAC1B,KAAK,EAAE,WAAW;wBAClB,KAAK,EAAE,OAAO,CAAC,KAAK;wBACpB,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;wBAClD,GAAG,OAAO,CAAC,MAAM;qBAClB;iBACF;aACF;YACD,GAAG,qCAAoB,CAAC,OAAO,CAAC,eAAe,CAAC;SACjD,CAAA;QAED,IAAI,QAAQ,IAAI,QAAQ,CAAC,0CAA0C,CAAC,EAAE;YACpE,cAAc,CAAC,gBAAgB,GAAG,gCAAgB,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;SAC7E;QAED,OAAO,OAAO,CAAC,6CAA6C,EAAE;YAC5D,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,cAAc;SACrB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const ga4_functions_1 = require("../ga4-functions");
|
|
4
4
|
const ga4_properties_1 = require("../ga4-properties");
|
|
5
|
-
const ga4_types_1 = require("../ga4-types");
|
|
6
5
|
const normalizeEventName = (name, lowercase) => {
|
|
7
6
|
name = name.trim();
|
|
8
7
|
name = name.replace(/\s/g, '_');
|
|
@@ -16,8 +15,6 @@ const action = {
|
|
|
16
15
|
description: 'Send any custom event',
|
|
17
16
|
defaultSubscription: 'type = "track"',
|
|
18
17
|
fields: {
|
|
19
|
-
data_stream_type: { ...ga4_properties_1.data_stream_type },
|
|
20
|
-
app_instance_id: { ...ga4_properties_1.app_instance_id },
|
|
21
18
|
clientId: { ...ga4_properties_1.client_id },
|
|
22
19
|
user_id: { ...ga4_properties_1.user_id },
|
|
23
20
|
timestamp_micros: { ...ga4_properties_1.timestamp_micros },
|
|
@@ -40,18 +37,14 @@ const action = {
|
|
|
40
37
|
engagement_time_msec: ga4_properties_1.engagement_time_msec,
|
|
41
38
|
params: { ...ga4_properties_1.params }
|
|
42
39
|
},
|
|
43
|
-
perform: (request, { payload, features
|
|
44
|
-
const data_stream_type = payload.data_stream_type ?? ga4_types_1.DataStreamType.Web;
|
|
45
|
-
const stream_params = data_stream_type === ga4_types_1.DataStreamType.MobileApp
|
|
46
|
-
? ga4_functions_1.getMobileStreamParams(settings.apiSecret, settings.firebaseAppId, payload.app_instance_id)
|
|
47
|
-
: ga4_functions_1.getWebStreamParams(settings.apiSecret, settings.measurementId, payload.clientId);
|
|
40
|
+
perform: (request, { payload, features }) => {
|
|
48
41
|
const event_name = normalizeEventName(payload.name, payload.lowercase);
|
|
49
42
|
if (features && features['actions-google-analytics-4-verify-params-feature']) {
|
|
50
43
|
ga4_functions_1.verifyParams(payload.params);
|
|
51
44
|
ga4_functions_1.verifyUserProps(payload.user_properties);
|
|
52
45
|
}
|
|
53
46
|
const request_object = {
|
|
54
|
-
|
|
47
|
+
client_id: payload.clientId,
|
|
55
48
|
user_id: payload.user_id,
|
|
56
49
|
events: [
|
|
57
50
|
{
|
|
@@ -67,7 +60,10 @@ const action = {
|
|
|
67
60
|
if (features && features['actions-google-analytics-4-add-timestamp']) {
|
|
68
61
|
request_object.timestamp_micros = ga4_functions_1.convertTimestamp(payload.timestamp_micros);
|
|
69
62
|
}
|
|
70
|
-
return
|
|
63
|
+
return request('https://www.google-analytics.com/mp/collect', {
|
|
64
|
+
method: 'POST',
|
|
65
|
+
json: request_object
|
|
66
|
+
});
|
|
71
67
|
}
|
|
72
68
|
};
|
|
73
69
|
exports.default = action;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/customEvent/index.ts"],"names":[],"mappings":";;AAGA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/customEvent/index.ts"],"names":[],"mappings":";;AAGA,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,OAAO,CAAC,MAAM,CAAC,CAAA;YAC5B,+BAAe,CAAC,OAAO,CAAC,eAAe,CAAC,CAAA;SACzC;QAED,MAAM,cAAc,GAA2B;YAC7C,SAAS,EAAE,OAAO,CAAC,QAAQ;YAC3B,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,MAAM,EAAE;gBACN;oBACE,IAAI,EAAE,UAAU;oBAChB,MAAM,EAAE;wBACN,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;wBAClD,GAAG,OAAO,CAAC,MAAM;qBAClB;iBACF;aACF;YACD,GAAG,qCAAoB,CAAC,OAAO,CAAC,eAAe,CAAC;SACjD,CAAA;QAED,IAAI,QAAQ,IAAI,QAAQ,CAAC,0CAA0C,CAAC,EAAE;YACpE,cAAc,CAAC,gBAAgB,GAAG,gCAAgB,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;SAC7E;QAED,OAAO,OAAO,CAAC,6CAA6C,EAAE;YAC5D,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,cAAc;SACrB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AACD,kBAAe,MAAM,CAAA"}
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import { RequestClient } from '@segment/actions-core';
|
|
2
|
-
import { DataStreamParams } from './ga4-types';
|
|
3
1
|
export declare function verifyCurrency(currency: string): void;
|
|
4
2
|
export declare function verifyParams(params: object | undefined): void;
|
|
5
3
|
export declare function verifyUserProps(userProperties: object | undefined): void;
|
|
6
4
|
export declare function convertTimestamp(timestamp: string | undefined): number | undefined;
|
|
7
|
-
export declare function getMobileStreamParams(api_secret: string, firebase_app_id?: string, app_instance_id?: string): DataStreamParams;
|
|
8
|
-
export declare function getWebStreamParams(api_secret: string, measurement_id?: string, client_id?: string): DataStreamParams;
|
|
9
|
-
export declare function sendData(request: RequestClient, search_params: string, payload: {
|
|
10
|
-
[k: string]: unknown;
|
|
11
|
-
}): Promise<import("@segment/actions-core").ModifiedResponse<unknown>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.convertTimestamp = exports.verifyUserProps = exports.verifyParams = exports.verifyCurrency = void 0;
|
|
4
4
|
const actions_core_1 = require("@segment/actions-core");
|
|
5
5
|
const constants_1 = require("./constants");
|
|
6
6
|
function verifyCurrency(currency) {
|
|
@@ -50,41 +50,4 @@ function convertTimestamp(timestamp) {
|
|
|
50
50
|
return Date.parse(timestamp) * 1000;
|
|
51
51
|
}
|
|
52
52
|
exports.convertTimestamp = convertTimestamp;
|
|
53
|
-
function getMobileStreamParams(api_secret, firebase_app_id, app_instance_id) {
|
|
54
|
-
if (!firebase_app_id) {
|
|
55
|
-
throw new actions_core_1.IntegrationError(`Firebase App ID is required for mobile app streams`, 'Invalid value', 400);
|
|
56
|
-
}
|
|
57
|
-
if (!app_instance_id) {
|
|
58
|
-
throw new actions_core_1.IntegrationError(`Firebase App Instance ID is required for mobile app streams`, 'Invalid value', 400);
|
|
59
|
-
}
|
|
60
|
-
return {
|
|
61
|
-
search_params: `api_secret=${api_secret}&firebase_app_id=${firebase_app_id}`,
|
|
62
|
-
identifier: {
|
|
63
|
-
app_instance_id
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
exports.getMobileStreamParams = getMobileStreamParams;
|
|
68
|
-
function getWebStreamParams(api_secret, measurement_id, client_id) {
|
|
69
|
-
if (!measurement_id) {
|
|
70
|
-
throw new actions_core_1.IntegrationError(`Measurement ID is required for web streams`, 'Invalid value', 400);
|
|
71
|
-
}
|
|
72
|
-
if (!client_id) {
|
|
73
|
-
throw new actions_core_1.IntegrationError(`Client ID is required for web streams`, 'Invalid value', 400);
|
|
74
|
-
}
|
|
75
|
-
return {
|
|
76
|
-
search_params: `api_secret=${api_secret}&measurement_id=${measurement_id}`,
|
|
77
|
-
identifier: {
|
|
78
|
-
client_id
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
exports.getWebStreamParams = getWebStreamParams;
|
|
83
|
-
async function sendData(request, search_params, payload) {
|
|
84
|
-
return request(`https://www.google-analytics.com/mp/collect?${search_params}`, {
|
|
85
|
-
method: 'POST',
|
|
86
|
-
json: payload
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
exports.sendData = sendData;
|
|
90
53
|
//# sourceMappingURL=ga4-functions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ga4-functions.js","sourceRoot":"","sources":["../../../src/destinations/google-analytics-4/ga4-functions.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ga4-functions.js","sourceRoot":"","sources":["../../../src/destinations/google-analytics-4/ga4-functions.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AACxD,2CAAgD;AAGhD,SAAgB,cAAc,CAAC,QAAgB;IAC7C,IAAI,CAAC,8BAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,EAAE;QACxD,MAAM,IAAI,+BAAgB,CAAC,GAAG,QAAQ,gCAAgC,EAAE,wBAAwB,EAAE,GAAG,CAAC,CAAA;KACvG;AACH,CAAC;AAJD,wCAIC;AAGD,SAAgB,YAAY,CAAC,MAA0B;IACrD,IAAI,CAAC,MAAM,EAAE;QACX,OAAM;KACP;IAED,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAC9C,IAAI,KAAK,YAAY,KAAK,EAAE;YAC1B,MAAM,IAAI,+BAAgB,CACxB,UAAU,GAAG,sIAAsI,EACnJ,eAAe,EACf,GAAG,CACJ,CAAA;SACF;aAAM,IAAI,KAAK,IAAI,IAAI,EAAE;YACxB,MAAM,IAAI,+BAAgB,CACxB,UAAU,GAAG,qIAAqI,EAClJ,eAAe,EACf,GAAG,CACJ,CAAA;SACF;aAAM,IAAI,OAAO,KAAK,IAAI,QAAQ,EAAE;YACnC,MAAM,IAAI,+BAAgB,CACxB,UAAU,GAAG,oCAAoC,OAAO,KAAK,gGAAgG,EAC7J,eAAe,EACf,GAAG,CACJ,CAAA;SACF;IACH,CAAC,CAAC,CAAA;AACJ,CAAC;AA1BD,oCA0BC;AAED,SAAgB,eAAe,CAAC,cAAkC;IAChE,IAAI,CAAC,cAAc,EAAE;QACnB,OAAM;KACP;IAED,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACtD,IAAI,KAAK,YAAY,KAAK,EAAE;YAC1B,MAAM,IAAI,+BAAgB,CACxB,UAAU,GAAG,0GAA0G,EACvH,eAAe,EACf,GAAG,CACJ,CAAA;SACF;aAAM,IAAI,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,IAAI,QAAQ,EAAE;YACpD,MAAM,IAAI,+BAAgB,CACxB,UAAU,GAAG,oCAAoC,OAAO,KAAK,oEAAoE,EACjI,eAAe,EACf,GAAG,CACJ,CAAA;SACF;IACH,CAAC,CAAC,CAAA;AACJ,CAAC;AApBD,0CAoBC;AAGD,SAAgB,gBAAgB,CAAC,SAA6B;IAC5D,IAAI,CAAC,SAAS,EAAE;QACd,OAAO,SAAS,CAAA;KACjB;IAGD,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,EAAE;QACtB,OAAO,CAAC,SAAS,CAAA;KAClB;IAGD,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,IAAI,CAAA;AACrC,CAAC;AAZD,4CAYC"}
|
|
@@ -12,7 +12,6 @@ export declare const shipping: InputField;
|
|
|
12
12
|
export declare const transaction_id: InputField;
|
|
13
13
|
export declare const affiliation: InputField;
|
|
14
14
|
export declare const client_id: InputField;
|
|
15
|
-
export declare const app_instance_id: InputField;
|
|
16
15
|
export declare const currency: InputField;
|
|
17
16
|
export declare const value: InputField;
|
|
18
17
|
export declare const coupon: InputField;
|
|
@@ -22,4 +21,3 @@ export declare const items_single_products: InputField;
|
|
|
22
21
|
export declare const items_multi_products: InputField;
|
|
23
22
|
export declare const engagement_time_msec: InputField;
|
|
24
23
|
export declare const timestamp_micros: InputField;
|
|
25
|
-
export declare const data_stream_type: InputField;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const ga4_types_1 = require("./ga4-types");
|
|
3
|
+
exports.timestamp_micros = exports.engagement_time_msec = exports.items_multi_products = exports.items_single_products = exports.minimal_items = exports.payment_type = exports.coupon = exports.value = exports.currency = exports.client_id = exports.affiliation = exports.transaction_id = exports.shipping = exports.tax = exports.creative_name = exports.creative_slot = exports.promotion_name = exports.promotion_id = exports.user_id = exports.params = exports.user_properties = exports.formatUserProperties = void 0;
|
|
5
4
|
const formatUserProperties = (userProperties) => {
|
|
6
5
|
if (!userProperties) {
|
|
7
6
|
return undefined;
|
|
@@ -86,9 +85,9 @@ exports.affiliation = {
|
|
|
86
85
|
};
|
|
87
86
|
exports.client_id = {
|
|
88
87
|
label: 'Client ID',
|
|
89
|
-
description: 'Uniquely identifies a user instance of a web client.
|
|
88
|
+
description: 'Uniquely identifies a user instance of a web client.',
|
|
90
89
|
type: 'string',
|
|
91
|
-
required:
|
|
90
|
+
required: true,
|
|
92
91
|
default: {
|
|
93
92
|
'@if': {
|
|
94
93
|
exists: { '@path': '$.userId' },
|
|
@@ -97,12 +96,6 @@ exports.client_id = {
|
|
|
97
96
|
}
|
|
98
97
|
}
|
|
99
98
|
};
|
|
100
|
-
exports.app_instance_id = {
|
|
101
|
-
label: 'Firebase App Instance ID',
|
|
102
|
-
description: 'Uniquely identifies a specific installation of a Firebase app. This value needs to be retrieved through the Firebase SDK. **Required for mobile app streams.**',
|
|
103
|
-
type: 'string',
|
|
104
|
-
required: false
|
|
105
|
-
};
|
|
106
99
|
exports.currency = {
|
|
107
100
|
label: 'Currency',
|
|
108
101
|
type: 'string',
|
|
@@ -324,11 +317,4 @@ exports.timestamp_micros = {
|
|
|
324
317
|
'@path': '$.timestamp'
|
|
325
318
|
}
|
|
326
319
|
};
|
|
327
|
-
exports.data_stream_type = {
|
|
328
|
-
label: 'Data Stream Type',
|
|
329
|
-
type: 'string',
|
|
330
|
-
choices: [ga4_types_1.DataStreamType.Web, ga4_types_1.DataStreamType.MobileApp],
|
|
331
|
-
description: 'The type of data stream this data belongs in. This can either be a web stream or a mobile app stream (iOS or Android).',
|
|
332
|
-
default: ga4_types_1.DataStreamType.Web
|
|
333
|
-
};
|
|
334
320
|
//# sourceMappingURL=ga4-properties.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ga4-properties.js","sourceRoot":"","sources":["../../../src/destinations/google-analytics-4/ga4-properties.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ga4-properties.js","sourceRoot":"","sources":["../../../src/destinations/google-analytics-4/ga4-properties.ts"],"names":[],"mappings":";;;AAEO,MAAM,oBAAoB,GAAG,CAAC,cAAkC,EAAsB,EAAE;IAC7F,IAAI,CAAC,cAAc,EAAE;QACnB,OAAO,SAAS,CAAA;KACjB;IAED,IAAI,UAAU,GAAG,EAAE,CAAA;IAEnB,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACtD,UAAU,GAAG,EAAE,GAAG,UAAU,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,CAAA;IAChE,CAAC,CAAC,CAAA;IAEF,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,CAAA;AACxC,CAAC,CAAA;AAZY,QAAA,oBAAoB,wBAYhC;AAEY,QAAA,eAAe,GAAe;IACzC,KAAK,EAAE,iBAAiB;IAC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BACtB;aACF;SACF;KACF;CACF,CAAA;AACY,QAAA,oBAAoB,GAAe;IAC9C,GAAG,qBAAa;IAChB,OAAO,EAAE;QACP,YAAY,EAAE;YACZ,uBAAuB;YACvB;gBACE,OAAO,EAAE;oBACP,OAAO,EAAE,cAAc;iBACxB;gBACD,SAAS,EAAE;oBACT,OAAO,EAAE,QAAQ;iBAClB;gBACD,WAAW,EAAE;oBACX,OAAO,EAAE,eAAe;iBACzB;gBACD,MAAM,EAAE;oBACN,OAAO,EAAE,UAAU;iBACpB;gBACD,KAAK,EAAE;oBACL,OAAO,EAAE,YAAY;iBACtB;gBACD,UAAU,EAAE;oBACV,OAAO,EAAE,SAAS;iBACnB;gBACD,aAAa,EAAE;oBACb,OAAO,EAAE,YAAY;iBACtB;gBACD,YAAY,EAAE;oBACZ,OAAO,EAAE,WAAW;iBACrB;gBACD,KAAK,EAAE;oBACL,OAAO,EAAE,SAAS;iBACnB;gBACD,QAAQ,EAAE;oBACR,OAAO,EAAE,YAAY;iBACtB;aACF;SACF;KACF;CACF,CAAA;AAEY,QAAA,oBAAoB,GAAe;IAC9C,KAAK,EAAE,iCAAiC;IACxC,IAAI,EAAE,QAAQ;IACd,WAAW,EACT,+NAA+N;IACjO,OAAO,EAAE,CAAC;CACX,CAAA;AAEY,QAAA,gBAAgB,GAAe;IAC1C,KAAK,EAAE,iBAAiB;IACxB,IAAI,EAAE,QAAQ;IACd,WAAW,EACT,qNAAqN;IACvN,OAAO,EAAE;QACP,OAAO,EAAE,aAAa;KACvB;CACF,CAAA"}
|
|
@@ -25,17 +25,3 @@ export interface PromotionProductItem extends ProductItem {
|
|
|
25
25
|
promotion_id?: string;
|
|
26
26
|
promotion_name?: string;
|
|
27
27
|
}
|
|
28
|
-
export declare enum DataStreamType {
|
|
29
|
-
'Web' = "Web",
|
|
30
|
-
'MobileApp' = "Mobile App"
|
|
31
|
-
}
|
|
32
|
-
export interface DataStreamParams {
|
|
33
|
-
search_params: string;
|
|
34
|
-
identifier: {
|
|
35
|
-
app_instance_id: string;
|
|
36
|
-
client_id?: never;
|
|
37
|
-
} | {
|
|
38
|
-
client_id: string;
|
|
39
|
-
app_instance_id?: never;
|
|
40
|
-
};
|
|
41
|
-
}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DataStreamType = void 0;
|
|
4
|
-
var DataStreamType;
|
|
5
|
-
(function (DataStreamType) {
|
|
6
|
-
DataStreamType["Web"] = "Web";
|
|
7
|
-
DataStreamType["MobileApp"] = "Mobile App";
|
|
8
|
-
})(DataStreamType = exports.DataStreamType || (exports.DataStreamType = {}));
|
|
9
3
|
//# sourceMappingURL=ga4-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ga4-types.js","sourceRoot":"","sources":["../../../src/destinations/google-analytics-4/ga4-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ga4-types.js","sourceRoot":"","sources":["../../../src/destinations/google-analytics-4/ga4-types.ts"],"names":[],"mappings":""}
|