@@ -107,18 +107,23 @@ export interface MetaPixelApi {
107107 }
108108 _fbq: MetaPixelApi [' fbq' ]
109109}
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
115120type StandardEvents = ' AddPaymentInfo' | ' AddToCart' | ' AddToWishlist' | ' CompleteRegistration' | ' Contact' | ' CustomizeProduct' | ' Donate' | ' FindLocation' | ' InitiateCheckout' | ' Lead' | ' Purchase' | ' Schedule' | ' Search' | ' StartTrial' | ' SubmitApplication' | ' Subscribe' | ' ViewContent'
116121interface EventObjectProperties {
117122 content_category? : string
118123 content_ids? : string []
119124 content_name? : string
120125 content_type? : string
121- contents: { id: string , quantity: number }[]
126+ contents? : { id: string , quantity: number }[]
122127 currency? : string
123128 delivery_category? : ' in_store' | ' curbside' | ' home_delivery'
124129 num_items? : number
@@ -128,6 +133,7 @@ interface EventObjectProperties {
128133 value? : number
129134 [key : string ]: any
130135}
136+ type ConsentAction = ' grant' | ' revoke'
131137` ` `
132138
133139### Config Schema
0 commit comments