@@ -41,6 +41,7 @@ describe('Integration Capture', () => {
4141 fbclid : '1234' ,
4242 gclid : '234' ,
4343 gbraid : '6574' ,
44+ rtid : '45670808' ,
4445 wbraid : '1234111' ,
4546 } ) ;
4647
@@ -71,13 +72,12 @@ describe('Integration Capture', () => {
7172 expect ( testEvent . data ) . to . have . property ( 'event_name' , 'Test Event' ) ;
7273 expect ( testEvent . data ) . to . have . property ( 'custom_flags' ) ;
7374
74- expect ( testEvent . data . custom_flags ) . to . deep . equal ( {
75- 'Facebook.ClickId' : `fb.1.${ initialTimestamp } .1234` ,
76- 'Facebook.BrowserId' : '54321' ,
77- 'GoogleEnhancedConversions.Gclid' : '234' ,
78- 'GoogleEnhancedConversions.Gbraid' : '6574' ,
79- 'GoogleEnhancedConversions.Wbraid' : '1234111' ,
80- } ) ;
75+ expect ( testEvent . data . custom_flags [ 'Facebook.ClickId' ] , 'Facebook Click Id' ) . to . equal ( `fb.1.${ initialTimestamp } .1234` ) ;
76+ expect ( testEvent . data . custom_flags [ 'Facebook.BrowserId' ] , 'Facebook Browser Id' ) . to . equal ( '54321' ) ;
77+ expect ( testEvent . data . custom_flags [ 'GoogleEnhancedConversions.Gclid' ] , 'Google Enhanced Conversions Gclid' ) . to . equal ( '234' ) ;
78+ expect ( testEvent . data . custom_flags [ 'GoogleEnhancedConversions.Gbraid' ] , 'Google Enhanced Conversions Gbraid' ) . to . equal ( '6574' ) ;
79+ expect ( testEvent . data . custom_flags [ 'GoogleEnhancedConversions.Wbraid' ] , 'Google Enhanced Conversions Wbraid' ) . to . equal ( '1234111' ) ;
80+ expect ( testEvent . data . custom_flags [ 'Rokt.ClickId' ] , 'Rokt Click Id' ) . to . equal ( '45670808' ) ;
8181 } ) ;
8282
8383 it ( 'should add captured integrations to event custom flags, prioritizing passed in custom flags' , async ( ) => {
@@ -91,17 +91,16 @@ describe('Integration Capture', () => {
9191
9292 const testEvent = findEventFromRequest ( fetchMock . calls ( ) , 'Test Event' ) ;
9393
94-
9594 expect ( testEvent ) . to . have . property ( 'data' ) ;
9695 expect ( testEvent . data ) . to . have . property ( 'event_name' , 'Test Event' ) ;
9796 expect ( testEvent . data ) . to . have . property ( 'custom_flags' ) ;
98- expect ( testEvent . data . custom_flags ) . to . deep . equal ( {
99- 'Facebook.ClickId' : ' passed-in',
100- 'Facebook.BrowserId' : ' 54321',
101- 'GoogleEnhancedConversions.Gclid' : ' 234',
102- 'GoogleEnhancedConversions.Gbraid' : ' 6574',
103- 'GoogleEnhancedConversions.Wbraid' : ' 1234111',
104- } ) ;
97+
98+ expect ( testEvent . data . custom_flags [ 'Facebook.ClickId' ] , 'Facebook Click Id' ) . to . equal ( ' passed-in') ;
99+ expect ( testEvent . data . custom_flags [ 'Facebook.BrowserId' ] , 'Facebook Browser Id' ) . to . equal ( ' 54321') ;
100+ expect ( testEvent . data . custom_flags [ 'GoogleEnhancedConversions.Gclid' ] , 'Google Enhanced Conversions Gclid' ) . to . equal ( ' 234') ;
101+ expect ( testEvent . data . custom_flags [ 'GoogleEnhancedConversions.Gbraid' ] , 'Google Enhanced Conversions Gbraid' ) . to . equal ( ' 6574') ;
102+ expect ( testEvent . data . custom_flags [ 'GoogleEnhancedConversions.Wbraid' ] , 'Google Enhanced Conversions Wbraid' ) . to . equal ( ' 1234111') ;
103+ expect ( testEvent . data . custom_flags [ 'Rokt.ClickId' ] , 'Rokt Click Id' ) . to . equal ( '45670808' ) ;
105104 } ) ;
106105
107106 it ( 'should add captured integrations to page view custom flags' , async ( ) => {
@@ -119,13 +118,13 @@ describe('Integration Capture', () => {
119118 expect ( testEvent ) . to . have . property ( 'data' ) ;
120119 expect ( testEvent . data ) . to . have . property ( 'screen_name' , 'Test Page View' ) ;
121120 expect ( testEvent . data ) . to . have . property ( 'custom_flags' ) ;
122- expect ( testEvent . data . custom_flags ) . to . deep . equal ( {
123- 'Facebook.ClickId' : `fb.1.${ initialTimestamp } .1234` ,
124- 'Facebook.BrowserId' : ' 54321',
125- 'GoogleEnhancedConversions.Gclid' : ' 234',
126- 'GoogleEnhancedConversions.Gbraid' : ' 6574',
127- 'GoogleEnhancedConversions.Wbraid' : ' 1234111',
128- } ) ;
121+
122+ expect ( testEvent . data . custom_flags [ 'Facebook.ClickId' ] , 'Facebook Click Id' ) . to . equal ( `fb.1.${ initialTimestamp } .1234` ) ;
123+ expect ( testEvent . data . custom_flags [ 'Facebook.BrowserId' ] , 'Facebook Browser Id' ) . to . equal ( ' 54321') ;
124+ expect ( testEvent . data . custom_flags [ 'GoogleEnhancedConversions.Gclid' ] , 'Google Enhanced Conversions Gclid' ) . to . equal ( ' 234') ;
125+ expect ( testEvent . data . custom_flags [ 'GoogleEnhancedConversions.Gbraid' ] , 'Google Enhanced Conversions Gbraid' ) . to . equal ( ' 6574') ;
126+ expect ( testEvent . data . custom_flags [ 'GoogleEnhancedConversions.Wbraid' ] , 'Google Enhanced Conversions Wbraid' ) . to . equal ( ' 1234111') ;
127+ expect ( testEvent . data . custom_flags [ 'Rokt.ClickId' ] , 'Rokt Click Id' ) . to . equal ( '45670808' ) ;
129128 } ) ;
130129
131130 it ( 'should add captured integrations to page view custom flags, prioritizing passed in custom flags' , async ( ) => {
@@ -141,13 +140,13 @@ describe('Integration Capture', () => {
141140 expect ( testEvent ) . to . have . property ( 'data' ) ;
142141 expect ( testEvent . data ) . to . have . property ( 'screen_name' , 'Test Page View' ) ;
143142 expect ( testEvent . data ) . to . have . property ( 'custom_flags' ) ;
144- expect ( testEvent . data . custom_flags ) . to . deep . equal ( {
145- 'Facebook.ClickId' : ' passed-in',
146- 'Facebook.BrowserId' : ' 54321',
147- 'GoogleEnhancedConversions.Gclid' : ' 234',
148- 'GoogleEnhancedConversions.Gbraid' : ' 6574',
149- 'GoogleEnhancedConversions.Wbraid' : ' 1234111',
150- } ) ;
143+
144+ expect ( testEvent . data . custom_flags [ 'Facebook.ClickId' ] , 'Facebook Click Id' ) . to . equal ( ' passed-in') ;
145+ expect ( testEvent . data . custom_flags [ 'Facebook.BrowserId' ] , 'Facebook Browser Id' ) . to . equal ( ' 54321') ;
146+ expect ( testEvent . data . custom_flags [ 'GoogleEnhancedConversions.Gclid' ] , 'Google Enhanced Conversions Gclid' ) . to . equal ( ' 234') ;
147+ expect ( testEvent . data . custom_flags [ 'GoogleEnhancedConversions.Gbraid' ] , 'Google Enhanced Conversions Gbraid' ) . to . equal ( ' 6574') ;
148+ expect ( testEvent . data . custom_flags [ 'GoogleEnhancedConversions.Wbraid' ] , 'Google Enhanced Conversions Wbraid' ) . to . equal ( ' 1234111') ;
149+ expect ( testEvent . data . custom_flags [ 'Rokt.ClickId' ] , 'Rokt Click Id' ) . to . equal ( '45670808' ) ;
151150 } ) ;
152151
153152 it ( 'should add captured integrations to commerce event custom flags' , async ( ) => {
@@ -178,14 +177,14 @@ describe('Integration Capture', () => {
178177
179178 expect ( testEvent . data . product_action ) . to . have . property ( 'action' , 'purchase' ) ;
180179 expect ( testEvent . data ) . to . have . property ( 'custom_flags' ) ;
181- expect ( testEvent . data . custom_flags ) . to . deep . equal ( {
182- foo : ' bar',
183- 'Facebook.ClickId' : `fb.1.${ initialTimestamp } .1234` ,
184- 'Facebook.BrowserId' : ' 54321',
185- 'GoogleEnhancedConversions.Gclid' : ' 234',
186- 'GoogleEnhancedConversions.Gbraid' : ' 6574',
187- 'GoogleEnhancedConversions.Wbraid' : ' 1234111',
188- } ) ;
180+
181+ expect ( testEvent . data . custom_flags [ ' foo' ] , 'Custom Flag' ) . to . equal ( ' bar') ;
182+ expect ( testEvent . data . custom_flags [ 'Facebook.ClickId' ] , 'Facebook Click Id' ) . to . equal ( `fb.1.${ initialTimestamp } .1234` ) ;
183+ expect ( testEvent . data . custom_flags [ 'Facebook.BrowserId' ] , 'Facebook Browser Id' ) . to . equal ( ' 54321') ;
184+ expect ( testEvent . data . custom_flags [ 'GoogleEnhancedConversions.Gclid' ] , 'Google Enhanced Conversions Gclid' ) . to . equal ( ' 234') ;
185+ expect ( testEvent . data . custom_flags [ 'GoogleEnhancedConversions.Gbraid' ] , 'Google Enhanced Conversions Gbraid' ) . to . equal ( ' 6574') ;
186+ expect ( testEvent . data . custom_flags [ 'GoogleEnhancedConversions.Wbraid' ] , 'Google Enhanced Conversions Wbraid' ) . to . equal ( ' 1234111') ;
187+ expect ( testEvent . data . custom_flags [ 'Rokt.ClickId' ] , 'Rokt Click Id' ) . to . equal ( '45670808' ) ;
189188 } ) ;
190189
191190 it ( 'should add captured integrations to commerce event custom flags, prioritizing passed in flags' , async ( ) => {
@@ -217,13 +216,13 @@ describe('Integration Capture', () => {
217216
218217 expect ( testEvent . data . product_action ) . to . have . property ( 'action' , 'purchase' ) ;
219218 expect ( testEvent . data ) . to . have . property ( 'custom_flags' ) ;
220- expect ( testEvent . data . custom_flags ) . to . deep . equal ( {
221- 'Facebook.ClickId' : ' passed-in',
222- 'Facebook.BrowserId' : ' 54321',
223- 'GoogleEnhancedConversions.Gclid' : ' 234',
224- 'GoogleEnhancedConversions.Gbraid' : ' 6574',
225- 'GoogleEnhancedConversions.Wbraid' : ' 1234111',
226- } ) ;
219+
220+ expect ( testEvent . data . custom_flags [ 'Facebook.ClickId' ] , 'Facebook Click Id' ) . to . equal ( ' passed-in') ;
221+ expect ( testEvent . data . custom_flags [ 'Facebook.BrowserId' ] , 'Facebook Browser Id' ) . to . equal ( ' 54321') ;
222+ expect ( testEvent . data . custom_flags [ 'GoogleEnhancedConversions.Gclid' ] , 'Google Enhanced Conversions Gclid' ) . to . equal ( ' 234') ;
223+ expect ( testEvent . data . custom_flags [ 'GoogleEnhancedConversions.Gbraid' ] , 'Google Enhanced Conversions Gbraid' ) . to . equal ( ' 6574') ;
224+ expect ( testEvent . data . custom_flags [ 'GoogleEnhancedConversions.Wbraid' ] , 'Google Enhanced Conversions Wbraid' ) . to . equal ( ' 1234111') ;
225+ expect ( testEvent . data . custom_flags [ 'Rokt.ClickId' ] , 'Rokt Click Id' ) . to . equal ( '45670808' ) ;
227226 } ) ;
228227
229228 it ( 'should add captured integrations to commerce event custom flags' , async ( ) => {
@@ -254,14 +253,14 @@ describe('Integration Capture', () => {
254253
255254 expect ( testEvent . data . product_action ) . to . have . property ( 'action' , 'purchase' ) ;
256255 expect ( testEvent . data ) . to . have . property ( 'custom_flags' ) ;
257- expect ( testEvent . data . custom_flags ) . to . deep . equal ( {
258- foo : ' bar',
259- 'Facebook.ClickId' : `fb.1.${ initialTimestamp } .1234` ,
260- 'Facebook.BrowserId' : ' 54321',
261- 'GoogleEnhancedConversions.Gclid' : ' 234',
262- 'GoogleEnhancedConversions.Gbraid' : ' 6574',
263- 'GoogleEnhancedConversions.Wbraid' : ' 1234111',
264- } ) ;
256+
257+ expect ( testEvent . data . custom_flags [ ' foo' ] , 'Custom Flag' ) . to . equal ( ' bar') ;
258+ expect ( testEvent . data . custom_flags [ 'Facebook.ClickId' ] , 'Facebook Click Id' ) . to . equal ( `fb.1.${ initialTimestamp } .1234` ) ;
259+ expect ( testEvent . data . custom_flags [ 'Facebook.BrowserId' ] , 'Facebook Browser Id' ) . to . equal ( ' 54321') ;
260+ expect ( testEvent . data . custom_flags [ 'GoogleEnhancedConversions.Gclid' ] , 'Google Enhanced Conversions Gclid' ) . to . equal ( ' 234') ;
261+ expect ( testEvent . data . custom_flags [ 'GoogleEnhancedConversions.Gbraid' ] , 'Google Enhanced Conversions Gbraid' ) . to . equal ( ' 6574') ;
262+ expect ( testEvent . data . custom_flags [ 'GoogleEnhancedConversions.Wbraid' ] , 'Google Enhanced Conversions Wbraid' ) . to . equal ( ' 1234111') ;
263+ expect ( testEvent . data . custom_flags [ 'Rokt.ClickId' ] , 'Rokt Click Id' ) . to . equal ( '45670808' ) ;
265264 } ) ;
266265
267266 it ( 'should add captured integrations to commerce event custom flags, prioritizing passed in flags' , async ( ) => {
@@ -293,13 +292,13 @@ describe('Integration Capture', () => {
293292
294293 expect ( testEvent . data . product_action ) . to . have . property ( 'action' , 'purchase' ) ;
295294 expect ( testEvent . data ) . to . have . property ( 'custom_flags' ) ;
296- expect ( testEvent . data . custom_flags ) . to . deep . equal ( {
297- 'Facebook.ClickId' : ' passed-in',
298- 'Facebook.BrowserId' : ' 54321',
299- 'GoogleEnhancedConversions.Gclid' : ' 234',
300- 'GoogleEnhancedConversions.Gbraid' : ' 6574',
301- 'GoogleEnhancedConversions.Wbraid' : ' 1234111',
302- } ) ;
295+
296+ expect ( testEvent . data . custom_flags [ 'Facebook.ClickId' ] , 'Facebook Click Id' ) . to . equal ( ' passed-in') ;
297+ expect ( testEvent . data . custom_flags [ 'Facebook.BrowserId' ] , 'Facebook Browser Id' ) . to . equal ( ' 54321') ;
298+ expect ( testEvent . data . custom_flags [ 'GoogleEnhancedConversions.Gclid' ] , 'Google Enhanced Conversions Gclid' ) . to . equal ( ' 234') ;
299+ expect ( testEvent . data . custom_flags [ 'GoogleEnhancedConversions.Gbraid' ] , 'Google Enhanced Conversions Gbraid' ) . to . equal ( ' 6574') ;
300+ expect ( testEvent . data . custom_flags [ 'GoogleEnhancedConversions.Wbraid' ] , 'Google Enhanced Conversions Wbraid' ) . to . equal ( ' 1234111') ;
301+ expect ( testEvent . data . custom_flags [ 'Rokt.ClickId' ] , 'Rokt Click Id' ) . to . equal ( '45670808' ) ;
303302 } ) ;
304303
305304 it ( 'should add captured integrations to batch partner identities' , async ( ) => {
0 commit comments