-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adding custom properties support to bluecore
- Loading branch information
1 parent
0b57204
commit e0eb9a0
Showing
6 changed files
with
105 additions
and
20 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
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 |
---|---|---|
|
@@ -73,7 +73,7 @@ const commonOutputHeaders = { | |
'Content-Type': 'application/json', | ||
}; | ||
|
||
const eventEndPoint = 'https://api.bluecore.com/api/track/mobile/v1'; | ||
const eventEndPoint = 'https://api.bluecore.app/api/track/mobile/v1'; | ||
|
||
export const ecomTestData = [ | ||
{ | ||
|
@@ -297,16 +297,19 @@ export const ecomTestData = [ | |
age: '22', | ||
email: '[email protected]', | ||
}, | ||
product_id: '123', | ||
products: [ | ||
{ | ||
id: '123', | ||
property1: 'value1', | ||
property2: 'value2', | ||
}, | ||
], | ||
property1: 'value1', | ||
property2: 'value2', | ||
token: 'dummy_sandbox', | ||
}, | ||
event: 'viewed_product', | ||
token: 'dummy_sandbox', | ||
}, | ||
userId: '', | ||
}), | ||
|
@@ -379,6 +382,7 @@ export const ecomTestData = [ | |
JSON: { | ||
properties: { | ||
distinct_id: 'user@1', | ||
product_id: '123', | ||
customer: { | ||
age: '22', | ||
}, | ||
|
@@ -389,9 +393,11 @@ export const ecomTestData = [ | |
property2: 'value2', | ||
}, | ||
], | ||
property1: 'value1', | ||
property2: 'value2', | ||
token: 'dummy_sandbox', | ||
}, | ||
event: 'wishlist', | ||
token: 'dummy_sandbox', | ||
}, | ||
userId: '', | ||
}), | ||
|
@@ -406,6 +412,7 @@ export const ecomTestData = [ | |
JSON: { | ||
properties: { | ||
distinct_id: 'user@1', | ||
product_id: '123', | ||
customer: { | ||
age: '22', | ||
}, | ||
|
@@ -416,9 +423,11 @@ export const ecomTestData = [ | |
property2: 'value2', | ||
}, | ||
], | ||
token: 'dummy_sandbox', | ||
property1: 'value1', | ||
property2: 'value2', | ||
}, | ||
event: 'add_to_cart', | ||
token: 'dummy_sandbox', | ||
}, | ||
userId: '', | ||
}), | ||
|
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 |
---|---|---|
|
@@ -55,6 +55,10 @@ const commonOutputCustomerProperties = { | |
first_name: 'Test', | ||
last_name: 'Rudderlabs', | ||
sex: 'non-binary', | ||
anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', | ||
db: '19950715', | ||
gender: 'non-binary', | ||
phone: '+1234589947', | ||
address: { | ||
city: 'Kolkata', | ||
state: 'WB', | ||
|
@@ -71,7 +75,7 @@ const anonymousId = '97c46c81-3140-456d-b2a9-690d70aaca35'; | |
const userId = 'user@1'; | ||
const sentAt = '2021-01-03T17:02:53.195Z'; | ||
const originalTimestamp = '2021-01-03T17:02:53.193Z'; | ||
const commonEndpoint = 'https://api.bluecore.com/api/track/mobile/v1'; | ||
const commonEndpoint = 'https://api.bluecore.app/api/track/mobile/v1'; | ||
|
||
export const identifyData = [ | ||
{ | ||
|
@@ -118,8 +122,8 @@ export const identifyData = [ | |
properties: { | ||
distinct_id: '[email protected]', | ||
customer: { ...commonOutputCustomerProperties, email: '[email protected]' }, | ||
token: 'dummy_sandbox', | ||
}, | ||
token: 'dummy_sandbox', | ||
event: 'customer_patch', | ||
}, | ||
}), | ||
|
@@ -302,8 +306,9 @@ export const identifyData = [ | |
properties: { | ||
distinct_id: 'user@1', | ||
customer: { ...commonOutputCustomerProperties, email: '[email protected]' }, | ||
token: 'dummy_sandbox', | ||
}, | ||
token: 'dummy_sandbox', | ||
|
||
event: 'identify', | ||
}, | ||
}), | ||
|
@@ -361,8 +366,8 @@ export const identifyData = [ | |
properties: { | ||
distinct_id: '54321', | ||
customer: { ...commonOutputCustomerProperties, email: '[email protected]' }, | ||
token: 'dummy_sandbox', | ||
}, | ||
token: 'dummy_sandbox', | ||
event: 'customer_patch', | ||
}, | ||
}), | ||
|
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 |
---|---|---|
|
@@ -86,7 +86,7 @@ const commonOutputHeaders = { | |
'Content-Type': 'application/json', | ||
}; | ||
|
||
const eventEndPoint = 'https://api.bluecore.com/api/track/mobile/v1'; | ||
const eventEndPoint = 'https://api.bluecore.app/api/track/mobile/v1'; | ||
|
||
export const trackTestData = [ | ||
{ | ||
|
@@ -155,9 +155,11 @@ export const trackTestData = [ | |
quantity: 3, | ||
}, | ||
], | ||
property1: 'value1', | ||
property2: 'value2', | ||
token: 'dummy_sandbox', | ||
}, | ||
event: 'TestEven001', | ||
token: 'dummy_sandbox', | ||
}, | ||
userId: '', | ||
}), | ||
|
@@ -216,13 +218,16 @@ export const trackTestData = [ | |
JSON: { | ||
properties: { | ||
distinct_id: '[email protected]', | ||
product_id: '123', | ||
property1: 'value1', | ||
property2: 'value2', | ||
token: 'dummy_sandbox', | ||
customer: { | ||
age: '22', | ||
email: '[email protected]', | ||
}, | ||
}, | ||
event: 'TestEven001', | ||
token: 'dummy_sandbox', | ||
}, | ||
userId: '', | ||
}), | ||
|
@@ -285,9 +290,12 @@ export const trackTestData = [ | |
age: '22', | ||
email: '[email protected]', | ||
}, | ||
product_id: '123', | ||
property1: 'value1', | ||
property2: 'value2', | ||
token: 'dummy_sandbox', | ||
}, | ||
event: 'optin', | ||
token: 'dummy_sandbox', | ||
}, | ||
userId: '', | ||
}), | ||
|
@@ -346,13 +354,16 @@ export const trackTestData = [ | |
JSON: { | ||
properties: { | ||
distinct_id: '[email protected]', | ||
product_id: '123', | ||
property1: 'value1', | ||
property2: 'value2', | ||
token: 'dummy_sandbox', | ||
customer: { | ||
age: '22', | ||
email: '[email protected]', | ||
}, | ||
}, | ||
event: 'unsubscribe', | ||
token: 'dummy_sandbox', | ||
}, | ||
userId: '', | ||
}), | ||
|
@@ -405,6 +416,7 @@ export const trackTestData = [ | |
JSON: { | ||
properties: { | ||
distinct_id: '54321', | ||
token: 'dummy_sandbox', | ||
customer: { | ||
age: '22', | ||
email: '[email protected]', | ||
|
@@ -423,9 +435,10 @@ export const trackTestData = [ | |
quantity: 3, | ||
}, | ||
], | ||
property1: 'value1', | ||
property2: 'value2', | ||
}, | ||
event: 'TestEven001', | ||
token: 'dummy_sandbox', | ||
}, | ||
userId: '', | ||
}), | ||
|