@@ -213,7 +213,7 @@ export module Analytics {
213
213
* @param options A dictionary of options, e.g. integrations (thigh analytics integration to forward the event to)
214
214
*/
215
215
public async track ( event : string , properties : JsonMap = { } , options : Options = { } ) {
216
- await this . middlewares . run ( 'track' , { event, properties, integrations : options . integrations || { } } )
216
+ await this . middlewares . run ( 'track' , { event, properties, integrations : options . integrations || { } } , options . context || { } )
217
217
}
218
218
219
219
/**
@@ -231,7 +231,7 @@ export module Analytics {
231
231
* If the event was 'Added to Shopping Cart', it might have properties like price, productType, etc.
232
232
*/
233
233
public async screen ( name : string , properties : JsonMap = { } , options : Options = { } ) {
234
- await this . middlewares . run ( 'screen' , { name, properties, integrations : options . integrations || { } } )
234
+ await this . middlewares . run ( 'screen' , { name, properties, integrations : options . integrations || { } } , options . context || { } )
235
235
}
236
236
237
237
/**
@@ -246,7 +246,7 @@ export module Analytics {
246
246
* @param options A dictionary of options, e.g. integrations (thigh analytics integration to forward the event to)
247
247
*/
248
248
public async identify ( user : string , traits : JsonMap = { } , options : Options = { } ) {
249
- await this . middlewares . run ( 'identify' , { user, traits, integrations : options . integrations || { } } )
249
+ await this . middlewares . run ( 'identify' , { user, traits, integrations : options . integrations || { } } , options . context || { } )
250
250
}
251
251
252
252
/**
@@ -259,7 +259,7 @@ export module Analytics {
259
259
* @param options A dictionary of options, e.g. integrations (thigh analytics integration to forward the event to)
260
260
*/
261
261
public async group ( groupId : string , traits : JsonMap = { } , options : Options = { } ) {
262
- await this . middlewares . run ( 'group' , { groupId, traits, integrations : options . integrations || { } } )
262
+ await this . middlewares . run ( 'group' , { groupId, traits, integrations : options . integrations || { } } , options . context || { } )
263
263
}
264
264
265
265
/**
@@ -272,7 +272,7 @@ export module Analytics {
272
272
* The existing ID will be either the previousId if you have called identify, or the anonymous ID.
273
273
*/
274
274
public async alias ( newId : string , options : Options = { } ) {
275
- await this . middlewares . run ( 'alias' , { newId, integrations : options . integrations || { } } )
275
+ await this . middlewares . run ( 'alias' , { newId, integrations : options . integrations || { } } , options . context || { } )
276
276
}
277
277
278
278
/**
0 commit comments