-
-
Notifications
You must be signed in to change notification settings - Fork 88
Expand file tree
/
Copy pathindex.d.ts
More file actions
190 lines (171 loc) · 4.08 KB
/
Copy pathindex.d.ts
File metadata and controls
190 lines (171 loc) · 4.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
export interface Options {
autoConfig: boolean;
debug: boolean;
}
export interface AdvancedMatching {
ct: string;
country: string;
db: string;
em: string;
fn: string;
ge: string;
ln: string;
ph: string;
st: string;
zp: string;
}
export interface Data {}
export interface AddPaymentInfo extends Data {
content_category?: string;
content_ids?: object[] | object;
contents?: object[];
currency?: string;
value?: number;
}
/**
* content_type required and at least one of content_ids or contents required
* this version is compatible with dynamic ads
*/
export interface DynamicAdAddToCart extends Data {
content_ids?: object[] | object;
content_name?: string;
content_type: string;
contents?: object[];
currency?: string;
value?: number;
}
/**
* this version is not compatible with dynamic ads
*/
export interface AddToCart extends Data {
content_ids?: object[] | object;
content_name?: string;
content_type?: string;
contents?: object[];
currency?: string;
value?: number;
}
export interface AddToWishlist extends Data {
content_name?: string;
content_category?: string;
content_ids?: object[] | object;
contents?: object[];
currency?: string;
value?: number;
}
export interface AddToWishlist extends Data {
content_name?: string;
content_category?: string;
content_ids?: object[] | object;
contents?: object[];
currency?: string;
value?: number;
}
export interface CompleteRegistration extends Data {
content_name?: String;
currency?: string;
status?: string;
value?: number;
}
export interface InitiateCheckout extends Data {
content_category?: string;
content_ids?: object[] | object;
contents?: object[];
currency?: string;
num_items?: number;
value?: number;
}
export interface Lead extends Data {
content_category?: string;
content_name?: string;
currency?: string;
value?: number;
}
/**
* content_type required and at least one of content_ids or contents required
* this version is compatible with dynamic ads
*/
export interface DynamicAdPurchase extends Data {
content_ids?: object[] | object;
content_name?: string;
content_type: string;
contents?: object[];
currency: string;
num_items?: number;
value: number;
}
/**
* this version is not compatible with dynamic ads
*/
export interface Purchase extends Data {
content_ids?: object[] | object;
content_name?: string;
content_type?: string;
contents?: object[];
currency: string;
num_items?: number;
value: number;
}
export interface Search extends Data {
content_category?: string;
content_ids?: object[] | object;
contents?: object[];
currency?: string;
search_string?: string;
value?: number;
}
export interface StartTrial extends Data {
currency?: string;
predicted_ltv?: number;
value: number;
}
export interface Subscribe extends Data {
currency?: string;
predicted_ltv?: number;
value: number;
}
/**
* content_type required and at least one of content_ids or contents required
* this version is compatible with dynamic ads
*/
export interface DynamicAdViewContent extends Data {
content_ids?: string[] | string;
content_name?: string;
content_type: string;
contents?: object[];
currency?: string;
value?: number;
}
/**
* this version is not compatible with dynamic ads
*/
export interface ViewContent extends Data {
content_ids?: string[] | string;
content_name?: string;
content_type?: string;
contents?: object[];
currency?: string;
value?: number;
}
export function verifyInit(): boolean;
export function init(
pixelId: string,
advancedMatching?: AdvancedMatching,
options?: Options,
): void;
export function pageView(): void;
export function track(title: string, data?: Data | any): void;
export function trackCustom(title: string, data?: Data | any): void;
export function trackSingle(
pixel: string,
title: string,
data?: Data | any,
): void;
export function trackSingleCustom(
pixel: string,
title: string,
data?: Data | any,
): void;
export function fbq(...args: Array<unknown>): void;
export function revokeConsent(): void;
export function grantConsent(): void;