@segment/analytics-browser-actions-google-analytics-4 1.0.0 → 1.3.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/.eslintcache +1 -0
- package/dist/cjs/addPaymentInfo/generated-types.d.ts +34 -0
- package/dist/cjs/addPaymentInfo/generated-types.js +3 -0
- package/dist/cjs/addPaymentInfo/generated-types.js.map +1 -0
- package/dist/cjs/addPaymentInfo/index.d.ts +5 -0
- package/dist/cjs/addPaymentInfo/index.js +36 -0
- package/dist/cjs/addPaymentInfo/index.js.map +1 -0
- package/dist/cjs/addToCart/generated-types.d.ts +32 -0
- package/dist/cjs/addToCart/generated-types.js +3 -0
- package/dist/cjs/addToCart/generated-types.js.map +1 -0
- package/dist/cjs/addToCart/index.d.ts +5 -0
- package/dist/cjs/addToCart/index.js +32 -0
- package/dist/cjs/addToCart/index.js.map +1 -0
- package/dist/cjs/addToWishlist/generated-types.d.ts +32 -0
- package/dist/cjs/addToWishlist/generated-types.js +3 -0
- package/dist/cjs/addToWishlist/generated-types.js.map +1 -0
- package/dist/cjs/addToWishlist/index.d.ts +5 -0
- package/dist/cjs/addToWishlist/index.js +32 -0
- package/dist/cjs/addToWishlist/index.js.map +1 -0
- package/dist/cjs/beginCheckout/generated-types.d.ts +33 -0
- package/dist/cjs/beginCheckout/generated-types.js +3 -0
- package/dist/cjs/beginCheckout/generated-types.js.map +1 -0
- package/dist/cjs/beginCheckout/index.d.ts +5 -0
- package/dist/cjs/beginCheckout/index.js +34 -0
- package/dist/cjs/beginCheckout/index.js.map +1 -0
- package/dist/cjs/customEvent/generated-types.d.ts +11 -0
- package/dist/cjs/customEvent/generated-types.js +3 -0
- package/dist/cjs/customEvent/generated-types.js.map +1 -0
- package/dist/cjs/customEvent/index.d.ts +5 -0
- package/dist/cjs/customEvent/index.js +45 -0
- package/dist/cjs/customEvent/index.js.map +1 -0
- package/dist/cjs/ga4-functions.d.ts +1 -0
- package/dist/cjs/ga4-functions.js +13 -0
- package/dist/cjs/ga4-functions.js.map +1 -0
- package/dist/cjs/ga4-properties.d.ts +26 -0
- package/dist/cjs/ga4-properties.js +346 -0
- package/dist/cjs/ga4-properties.js.map +1 -0
- package/dist/cjs/ga4-types.d.ts +27 -0
- package/dist/cjs/ga4-types.js +3 -0
- package/dist/cjs/ga4-types.js.map +1 -0
- package/dist/cjs/generateLead/generated-types.d.ts +11 -0
- package/dist/cjs/generateLead/generated-types.js +3 -0
- package/dist/cjs/generateLead/generated-types.js.map +1 -0
- package/dist/cjs/generateLead/index.d.ts +5 -0
- package/dist/cjs/generateLead/index.js +27 -0
- package/dist/cjs/generateLead/index.js.map +1 -0
- package/dist/cjs/generated-types.d.ts +15 -0
- package/dist/cjs/generated-types.js +3 -0
- package/dist/cjs/generated-types.js.map +1 -0
- package/dist/cjs/index.d.ts +11 -0
- package/dist/cjs/index.js +177 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/login/generated-types.d.ts +10 -0
- package/dist/cjs/login/generated-types.js +3 -0
- package/dist/cjs/login/generated-types.js.map +1 -0
- package/dist/cjs/login/index.d.ts +5 -0
- package/dist/cjs/login/index.js +25 -0
- package/dist/cjs/login/index.js.map +1 -0
- package/dist/cjs/purchase/generated-types.d.ts +36 -0
- package/dist/cjs/purchase/generated-types.js +3 -0
- package/dist/cjs/purchase/generated-types.js.map +1 -0
- package/dist/cjs/purchase/index.d.ts +5 -0
- package/dist/cjs/purchase/index.js +40 -0
- package/dist/cjs/purchase/index.js.map +1 -0
- package/dist/cjs/refund/generated-types.d.ts +37 -0
- package/dist/cjs/refund/generated-types.js +3 -0
- package/dist/cjs/refund/generated-types.js.map +1 -0
- package/dist/cjs/refund/index.d.ts +5 -0
- package/dist/cjs/refund/index.js +41 -0
- package/dist/cjs/refund/index.js.map +1 -0
- package/dist/cjs/removeFromCart/generated-types.d.ts +32 -0
- package/dist/cjs/removeFromCart/generated-types.js +3 -0
- package/dist/cjs/removeFromCart/generated-types.js.map +1 -0
- package/dist/cjs/removeFromCart/index.d.ts +5 -0
- package/dist/cjs/removeFromCart/index.js +32 -0
- package/dist/cjs/removeFromCart/index.js.map +1 -0
- package/dist/cjs/search/generated-types.d.ts +10 -0
- package/dist/cjs/search/generated-types.js +3 -0
- package/dist/cjs/search/generated-types.js.map +1 -0
- package/dist/cjs/search/index.d.ts +5 -0
- package/dist/cjs/search/index.js +25 -0
- package/dist/cjs/search/index.js.map +1 -0
- package/dist/cjs/selectItem/generated-types.d.ts +32 -0
- package/dist/cjs/selectItem/generated-types.js +3 -0
- package/dist/cjs/selectItem/generated-types.js.map +1 -0
- package/dist/cjs/selectItem/index.d.ts +5 -0
- package/dist/cjs/selectItem/index.js +32 -0
- package/dist/cjs/selectItem/index.js.map +1 -0
- package/dist/cjs/selectPromotion/generated-types.d.ts +39 -0
- package/dist/cjs/selectPromotion/generated-types.js +3 -0
- package/dist/cjs/selectPromotion/generated-types.js.map +1 -0
- package/dist/cjs/selectPromotion/index.d.ts +5 -0
- package/dist/cjs/selectPromotion/index.js +52 -0
- package/dist/cjs/selectPromotion/index.js.map +1 -0
- package/dist/cjs/setConfigurationFields/generated-types.d.ts +20 -0
- package/dist/cjs/setConfigurationFields/generated-types.js +3 -0
- package/dist/cjs/setConfigurationFields/generated-types.js.map +1 -0
- package/dist/cjs/setConfigurationFields/index.d.ts +5 -0
- package/dist/cjs/setConfigurationFields/index.js +132 -0
- package/dist/cjs/setConfigurationFields/index.js.map +1 -0
- package/dist/cjs/signUp/generated-types.d.ts +10 -0
- package/dist/cjs/signUp/generated-types.js +3 -0
- package/dist/cjs/signUp/generated-types.js.map +1 -0
- package/dist/cjs/signUp/index.d.ts +5 -0
- package/dist/cjs/signUp/index.js +25 -0
- package/dist/cjs/signUp/index.js.map +1 -0
- package/dist/cjs/types.d.ts +3 -0
- package/dist/cjs/types.js +3 -0
- package/dist/cjs/types.js.map +1 -0
- package/dist/cjs/viewCart/generated-types.d.ts +32 -0
- package/dist/cjs/viewCart/generated-types.js +3 -0
- package/dist/cjs/viewCart/generated-types.js.map +1 -0
- package/dist/cjs/viewCart/index.d.ts +5 -0
- package/dist/cjs/viewCart/index.js +32 -0
- package/dist/cjs/viewCart/index.js.map +1 -0
- package/dist/cjs/viewItem/generated-types.d.ts +32 -0
- package/dist/cjs/viewItem/generated-types.js +3 -0
- package/dist/cjs/viewItem/generated-types.js.map +1 -0
- package/dist/cjs/viewItem/index.d.ts +5 -0
- package/dist/cjs/viewItem/index.js +32 -0
- package/dist/cjs/viewItem/index.js.map +1 -0
- package/dist/cjs/viewItemList/generated-types.d.ts +32 -0
- package/dist/cjs/viewItemList/generated-types.js +3 -0
- package/dist/cjs/viewItemList/generated-types.js.map +1 -0
- package/dist/cjs/viewItemList/index.d.ts +5 -0
- package/dist/cjs/viewItemList/index.js +32 -0
- package/dist/cjs/viewItemList/index.js.map +1 -0
- package/dist/cjs/viewPromotion/generated-types.d.ts +39 -0
- package/dist/cjs/viewPromotion/generated-types.js +3 -0
- package/dist/cjs/viewPromotion/generated-types.js.map +1 -0
- package/dist/cjs/viewPromotion/index.d.ts +5 -0
- package/dist/cjs/viewPromotion/index.js +53 -0
- package/dist/cjs/viewPromotion/index.js.map +1 -0
- package/dist/esm/addPaymentInfo/generated-types.d.ts +34 -0
- package/dist/esm/addPaymentInfo/generated-types.js +2 -0
- package/dist/esm/addPaymentInfo/generated-types.js.map +1 -0
- package/dist/esm/addPaymentInfo/index.d.ts +5 -0
- package/dist/esm/addPaymentInfo/index.js +34 -0
- package/dist/esm/addPaymentInfo/index.js.map +1 -0
- package/dist/esm/addToCart/generated-types.d.ts +32 -0
- package/dist/esm/addToCart/generated-types.js +2 -0
- package/dist/esm/addToCart/generated-types.js.map +1 -0
- package/dist/esm/addToCart/index.d.ts +5 -0
- package/dist/esm/addToCart/index.js +30 -0
- package/dist/esm/addToCart/index.js.map +1 -0
- package/dist/esm/addToWishlist/generated-types.d.ts +32 -0
- package/dist/esm/addToWishlist/generated-types.js +2 -0
- package/dist/esm/addToWishlist/generated-types.js.map +1 -0
- package/dist/esm/addToWishlist/index.d.ts +5 -0
- package/dist/esm/addToWishlist/index.js +30 -0
- package/dist/esm/addToWishlist/index.js.map +1 -0
- package/dist/esm/beginCheckout/generated-types.d.ts +33 -0
- package/dist/esm/beginCheckout/generated-types.js +2 -0
- package/dist/esm/beginCheckout/generated-types.js.map +1 -0
- package/dist/esm/beginCheckout/index.d.ts +5 -0
- package/dist/esm/beginCheckout/index.js +32 -0
- package/dist/esm/beginCheckout/index.js.map +1 -0
- package/dist/esm/customEvent/generated-types.d.ts +11 -0
- package/dist/esm/customEvent/generated-types.js +2 -0
- package/dist/esm/customEvent/generated-types.js.map +1 -0
- package/dist/esm/customEvent/index.d.ts +5 -0
- package/dist/esm/customEvent/index.js +43 -0
- package/dist/esm/customEvent/index.js.map +1 -0
- package/dist/esm/ga4-functions.d.ts +1 -0
- package/dist/esm/ga4-functions.js +9 -0
- package/dist/esm/ga4-functions.js.map +1 -0
- package/dist/esm/ga4-properties.d.ts +26 -0
- package/dist/esm/ga4-properties.js +342 -0
- package/dist/esm/ga4-properties.js.map +1 -0
- package/dist/esm/ga4-types.d.ts +27 -0
- package/dist/esm/ga4-types.js +2 -0
- package/dist/esm/ga4-types.js.map +1 -0
- package/dist/esm/generateLead/generated-types.d.ts +11 -0
- package/dist/esm/generateLead/generated-types.js +2 -0
- package/dist/esm/generateLead/generated-types.js.map +1 -0
- package/dist/esm/generateLead/index.d.ts +5 -0
- package/dist/esm/generateLead/index.js +25 -0
- package/dist/esm/generateLead/index.js.map +1 -0
- package/dist/esm/generated-types.d.ts +15 -0
- package/dist/esm/generated-types.js +2 -0
- package/dist/esm/generated-types.js.map +1 -0
- package/dist/esm/index.d.ts +11 -0
- package/dist/esm/index.js +173 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/login/generated-types.d.ts +10 -0
- package/dist/esm/login/generated-types.js +2 -0
- package/dist/esm/login/generated-types.js.map +1 -0
- package/dist/esm/login/index.d.ts +5 -0
- package/dist/esm/login/index.js +23 -0
- package/dist/esm/login/index.js.map +1 -0
- package/dist/esm/purchase/generated-types.d.ts +36 -0
- package/dist/esm/purchase/generated-types.js +2 -0
- package/dist/esm/purchase/generated-types.js.map +1 -0
- package/dist/esm/purchase/index.d.ts +5 -0
- package/dist/esm/purchase/index.js +38 -0
- package/dist/esm/purchase/index.js.map +1 -0
- package/dist/esm/refund/generated-types.d.ts +37 -0
- package/dist/esm/refund/generated-types.js +2 -0
- package/dist/esm/refund/generated-types.js.map +1 -0
- package/dist/esm/refund/index.d.ts +5 -0
- package/dist/esm/refund/index.js +39 -0
- package/dist/esm/refund/index.js.map +1 -0
- package/dist/esm/removeFromCart/generated-types.d.ts +32 -0
- package/dist/esm/removeFromCart/generated-types.js +2 -0
- package/dist/esm/removeFromCart/generated-types.js.map +1 -0
- package/dist/esm/removeFromCart/index.d.ts +5 -0
- package/dist/esm/removeFromCart/index.js +30 -0
- package/dist/esm/removeFromCart/index.js.map +1 -0
- package/dist/esm/search/generated-types.d.ts +10 -0
- package/dist/esm/search/generated-types.js +2 -0
- package/dist/esm/search/generated-types.js.map +1 -0
- package/dist/esm/search/index.d.ts +5 -0
- package/dist/esm/search/index.js +23 -0
- package/dist/esm/search/index.js.map +1 -0
- package/dist/esm/selectItem/generated-types.d.ts +32 -0
- package/dist/esm/selectItem/generated-types.js +2 -0
- package/dist/esm/selectItem/generated-types.js.map +1 -0
- package/dist/esm/selectItem/index.d.ts +5 -0
- package/dist/esm/selectItem/index.js +30 -0
- package/dist/esm/selectItem/index.js.map +1 -0
- package/dist/esm/selectPromotion/generated-types.d.ts +39 -0
- package/dist/esm/selectPromotion/generated-types.js +2 -0
- package/dist/esm/selectPromotion/generated-types.js.map +1 -0
- package/dist/esm/selectPromotion/index.d.ts +5 -0
- package/dist/esm/selectPromotion/index.js +50 -0
- package/dist/esm/selectPromotion/index.js.map +1 -0
- package/dist/esm/setConfigurationFields/generated-types.d.ts +20 -0
- package/dist/esm/setConfigurationFields/generated-types.js +2 -0
- package/dist/esm/setConfigurationFields/generated-types.js.map +1 -0
- package/dist/esm/setConfigurationFields/index.d.ts +5 -0
- package/dist/esm/setConfigurationFields/index.js +130 -0
- package/dist/esm/setConfigurationFields/index.js.map +1 -0
- package/dist/esm/signUp/generated-types.d.ts +10 -0
- package/dist/esm/signUp/generated-types.js +2 -0
- package/dist/esm/signUp/generated-types.js.map +1 -0
- package/dist/esm/signUp/index.d.ts +5 -0
- package/dist/esm/signUp/index.js +23 -0
- package/dist/esm/signUp/index.js.map +1 -0
- package/dist/esm/types.d.ts +3 -0
- package/dist/esm/types.js +2 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/esm/viewCart/generated-types.d.ts +32 -0
- package/dist/esm/viewCart/generated-types.js +2 -0
- package/dist/esm/viewCart/generated-types.js.map +1 -0
- package/dist/esm/viewCart/index.d.ts +5 -0
- package/dist/esm/viewCart/index.js +30 -0
- package/dist/esm/viewCart/index.js.map +1 -0
- package/dist/esm/viewItem/generated-types.d.ts +32 -0
- package/dist/esm/viewItem/generated-types.js +2 -0
- package/dist/esm/viewItem/generated-types.js.map +1 -0
- package/dist/esm/viewItem/index.d.ts +5 -0
- package/dist/esm/viewItem/index.js +30 -0
- package/dist/esm/viewItem/index.js.map +1 -0
- package/dist/esm/viewItemList/generated-types.d.ts +32 -0
- package/dist/esm/viewItemList/generated-types.js +2 -0
- package/dist/esm/viewItemList/generated-types.js.map +1 -0
- package/dist/esm/viewItemList/index.d.ts +5 -0
- package/dist/esm/viewItemList/index.js +30 -0
- package/dist/esm/viewItemList/index.js.map +1 -0
- package/dist/esm/viewPromotion/generated-types.d.ts +39 -0
- package/dist/esm/viewPromotion/generated-types.js +2 -0
- package/dist/esm/viewPromotion/generated-types.js.map +1 -0
- package/dist/esm/viewPromotion/index.d.ts +5 -0
- package/dist/esm/viewPromotion/index.js +51 -0
- package/dist/esm/viewPromotion/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +5 -4
package/.eslintcache
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"/home/kaari/action-destinations/packages/browser-destinations/destinations/google-analytics-4-web/src/ga4-functions.ts":"1","/home/kaari/action-destinations/packages/browser-destinations/destinations/google-analytics-4-web/src/ga4-properties.ts":"2","/home/kaari/action-destinations/packages/browser-destinations/destinations/google-analytics-4-web/src/ga4-types.ts":"3","/home/kaari/action-destinations/packages/browser-destinations/destinations/google-analytics-4-web/src/generated-types.ts":"4","/home/kaari/action-destinations/packages/browser-destinations/destinations/google-analytics-4-web/src/index.ts":"5","/home/kaari/action-destinations/packages/browser-destinations/destinations/google-analytics-4-web/src/types.ts":"6"},{"size":240,"mtime":1686339431100,"results":"7","hashOfConfig":"8"},{"size":9301,"mtime":1686355841478,"results":"9","hashOfConfig":"8"},{"size":619,"mtime":1686339431100,"results":"10","hashOfConfig":"8"},{"size":2816,"mtime":1686339431100,"results":"11","hashOfConfig":"8"},{"size":7321,"mtime":1687379734569,"results":"12","hashOfConfig":"8"},{"size":38,"mtime":1686339431100,"results":"13","hashOfConfig":"8"},{"filePath":"14","messages":"15","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"mgubta",{"filePath":"16","messages":"17","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"18","messages":"19","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"20","messages":"21","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"22","messages":"23","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"24","messages":"25","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/home/kaari/action-destinations/packages/browser-destinations/destinations/google-analytics-4-web/src/ga4-functions.ts",[],"/home/kaari/action-destinations/packages/browser-destinations/destinations/google-analytics-4-web/src/ga4-properties.ts",[],"/home/kaari/action-destinations/packages/browser-destinations/destinations/google-analytics-4-web/src/ga4-types.ts",[],"/home/kaari/action-destinations/packages/browser-destinations/destinations/google-analytics-4-web/src/generated-types.ts",[],"/home/kaari/action-destinations/packages/browser-destinations/destinations/google-analytics-4-web/src/index.ts",["26","27"],"/home/kaari/action-destinations/packages/browser-destinations/destinations/google-analytics-4-web/src/types.ts",[],{"ruleId":"28","severity":1,"message":"29","line":29,"column":16,"nodeType":"30","messageId":"31","endLine":29,"endColumn":19,"suggestions":"32"},{"ruleId":"33","severity":1,"message":"34","line":154,"column":7,"nodeType":"35","messageId":"36","endLine":154,"endColumn":28},"@typescript-eslint/no-explicit-any","Unexpected any. Specify a different type.","TSAnyKeyword","unexpectedAny",["37","38"],"@typescript-eslint/no-unsafe-call","Unsafe call of an `any` typed value.","MemberExpression","unsafeCall",{"messageId":"39","fix":"40","desc":"41"},{"messageId":"42","fix":"43","desc":"44"},"suggestUnknown",{"range":"45","text":"46"},"Use `unknown` instead, this will force you to explicitly, and safely assert the type is correct.","suggestNever",{"range":"45","text":"47"},"Use `never` instead, this is useful when instantiating generic type parameters that you don't need to know the type of.",[1127,1130],"unknown","never"]
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
user_id?: string;
|
|
3
|
+
currency?: string;
|
|
4
|
+
value?: number;
|
|
5
|
+
coupon?: string;
|
|
6
|
+
payment_type?: string;
|
|
7
|
+
items: {
|
|
8
|
+
item_id?: string;
|
|
9
|
+
item_name?: string;
|
|
10
|
+
affiliation?: string;
|
|
11
|
+
coupon?: string;
|
|
12
|
+
currency?: string;
|
|
13
|
+
discount?: number;
|
|
14
|
+
index?: number;
|
|
15
|
+
item_brand?: string;
|
|
16
|
+
item_category?: string;
|
|
17
|
+
item_category2?: string;
|
|
18
|
+
item_category3?: string;
|
|
19
|
+
item_category4?: string;
|
|
20
|
+
item_category5?: string;
|
|
21
|
+
item_list_id?: string;
|
|
22
|
+
item_list_name?: string;
|
|
23
|
+
item_variant?: string;
|
|
24
|
+
location_id?: string;
|
|
25
|
+
price?: number;
|
|
26
|
+
quantity?: number;
|
|
27
|
+
}[];
|
|
28
|
+
user_properties?: {
|
|
29
|
+
[k: string]: unknown;
|
|
30
|
+
};
|
|
31
|
+
params?: {
|
|
32
|
+
[k: string]: unknown;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/addPaymentInfo/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { BrowserActionDefinition } from '@segment/browser-destination-runtime/types';
|
|
2
|
+
import type { Settings } from '../generated-types';
|
|
3
|
+
import type { Payload } from './generated-types';
|
|
4
|
+
declare const action: BrowserActionDefinition<Settings, Function, Payload>;
|
|
5
|
+
export default action;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const ga4_functions_1 = require("../ga4-functions");
|
|
4
|
+
const ga4_properties_1 = require("../ga4-properties");
|
|
5
|
+
const action = {
|
|
6
|
+
title: 'Add Payment Info',
|
|
7
|
+
description: 'Send event when a user submits their payment information',
|
|
8
|
+
defaultSubscription: 'type = "track" and event = "Payment Info Entered"',
|
|
9
|
+
platform: 'web',
|
|
10
|
+
fields: {
|
|
11
|
+
user_id: { ...ga4_properties_1.user_id },
|
|
12
|
+
currency: { ...ga4_properties_1.currency },
|
|
13
|
+
value: { ...ga4_properties_1.value },
|
|
14
|
+
coupon: { ...ga4_properties_1.coupon },
|
|
15
|
+
payment_type: { ...ga4_properties_1.payment_type },
|
|
16
|
+
items: {
|
|
17
|
+
...ga4_properties_1.items_multi_products,
|
|
18
|
+
required: true
|
|
19
|
+
},
|
|
20
|
+
user_properties: ga4_properties_1.user_properties,
|
|
21
|
+
params: ga4_properties_1.params
|
|
22
|
+
},
|
|
23
|
+
perform: (gtag, { payload }) => {
|
|
24
|
+
ga4_functions_1.updateUser(payload.user_id, payload.user_properties, gtag);
|
|
25
|
+
gtag('event', 'add_payment_info', {
|
|
26
|
+
currency: payload.currency,
|
|
27
|
+
value: payload.value,
|
|
28
|
+
coupon: payload.coupon,
|
|
29
|
+
payment_type: payload.payment_type,
|
|
30
|
+
items: payload.items,
|
|
31
|
+
...payload.params
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
exports.default = action;
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/addPaymentInfo/index.ts"],"names":[],"mappings":";;AAGA,oDAA6C;AAC7C,sDAS0B;AAG1B,MAAM,MAAM,GAAyD;IACnE,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,0DAA0D;IACvE,mBAAmB,EAAE,mDAAmD;IACxE,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,GAAG,wBAAO,EAAE;QACvB,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,MAAM,EAAE,uBAAM;KACf;IACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAC7B,0BAAU,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,EAAE,IAAI,CAAC,CAAA;QAC1D,IAAI,CAAC,OAAO,EAAE,kBAAkB,EAAE;YAChC,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,YAAY,EAAE,OAAO,CAAC,YAAY;YAClC,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,GAAG,OAAO,CAAC,MAAM;SAClB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
user_id?: string;
|
|
3
|
+
currency?: string;
|
|
4
|
+
items: {
|
|
5
|
+
item_id?: string;
|
|
6
|
+
item_name?: string;
|
|
7
|
+
affiliation?: string;
|
|
8
|
+
coupon?: string;
|
|
9
|
+
currency?: string;
|
|
10
|
+
discount?: number;
|
|
11
|
+
index?: number;
|
|
12
|
+
item_brand?: string;
|
|
13
|
+
item_category?: string;
|
|
14
|
+
item_category2?: string;
|
|
15
|
+
item_category3?: string;
|
|
16
|
+
item_category4?: string;
|
|
17
|
+
item_category5?: string;
|
|
18
|
+
item_list_id?: string;
|
|
19
|
+
item_list_name?: string;
|
|
20
|
+
item_variant?: string;
|
|
21
|
+
location_id?: string;
|
|
22
|
+
price?: number;
|
|
23
|
+
quantity?: number;
|
|
24
|
+
}[];
|
|
25
|
+
value?: number;
|
|
26
|
+
user_properties?: {
|
|
27
|
+
[k: string]: unknown;
|
|
28
|
+
};
|
|
29
|
+
params?: {
|
|
30
|
+
[k: string]: unknown;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/addToCart/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { BrowserActionDefinition } from '@segment/browser-destination-runtime/types';
|
|
2
|
+
import type { Settings } from '../generated-types';
|
|
3
|
+
import type { Payload } from './generated-types';
|
|
4
|
+
declare const action: BrowserActionDefinition<Settings, Function, Payload>;
|
|
5
|
+
export default action;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const ga4_functions_1 = require("../ga4-functions");
|
|
4
|
+
const ga4_properties_1 = require("../ga4-properties");
|
|
5
|
+
const action = {
|
|
6
|
+
title: 'Add to Cart',
|
|
7
|
+
description: 'This event signifies that an item was added to a cart for purchase.',
|
|
8
|
+
defaultSubscription: 'type = "track" and event = "Product Added"',
|
|
9
|
+
platform: 'web',
|
|
10
|
+
fields: {
|
|
11
|
+
user_id: ga4_properties_1.user_id,
|
|
12
|
+
currency: ga4_properties_1.currency,
|
|
13
|
+
items: {
|
|
14
|
+
...ga4_properties_1.items_single_products,
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
value: ga4_properties_1.value,
|
|
18
|
+
user_properties: ga4_properties_1.user_properties,
|
|
19
|
+
params: ga4_properties_1.params
|
|
20
|
+
},
|
|
21
|
+
perform: (gtag, { payload }) => {
|
|
22
|
+
ga4_functions_1.updateUser(payload.user_id, payload.user_properties, gtag);
|
|
23
|
+
gtag('event', 'add_to_cart', {
|
|
24
|
+
currency: payload.currency,
|
|
25
|
+
value: payload.value,
|
|
26
|
+
items: payload.items,
|
|
27
|
+
...payload.params
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
exports.default = action;
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/addToCart/index.ts"],"names":[],"mappings":";;AAGA,oDAA6C;AAE7C,sDAA4G;AAE5G,MAAM,MAAM,GAAyD;IACnE,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,qEAAqE;IAClF,mBAAmB,EAAE,4CAA4C;IACjE,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE;QACN,OAAO,EAAE,wBAAO;QAChB,QAAQ,EAAE,yBAAQ;QAClB,KAAK,EAAE;YACL,GAAG,sCAAqB;YACxB,QAAQ,EAAE,IAAI;SACf;QACD,KAAK,EAAE,sBAAK;QACZ,eAAe,EAAE,gCAAe;QAChC,MAAM,EAAE,uBAAM;KACf;IACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAC7B,0BAAU,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,EAAE,IAAI,CAAC,CAAA;QAE1D,IAAI,CAAC,OAAO,EAAE,aAAa,EAAE;YAC3B,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,GAAG,OAAO,CAAC,MAAM;SAClB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
user_id?: string;
|
|
3
|
+
currency?: string;
|
|
4
|
+
value?: number;
|
|
5
|
+
items: {
|
|
6
|
+
item_id?: string;
|
|
7
|
+
item_name?: string;
|
|
8
|
+
affiliation?: string;
|
|
9
|
+
coupon?: string;
|
|
10
|
+
currency?: string;
|
|
11
|
+
discount?: number;
|
|
12
|
+
index?: number;
|
|
13
|
+
item_brand?: string;
|
|
14
|
+
item_category?: string;
|
|
15
|
+
item_category2?: string;
|
|
16
|
+
item_category3?: string;
|
|
17
|
+
item_category4?: string;
|
|
18
|
+
item_category5?: string;
|
|
19
|
+
item_list_id?: string;
|
|
20
|
+
item_list_name?: string;
|
|
21
|
+
item_variant?: string;
|
|
22
|
+
location_id?: string;
|
|
23
|
+
price?: number;
|
|
24
|
+
quantity?: number;
|
|
25
|
+
}[];
|
|
26
|
+
user_properties?: {
|
|
27
|
+
[k: string]: unknown;
|
|
28
|
+
};
|
|
29
|
+
params?: {
|
|
30
|
+
[k: string]: unknown;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/addToWishlist/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { BrowserActionDefinition } from '@segment/browser-destination-runtime/types';
|
|
2
|
+
import type { Settings } from '../generated-types';
|
|
3
|
+
import type { Payload } from './generated-types';
|
|
4
|
+
declare const action: BrowserActionDefinition<Settings, Function, Payload>;
|
|
5
|
+
export default action;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const ga4_properties_1 = require("../ga4-properties");
|
|
4
|
+
const ga4_functions_1 = require("../ga4-functions");
|
|
5
|
+
const action = {
|
|
6
|
+
title: 'Add to Wishlist',
|
|
7
|
+
description: 'The event signifies that an item was added to a wishlist. Use this event to identify popular gift items in your app.',
|
|
8
|
+
platform: 'web',
|
|
9
|
+
defaultSubscription: 'type = "track" and event = "Product Added to Wishlist"',
|
|
10
|
+
fields: {
|
|
11
|
+
user_id: ga4_properties_1.user_id,
|
|
12
|
+
currency: ga4_properties_1.currency,
|
|
13
|
+
value: ga4_properties_1.value,
|
|
14
|
+
items: {
|
|
15
|
+
...ga4_properties_1.items_single_products,
|
|
16
|
+
required: true
|
|
17
|
+
},
|
|
18
|
+
user_properties: ga4_properties_1.user_properties,
|
|
19
|
+
params: ga4_properties_1.params
|
|
20
|
+
},
|
|
21
|
+
perform: (gtag, { payload }) => {
|
|
22
|
+
ga4_functions_1.updateUser(payload.user_id, payload.user_properties, gtag);
|
|
23
|
+
gtag('event', 'add_to_wishlist', {
|
|
24
|
+
currency: payload.currency,
|
|
25
|
+
value: payload.value,
|
|
26
|
+
items: payload.items,
|
|
27
|
+
...payload.params
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
exports.default = action;
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/addToWishlist/index.ts"],"names":[],"mappings":";;AAIA,sDAA4G;AAC5G,oDAA6C;AAG7C,MAAM,MAAM,GAAyD;IACnE,KAAK,EAAE,iBAAiB;IACxB,WAAW,EACT,sHAAsH;IACxH,QAAQ,EAAE,KAAK;IACf,mBAAmB,EAAE,wDAAwD;IAC7E,MAAM,EAAE;QACN,OAAO,EAAE,wBAAO;QAChB,QAAQ,EAAE,yBAAQ;QAClB,KAAK,EAAE,sBAAK;QACZ,KAAK,EAAE;YACL,GAAG,sCAAqB;YACxB,QAAQ,EAAE,IAAI;SACf;QACD,eAAe,EAAE,gCAAe;QAChC,MAAM,EAAE,uBAAM;KACf;IACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAC7B,0BAAU,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,EAAE,IAAI,CAAC,CAAA;QAE1D,IAAI,CAAC,OAAO,EAAE,iBAAiB,EAAE;YAC/B,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,GAAG,OAAO,CAAC,MAAM;SAClB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
user_id?: string;
|
|
3
|
+
coupon?: string;
|
|
4
|
+
currency?: string;
|
|
5
|
+
items: {
|
|
6
|
+
item_id?: string;
|
|
7
|
+
item_name?: string;
|
|
8
|
+
affiliation?: string;
|
|
9
|
+
coupon?: string;
|
|
10
|
+
currency?: string;
|
|
11
|
+
discount?: number;
|
|
12
|
+
index?: number;
|
|
13
|
+
item_brand?: string;
|
|
14
|
+
item_category?: string;
|
|
15
|
+
item_category2?: string;
|
|
16
|
+
item_category3?: string;
|
|
17
|
+
item_category4?: string;
|
|
18
|
+
item_category5?: string;
|
|
19
|
+
item_list_id?: string;
|
|
20
|
+
item_list_name?: string;
|
|
21
|
+
item_variant?: string;
|
|
22
|
+
location_id?: string;
|
|
23
|
+
price?: number;
|
|
24
|
+
quantity?: number;
|
|
25
|
+
}[];
|
|
26
|
+
value?: number;
|
|
27
|
+
params?: {
|
|
28
|
+
[k: string]: unknown;
|
|
29
|
+
};
|
|
30
|
+
user_properties?: {
|
|
31
|
+
[k: string]: unknown;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/beginCheckout/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { BrowserActionDefinition } from '@segment/browser-destination-runtime/types';
|
|
2
|
+
import type { Settings } from '../generated-types';
|
|
3
|
+
import type { Payload } from './generated-types';
|
|
4
|
+
declare const action: BrowserActionDefinition<Settings, Function, Payload>;
|
|
5
|
+
export default action;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const ga4_properties_1 = require("../ga4-properties");
|
|
4
|
+
const ga4_functions_1 = require("../ga4-functions");
|
|
5
|
+
const action = {
|
|
6
|
+
title: 'Begin Checkout',
|
|
7
|
+
description: 'This event signifies that a user has begun a checkout.',
|
|
8
|
+
defaultSubscription: 'type = "track" and event = "Checkout Started"',
|
|
9
|
+
platform: 'web',
|
|
10
|
+
fields: {
|
|
11
|
+
user_id: ga4_properties_1.user_id,
|
|
12
|
+
coupon: { ...ga4_properties_1.coupon, default: { '@path': '$.properties.coupon' } },
|
|
13
|
+
currency: ga4_properties_1.currency,
|
|
14
|
+
items: {
|
|
15
|
+
...ga4_properties_1.items_multi_products,
|
|
16
|
+
required: true
|
|
17
|
+
},
|
|
18
|
+
value: ga4_properties_1.value,
|
|
19
|
+
params: ga4_properties_1.params,
|
|
20
|
+
user_properties: ga4_properties_1.user_properties
|
|
21
|
+
},
|
|
22
|
+
perform: (gtag, { payload }) => {
|
|
23
|
+
ga4_functions_1.updateUser(payload.user_id, payload.user_properties, gtag);
|
|
24
|
+
gtag('event', 'begin_checkout', {
|
|
25
|
+
currency: payload.currency,
|
|
26
|
+
value: payload.value,
|
|
27
|
+
coupon: payload.coupon,
|
|
28
|
+
items: payload.items,
|
|
29
|
+
...payload.params
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.default = action;
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/beginCheckout/index.ts"],"names":[],"mappings":";;AAIA,sDAAmH;AACnH,oDAA6C;AAE7C,MAAM,MAAM,GAAyD;IACnE,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,wDAAwD;IACrE,mBAAmB,EAAE,+CAA+C;IACpE,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE;QACN,OAAO,EAAE,wBAAO;QAChB,MAAM,EAAE,EAAE,GAAG,uBAAM,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE,EAAE;QAClE,QAAQ,EAAE,yBAAQ;QAClB,KAAK,EAAE;YACL,GAAG,qCAAoB;YACvB,QAAQ,EAAE,IAAI;SACf;QACD,KAAK,EAAE,sBAAK;QACZ,MAAM,EAAE,uBAAM;QACd,eAAe,EAAE,gCAAe;KACjC;IACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAC7B,0BAAU,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,EAAE,IAAI,CAAC,CAAA;QAE1D,IAAI,CAAC,OAAO,EAAE,gBAAgB,EAAE;YAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,GAAG,OAAO,CAAC,MAAM;SAClB,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/customEvent/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { BrowserActionDefinition } from '@segment/browser-destination-runtime/types';
|
|
2
|
+
import type { Settings } from '../generated-types';
|
|
3
|
+
import type { Payload } from './generated-types';
|
|
4
|
+
declare const action: BrowserActionDefinition<Settings, Function, Payload>;
|
|
5
|
+
export default action;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const ga4_properties_1 = require("../ga4-properties");
|
|
4
|
+
const ga4_functions_1 = require("../ga4-functions");
|
|
5
|
+
const normalizeEventName = (name, lowercase) => {
|
|
6
|
+
name = name.trim();
|
|
7
|
+
name = name.replace(/\s/g, '_');
|
|
8
|
+
if (lowercase) {
|
|
9
|
+
name = name.toLowerCase();
|
|
10
|
+
}
|
|
11
|
+
return name;
|
|
12
|
+
};
|
|
13
|
+
const action = {
|
|
14
|
+
title: 'Custom Event',
|
|
15
|
+
description: 'Send any custom event',
|
|
16
|
+
defaultSubscription: 'type = "track"',
|
|
17
|
+
platform: 'web',
|
|
18
|
+
fields: {
|
|
19
|
+
name: {
|
|
20
|
+
label: 'Event Name',
|
|
21
|
+
description: 'The unique name of the custom event created in GA4. GA4 does not accept spaces in event names so Segment will replace any spaces with underscores. More information about GA4 event name rules is available in [their docs](https://support.google.com/analytics/answer/10085872?hl=en&ref_topic=9756175#event-name-rules&zippy=%2Cin-this-article.%2Cin-this-article).',
|
|
22
|
+
type: 'string',
|
|
23
|
+
required: true,
|
|
24
|
+
default: {
|
|
25
|
+
'@path': '$.event'
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
lowercase: {
|
|
29
|
+
label: 'Lowercase Event Name',
|
|
30
|
+
description: 'If true, the event name will be converted to lowercase before sending to Google. Event names are case sensitive in GA4 so enable this setting to avoid distinct events for casing differences. More information about GA4 event name rules is available in [their docs](https://support.google.com/analytics/answer/10085872?hl=en&ref_topic=9756175#event-name-rules&zippy=%2Cin-this-article.%2Cin-this-article).',
|
|
31
|
+
type: 'boolean',
|
|
32
|
+
default: false
|
|
33
|
+
},
|
|
34
|
+
user_id: { ...ga4_properties_1.user_id },
|
|
35
|
+
user_properties: ga4_properties_1.user_properties,
|
|
36
|
+
params: ga4_properties_1.params
|
|
37
|
+
},
|
|
38
|
+
perform: (gtag, { payload }) => {
|
|
39
|
+
ga4_functions_1.updateUser(payload.user_id, payload.user_properties, gtag);
|
|
40
|
+
const event_name = normalizeEventName(payload.name, payload.lowercase);
|
|
41
|
+
gtag('event', event_name, payload.params);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
exports.default = action;
|
|
45
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/customEvent/index.ts"],"names":[],"mappings":";;AAGA,sDAAoE;AACpE,oDAA6C;AAE7C,MAAM,kBAAkB,GAAG,CAAC,IAAY,EAAE,SAA8B,EAAU,EAAE;IAClF,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAA;IAClB,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;IAE/B,IAAI,SAAS,EAAE;QACb,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;KAC1B;IACD,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,MAAM,MAAM,GAAyD;IACnE,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,uBAAuB;IACpC,mBAAmB,EAAE,gBAAgB;IACrC,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE;QACN,IAAI,EAAE;YACJ,KAAK,EAAE,YAAY;YACnB,WAAW,EACT,yWAAyW;YAC3W,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,SAAS;aACnB;SACF;QACD,SAAS,EAAE;YACT,KAAK,EAAE,sBAAsB;YAC7B,WAAW,EACT,qZAAqZ;YACvZ,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,KAAK;SACf;QACD,OAAO,EAAE,EAAE,GAAG,wBAAO,EAAE;QACvB,eAAe,EAAE,gCAAe;QAChC,MAAM,EAAE,uBAAM;KACf;IACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAC7B,0BAAU,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,EAAE,IAAI,CAAC,CAAA;QAC1D,MAAM,UAAU,GAAG,kBAAkB,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,CAAA;QAEtE,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,MAAM,CAAC,CAAA;IAC3C,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function updateUser(userID: string | undefined, userProps: object | undefined, gtag: Function): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateUser = void 0;
|
|
4
|
+
function updateUser(userID, userProps, gtag) {
|
|
5
|
+
if (userID) {
|
|
6
|
+
gtag('set', { user_id: userID });
|
|
7
|
+
}
|
|
8
|
+
if (userProps) {
|
|
9
|
+
gtag('set', { user_properties: userProps });
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.updateUser = updateUser;
|
|
13
|
+
//# sourceMappingURL=ga4-functions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ga4-functions.js","sourceRoot":"","sources":["../../src/ga4-functions.ts"],"names":[],"mappings":";;;AAAA,SAAgB,UAAU,CAAC,MAA0B,EAAE,SAA6B,EAAE,IAAc;IAClG,IAAI,MAAM,EAAE;QACV,IAAI,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAA;KACjC;IACD,IAAI,SAAS,EAAE;QACb,IAAI,CAAC,KAAK,EAAE,EAAE,eAAe,EAAE,SAAS,EAAE,CAAC,CAAA;KAC5C;AACH,CAAC;AAPD,gCAOC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { InputField } from '@segment/actions-core/destination-kit/types';
|
|
2
|
+
export declare const formatUserProperties: (userProperties: object | undefined) => object | undefined;
|
|
3
|
+
export declare const user_properties: InputField;
|
|
4
|
+
export declare const params: InputField;
|
|
5
|
+
export declare const user_id: InputField;
|
|
6
|
+
export declare const promotion_id: InputField;
|
|
7
|
+
export declare const promotion_name: InputField;
|
|
8
|
+
export declare const creative_slot: InputField;
|
|
9
|
+
export declare const creative_name: InputField;
|
|
10
|
+
export declare const tax: InputField;
|
|
11
|
+
export declare const shipping: InputField;
|
|
12
|
+
export declare const transaction_id: InputField;
|
|
13
|
+
export declare const affiliation: InputField;
|
|
14
|
+
export declare const client_id: InputField;
|
|
15
|
+
export declare const currency: InputField;
|
|
16
|
+
export declare const value: InputField;
|
|
17
|
+
export declare const coupon: InputField;
|
|
18
|
+
export declare const payment_type: InputField;
|
|
19
|
+
export declare const method: InputField;
|
|
20
|
+
export declare const search_term: InputField;
|
|
21
|
+
export declare const item_list_name: InputField;
|
|
22
|
+
export declare const item_list_id: InputField;
|
|
23
|
+
export declare const location_id: InputField;
|
|
24
|
+
export declare const minimal_items: InputField;
|
|
25
|
+
export declare const items_single_products: InputField;
|
|
26
|
+
export declare const items_multi_products: InputField;
|