@@ -98,34 +98,31 @@ Please follow the [Registry Scripts](/docs/guides/registry-scripts) guide to lea
98
98
99
99
``` ts
100
100
export interface XPixelApi {
101
- fbq: FbqFns & {
102
- push: FbqFns
101
+ twq: TwqFns & {
103
102
loaded: boolean
104
103
version: string
105
104
queue: any []
106
105
}
107
- _fbq: XPixelApi [' fbq' ]
108
106
}
109
- type FbqFns = ((event : ' track' , eventName : StandardEvents , data ? : EventObjectProperties ) => void )
110
- & ((event : ' trackCustom' , eventName : string , data ? : EventObjectProperties ) => void )
111
- & ((event : ' init' , id : number , data ? : Record <string , any >) => void )
112
- & ((event : ' init' , id : string ) => void )
107
+ type TwqFns =
108
+ ((event : ' event' , eventId : string , data ? : EventObjectProperties ) => void )
109
+ & ((event : ' config' , id : string ) => void )
113
110
& ((event : string , ... params : any []) => void )
114
- type StandardEvents = ' AddPaymentInfo' | ' AddToCart' | ' AddToWishlist' | ' CompleteRegistration' | ' Contact' | ' CustomizeProduct' | ' Donate' | ' FindLocation' | ' InitiateCheckout' | ' Lead' | ' Purchase' | ' Schedule' | ' Search' | ' StartTrial' | ' SubmitApplication' | ' Subscribe' | ' ViewContent'
111
+ interface ContentProperties {
112
+ content_type? : string | null
113
+ content_id? : string | number | null
114
+ content_name? : string | null
115
+ content_price? : string | number | null
116
+ num_items? : string | number | null
117
+ content_group_id? : string | number | null
118
+ }
115
119
interface EventObjectProperties {
116
- content_category? : string
117
- content_ids? : string []
118
- content_name? : string
119
- content_type? : string
120
- contents: { id: string , quantity: number }[]
121
- currency? : string
122
- delivery_category? : ' in_store' | ' curbside' | ' home_delivery'
123
- num_items? : number
124
- predicted_ltv? : number
125
- search_string? : string
126
- status? : ' completed' | ' updated' | ' viewed' | ' added_to_cart' | ' removed_from_cart' | string
127
- value? : number
128
- [key : string ]: any
120
+ value? : string | number | null
121
+ currency? : string | null
122
+ conversion_id? : string | number | null
123
+ email_address? : string | null
124
+ phone_number? : string | null
125
+ contents: ContentProperties []
129
126
}
130
127
```
131
128
0 commit comments