@@ -107,18 +107,23 @@ export interface MetaPixelApi {
107
107
}
108
108
_fbq: MetaPixelApi [' fbq' ]
109
109
}
110
- type FbqFns = ((event : ' track' , eventName : StandardEvents , data ? : EventObjectProperties ) => void )
111
- & ((event : ' trackCustom' , eventName : string , data ? : EventObjectProperties ) => void )
112
- & ((event : ' init' , id : number , data ? : Record <string , any >) => void )
113
- & ((event : ' init' , id : string ) => void )
114
- & ((event : string , ... params : any []) => void )
110
+ type FbqArgs =
111
+ | [' track' , StandardEvents , EventObjectProperties ? ]
112
+ | [' trackCustom' , string , EventObjectProperties ? ]
113
+ | [' trackSingle' , string , StandardEvents , EventObjectProperties ? ]
114
+ | [' trackSingleCustom' , string , string , EventObjectProperties ? ]
115
+ | [' init' , string ]
116
+ | [' init' , number , Record <string , any >? ]
117
+ | [' consent' , ConsentAction ]
118
+ | [string , ... any []]
119
+ type FbqFns = (... args : FbqArgs ) => void
115
120
type StandardEvents = ' AddPaymentInfo' | ' AddToCart' | ' AddToWishlist' | ' CompleteRegistration' | ' Contact' | ' CustomizeProduct' | ' Donate' | ' FindLocation' | ' InitiateCheckout' | ' Lead' | ' Purchase' | ' Schedule' | ' Search' | ' StartTrial' | ' SubmitApplication' | ' Subscribe' | ' ViewContent'
116
121
interface EventObjectProperties {
117
122
content_category? : string
118
123
content_ids? : string []
119
124
content_name? : string
120
125
content_type? : string
121
- contents: { id: string , quantity: number }[]
126
+ contents? : { id: string , quantity: number }[]
122
127
currency? : string
123
128
delivery_category? : ' in_store' | ' curbside' | ' home_delivery'
124
129
num_items? : number
@@ -128,6 +133,7 @@ interface EventObjectProperties {
128
133
value? : number
129
134
[key : string ]: any
130
135
}
136
+ type ConsentAction = ' grant' | ' revoke'
131
137
` ` `
132
138
133
139
### Config Schema
0 commit comments