-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for idenitify calls when anonymousid userId both pr…
…esent in ecom events (#4092) * feat: add support for idenitify calls when anonymousid userId both present * chore: update code, add test * chore: traits are inside context
- Loading branch information
1 parent
e948cef
commit b61d1c1
Showing
2 changed files
with
261 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -606,6 +606,73 @@ export const checkoutEventsTestScenarios = [ | |
type: 'track', | ||
userId: '7188389789809', | ||
}, | ||
{ | ||
anonymousId: '50ead33e-d763-4854-b0ab-765859ef05cb', | ||
context: { | ||
integration: { | ||
name: 'SHOPIFY', | ||
}, | ||
library: { | ||
name: 'unknown', | ||
version: 'unknown', | ||
}, | ||
traits: { | ||
acceptsMarketing: false, | ||
address: { | ||
address1: 'oakwood bridge', | ||
address2: 'Hedgetown', | ||
city: 'KLF', | ||
company: null, | ||
country: 'United States', | ||
country_code: 'US', | ||
country_name: 'United States', | ||
customer_id: 7188389789809, | ||
default: true, | ||
first_name: 'testuser', | ||
id: null, | ||
last_name: 'dummy', | ||
name: 'testuser dummy', | ||
phone: null, | ||
province: 'Arizona', | ||
province_code: 'AZ', | ||
zip: '85003', | ||
}, | ||
adminGraphqlApiId: 'gid://shopify/Customer/7188389789809', | ||
currency: 'USD', | ||
email: '[email protected]', | ||
firstName: 'testuser', | ||
lastName: 'dummy', | ||
orderCount: 0, | ||
shippingAddress: { | ||
address1: 'oakwood bridge', | ||
address2: 'Hedgetown', | ||
city: 'KLF', | ||
company: null, | ||
country: 'United States', | ||
country_code: 'US', | ||
first_name: 'testuser', | ||
last_name: 'dummy', | ||
latitude: null, | ||
longitude: null, | ||
name: 'testuser dummy', | ||
phone: null, | ||
province: 'Arizona', | ||
province_code: 'AZ', | ||
zip: '85003', | ||
}, | ||
state: 'disabled', | ||
tags: '', | ||
taxExempt: false, | ||
totalSpent: '0.00', | ||
verifiedEmail: true, | ||
}, | ||
}, | ||
integrations: { | ||
SHOPIFY: false, | ||
}, | ||
type: 'identify', | ||
userId: '7188389789809', | ||
}, | ||
], | ||
}, | ||
}, | ||
|
@@ -1302,6 +1369,88 @@ export const checkoutEventsTestScenarios = [ | |
timestamp: '2024-11-06T02:54:50.000Z', | ||
anonymousId: '50ead33e-d763-4854-b0ab-765859ef05cb', | ||
}, | ||
{ | ||
anonymousId: '50ead33e-d763-4854-b0ab-765859ef05cb', | ||
context: { | ||
integration: { | ||
name: 'SHOPIFY', | ||
}, | ||
library: { | ||
name: 'unknown', | ||
version: 'unknown', | ||
}, | ||
traits: { | ||
address: { | ||
address1: 'Yuimaru Kitchen', | ||
address2: '6', | ||
city: 'Johnson City', | ||
company: null, | ||
country: 'United States', | ||
country_code: 'US', | ||
country_name: 'United States', | ||
customer_id: 7358220173425, | ||
default: true, | ||
first_name: 'henry', | ||
id: 8715246862449, | ||
last_name: 'waffles', | ||
name: 'henry waffles', | ||
phone: null, | ||
province: 'Tennessee', | ||
province_code: 'TN', | ||
zip: '37604', | ||
}, | ||
adminGraphqlApiId: 'gid://shopify/Customer/7358220173425', | ||
billingAddress: { | ||
address1: 'Yuma Proving Ground', | ||
address2: 'suite 001', | ||
city: 'Yuma Proving Ground', | ||
company: null, | ||
country: 'United States', | ||
country_code: 'US', | ||
first_name: 'yodi', | ||
last_name: 'waffles', | ||
latitude: 33.0177811, | ||
longitude: -114.2525392, | ||
name: 'yodi waffles', | ||
phone: null, | ||
province: 'Arizona', | ||
province_code: 'AZ', | ||
zip: '85365', | ||
}, | ||
currency: 'USD', | ||
email: '[email protected]', | ||
firstName: 'yodi', | ||
lastName: 'waffles', | ||
shippingAddress: { | ||
address1: 'Yuimaru Kitchen', | ||
address2: '6', | ||
city: 'Johnson City', | ||
company: null, | ||
country: 'United States', | ||
country_code: 'US', | ||
first_name: 'henry', | ||
last_name: 'waffles', | ||
latitude: 36.3528845, | ||
longitude: -82.4006335, | ||
name: 'henry waffles', | ||
phone: null, | ||
province: 'Tennessee', | ||
province_code: 'TN', | ||
zip: '37604', | ||
}, | ||
state: 'disabled', | ||
tags: '', | ||
taxExempt: false, | ||
taxExemptions: [], | ||
verifiedEmail: true, | ||
}, | ||
}, | ||
integrations: { | ||
SHOPIFY: false, | ||
}, | ||
type: 'identify', | ||
userId: '7358220173425', | ||
}, | ||
], | ||
}, | ||
}, | ||
|
@@ -1696,6 +1845,85 @@ export const checkoutEventsTestScenarios = [ | |
timestamp: '2024-11-06T02:54:50.000Z', | ||
anonymousId: '50ead33e-d763-4854-b0ab-765859ef05cb', | ||
}, | ||
{ | ||
anonymousId: '50ead33e-d763-4854-b0ab-765859ef05cb', | ||
context: { | ||
integration: { | ||
name: 'SHOPIFY', | ||
}, | ||
library: { | ||
name: 'unknown', | ||
version: 'unknown', | ||
}, | ||
traits: { | ||
address: { | ||
address1: 'Yuimaru Kitchen', | ||
address2: '6', | ||
city: 'Johnson City', | ||
company: null, | ||
country: 'United States', | ||
country_code: 'US', | ||
country_name: 'United States', | ||
customer_id: 7358220173425, | ||
default: true, | ||
first_name: 'henry', | ||
id: 8715246862449, | ||
last_name: 'waffles', | ||
name: 'henry waffles', | ||
phone: null, | ||
province: 'Tennessee', | ||
province_code: 'TN', | ||
zip: '37604', | ||
}, | ||
adminGraphqlApiId: 'gid://shopify/Customer/7358220173425', | ||
billingAddress: { | ||
address1: 'Yuma Proving Ground', | ||
address2: 'suite 001', | ||
city: 'Yuma Proving Ground', | ||
company: null, | ||
country: 'United States', | ||
country_code: 'US', | ||
first_name: 'yodi', | ||
last_name: 'waffles', | ||
latitude: 33.0177811, | ||
longitude: -114.2525392, | ||
name: 'yodi waffles', | ||
phone: null, | ||
province: 'Arizona', | ||
province_code: 'AZ', | ||
zip: '85365', | ||
}, | ||
currency: 'USD', | ||
email: '[email protected]', | ||
firstName: 'yodi', | ||
lastName: 'waffles', | ||
shippingAddress: { | ||
address1: 'Yuimaru Kitchen', | ||
address2: '6', | ||
city: 'Johnson City', | ||
company: null, | ||
country: 'United States', | ||
country_code: 'US', | ||
first_name: 'henry', | ||
last_name: 'waffles', | ||
latitude: 36.3528845, | ||
longitude: -82.4006335, | ||
name: 'henry waffles', | ||
phone: null, | ||
province: 'Tennessee', | ||
province_code: 'TN', | ||
zip: '37604', | ||
}, | ||
state: 'disabled', | ||
taxExemptions: [], | ||
}, | ||
}, | ||
integrations: { | ||
SHOPIFY: false, | ||
}, | ||
type: 'identify', | ||
userId: '7358220173425', | ||
}, | ||
], | ||
}, | ||
}, | ||
|