@segment/action-destinations 3.74.4-alpha.5 → 3.74.4-alpha.8
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.
|
@@ -3,140 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
7
6
|
const reportConversionEvent_1 = __importDefault(require("./reportConversionEvent"));
|
|
8
|
-
const DEFAULT_VALS = {
|
|
9
|
-
...actions_core_1.defaultValues(reportConversionEvent_1.default.fields)
|
|
10
|
-
};
|
|
11
7
|
const ACCESS_TOKEN_URL = 'https://accounts.snapchat.com/login/oauth2/access_token';
|
|
12
|
-
const presets = [
|
|
13
|
-
{
|
|
14
|
-
name: 'Add Billing',
|
|
15
|
-
subscribe: 'event = "Payment Info Entered"',
|
|
16
|
-
partnerAction: 'reportConversionEvent',
|
|
17
|
-
mapping: {
|
|
18
|
-
...DEFAULT_VALS,
|
|
19
|
-
event_type: 'ADD_BILLING'
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
name: 'Add to Cart',
|
|
24
|
-
subscribe: 'event = "Product Added"',
|
|
25
|
-
partnerAction: 'reportConversionEvent',
|
|
26
|
-
mapping: {
|
|
27
|
-
...DEFAULT_VALS,
|
|
28
|
-
event_type: 'ADD_CART'
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
name: 'Add to Wishlist',
|
|
33
|
-
subscribe: 'event = "Product Added to Wishlist"',
|
|
34
|
-
partnerAction: 'reportConversionEvent',
|
|
35
|
-
mapping: {
|
|
36
|
-
...DEFAULT_VALS,
|
|
37
|
-
event_type: 'ADD_TO_WISHLIST'
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
name: 'App Install',
|
|
42
|
-
subscribe: 'event = "Application Installed"',
|
|
43
|
-
partnerAction: 'reportConversionEvent',
|
|
44
|
-
mapping: {
|
|
45
|
-
...DEFAULT_VALS,
|
|
46
|
-
event_type: 'APP_INSTALL'
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
name: 'List View',
|
|
51
|
-
subscribe: 'event = "Product List Viewed"',
|
|
52
|
-
partnerAction: 'reportConversionEvent',
|
|
53
|
-
mapping: {
|
|
54
|
-
...DEFAULT_VALS,
|
|
55
|
-
event_type: 'LIST_VIEW'
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
name: 'App Open',
|
|
60
|
-
subscribe: 'event = "Application Opened"',
|
|
61
|
-
partnerAction: 'reportConversionEvent',
|
|
62
|
-
mapping: {
|
|
63
|
-
...DEFAULT_VALS,
|
|
64
|
-
event_type: 'APP_OPEN'
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
name: 'Login',
|
|
69
|
-
subscribe: 'event = "Signed In"',
|
|
70
|
-
partnerAction: 'reportConversionEvent',
|
|
71
|
-
mapping: {
|
|
72
|
-
...DEFAULT_VALS,
|
|
73
|
-
event_type: 'LOGIN'
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
name: 'Page View',
|
|
78
|
-
subscribe: 'type = "page"',
|
|
79
|
-
partnerAction: 'reportConversionEvent',
|
|
80
|
-
mapping: {
|
|
81
|
-
...DEFAULT_VALS,
|
|
82
|
-
event_type: 'PAGE_VIEW'
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
name: 'Purchase',
|
|
87
|
-
subscribe: 'event = "Order Completed"',
|
|
88
|
-
partnerAction: 'reportConversionEvent',
|
|
89
|
-
mapping: {
|
|
90
|
-
...DEFAULT_VALS,
|
|
91
|
-
event_type: 'PURCHASE'
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
name: 'Search',
|
|
96
|
-
subscribe: 'event = "Products Searched"',
|
|
97
|
-
partnerAction: 'reportConversionEvent',
|
|
98
|
-
mapping: {
|
|
99
|
-
...DEFAULT_VALS,
|
|
100
|
-
event_type: 'SEARCH'
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
name: 'Share',
|
|
105
|
-
subscribe: 'event = "Product Shared"',
|
|
106
|
-
partnerAction: 'reportConversionEvent',
|
|
107
|
-
mapping: {
|
|
108
|
-
...DEFAULT_VALS,
|
|
109
|
-
event_type: 'SHARE'
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
name: 'Sign Up',
|
|
114
|
-
subscribe: 'event = "Signed Up"',
|
|
115
|
-
partnerAction: 'reportConversionEvent',
|
|
116
|
-
mapping: {
|
|
117
|
-
...DEFAULT_VALS,
|
|
118
|
-
event_type: 'SIGN_UP'
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
name: 'Start Checkout',
|
|
123
|
-
subscribe: 'event = "Checkout Started"',
|
|
124
|
-
partnerAction: 'reportConversionEvent',
|
|
125
|
-
mapping: {
|
|
126
|
-
...DEFAULT_VALS,
|
|
127
|
-
event_type: 'START_CHECKOUT'
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
name: 'View Content',
|
|
132
|
-
subscribe: 'event = "Product Viewed"',
|
|
133
|
-
partnerAction: 'reportConversionEvent',
|
|
134
|
-
mapping: {
|
|
135
|
-
...DEFAULT_VALS,
|
|
136
|
-
event_type: 'VIEW_CONTENT'
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
];
|
|
140
8
|
const destination = {
|
|
141
9
|
name: 'Snap Conversions Api',
|
|
142
10
|
slug: 'actions-snap-conversions',
|
|
@@ -147,20 +15,17 @@ const destination = {
|
|
|
147
15
|
pixel_id: {
|
|
148
16
|
label: 'Pixel ID',
|
|
149
17
|
description: 'The Pixel ID for your Snapchat Ad Account. Required for web and offline events.',
|
|
150
|
-
type: 'string'
|
|
151
|
-
default: 'test123'
|
|
18
|
+
type: 'string'
|
|
152
19
|
},
|
|
153
20
|
snap_app_id: {
|
|
154
21
|
label: 'Snap App ID',
|
|
155
22
|
description: 'The Snap App ID associated with your app. This is a unique code generated in Snapchat Ads Manager and included in your MMP dashboard. Required for app events.',
|
|
156
|
-
type: 'string'
|
|
157
|
-
default: 'test123'
|
|
23
|
+
type: 'string'
|
|
158
24
|
},
|
|
159
25
|
app_id: {
|
|
160
26
|
label: 'App ID',
|
|
161
27
|
description: 'The unique ID assigned for a given application. It should be numeric for iOS, and the human interpretable string for Android. Required for app events.',
|
|
162
|
-
type: 'string'
|
|
163
|
-
default: 'test123'
|
|
28
|
+
type: 'string'
|
|
164
29
|
}
|
|
165
30
|
},
|
|
166
31
|
refreshAccessToken: async (request, { auth }) => {
|
|
@@ -183,7 +48,6 @@ const destination = {
|
|
|
183
48
|
}
|
|
184
49
|
};
|
|
185
50
|
},
|
|
186
|
-
presets,
|
|
187
51
|
actions: {
|
|
188
52
|
reportConversionEvent: reportConversionEvent_1.default
|
|
189
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/snap-conversions-api/index.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/snap-conversions-api/index.ts"],"names":[],"mappings":";;;;;AAIA,oFAA2D;AAM3D,MAAM,gBAAgB,GAAG,yDAAyD,CAAA;AAuIlF,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE,0BAA0B;IAChC,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,QAAQ,EAAE;gBACR,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,iFAAiF;gBAC9F,IAAI,EAAE,QAAQ;aACf;YACD,WAAW,EAAE;gBACX,KAAK,EAAE,aAAa;gBACpB,WAAW,EACT,gKAAgK;gBAClK,IAAI,EAAE,QAAQ;aACf;YACD,MAAM,EAAE;gBACN,KAAK,EAAE,QAAQ;gBACf,WAAW,EACT,wJAAwJ;gBAC1J,IAAI,EAAE,QAAQ;aACf;SACF;QACD,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;YAE9C,MAAM,GAAG,GAAG,MAAM,OAAO,CAAuB,gBAAgB,EAAE;gBAChE,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,IAAI,eAAe,CAAC;oBACxB,aAAa,EAAE,IAAI,CAAC,YAAY;oBAChC,SAAS,EAAE,IAAI,CAAC,QAAQ;oBACxB,aAAa,EAAE,IAAI,CAAC,YAAY;oBAChC,UAAU,EAAE,eAAe;iBAC5B,CAAC;aACH,CAAC,CAAA;YAEF,OAAO,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,CAAA;QAC/C,CAAC;KACF;IACD,aAAa,CAAC,EAAE,IAAI,EAAE;QACpB,OAAO;YACL,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,IAAI,EAAE,WAAW,EAAE;aAC7C;SACF,CAAA;IACH,CAAC;IACD,OAAO,EAAE;QACP,qBAAqB,EAArB,+BAAqB;KACtB;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@segment/action-destinations",
|
|
3
3
|
"description": "Destination Actions engine and definitions.",
|
|
4
|
-
"version": "3.74.4-alpha.
|
|
4
|
+
"version": "3.74.4-alpha.8",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/segmentio/action-destinations",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"<rootDir>/test/setup-after-env.ts"
|
|
62
62
|
]
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "14587e3f2391ee0ed7f4c512fd9a29db846c2bb4"
|
|
65
65
|
}
|