-
Notifications
You must be signed in to change notification settings - Fork 114
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 (#3282)
* feat: adding custom properties support to bluecore * Update src/cdk/v2/destinations/bluecore/utils.js Co-authored-by: Sankeerth <[email protected]> * fix: small fix --------- Co-authored-by: Sankeerth <[email protected]>
- Loading branch information
1 parent
0b57204
commit 8592e66
Showing
6 changed files
with
129 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 = [ | ||
{ | ||
|
@@ -296,17 +296,23 @@ export const ecomTestData = [ | |
customer: { | ||
age: '22', | ||
email: '[email protected]', | ||
anonymousId: '9c6bd77ea9da3e68', | ||
id: 'user@1', | ||
phone: '9112340375', | ||
}, | ||
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,8 +385,11 @@ export const ecomTestData = [ | |
JSON: { | ||
properties: { | ||
distinct_id: 'user@1', | ||
product_id: '123', | ||
customer: { | ||
age: '22', | ||
anonymousId: '9c6bd77ea9da3e68', | ||
id: 'user@1', | ||
}, | ||
products: [ | ||
{ | ||
|
@@ -389,9 +398,11 @@ export const ecomTestData = [ | |
property2: 'value2', | ||
}, | ||
], | ||
property1: 'value1', | ||
property2: 'value2', | ||
token: 'dummy_sandbox', | ||
}, | ||
event: 'wishlist', | ||
token: 'dummy_sandbox', | ||
}, | ||
userId: '', | ||
}), | ||
|
@@ -406,8 +417,11 @@ export const ecomTestData = [ | |
JSON: { | ||
properties: { | ||
distinct_id: 'user@1', | ||
product_id: '123', | ||
customer: { | ||
age: '22', | ||
anonymousId: '9c6bd77ea9da3e68', | ||
id: 'user@1', | ||
}, | ||
products: [ | ||
{ | ||
|
@@ -416,9 +430,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 = [ | ||
{ | ||
|
@@ -140,6 +140,9 @@ export const trackTestData = [ | |
customer: { | ||
age: '22', | ||
email: '[email protected]', | ||
anonymousId: '9c6bd77ea9da3e68', | ||
id: 'user@1', | ||
phone: '9112340375', | ||
}, | ||
products: [ | ||
{ | ||
|
@@ -155,9 +158,11 @@ export const trackTestData = [ | |
quantity: 3, | ||
}, | ||
], | ||
property1: 'value1', | ||
property2: 'value2', | ||
token: 'dummy_sandbox', | ||
}, | ||
event: 'TestEven001', | ||
token: 'dummy_sandbox', | ||
}, | ||
userId: '', | ||
}), | ||
|
@@ -216,13 +221,19 @@ 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]', | ||
anonymousId: '9c6bd77ea9da3e68', | ||
id: 'user@1', | ||
phone: '9112340375', | ||
}, | ||
}, | ||
event: 'TestEven001', | ||
token: 'dummy_sandbox', | ||
}, | ||
userId: '', | ||
}), | ||
|
@@ -283,11 +294,17 @@ export const trackTestData = [ | |
distinct_id: '[email protected]', | ||
customer: { | ||
age: '22', | ||
anonymousId: '9c6bd77ea9da3e68', | ||
email: '[email protected]', | ||
id: 'user@1', | ||
phone: '9112340375', | ||
}, | ||
product_id: '123', | ||
property1: 'value1', | ||
property2: 'value2', | ||
token: 'dummy_sandbox', | ||
}, | ||
event: 'optin', | ||
token: 'dummy_sandbox', | ||
}, | ||
userId: '', | ||
}), | ||
|
@@ -346,13 +363,19 @@ export const trackTestData = [ | |
JSON: { | ||
properties: { | ||
distinct_id: '[email protected]', | ||
product_id: '123', | ||
property1: 'value1', | ||
property2: 'value2', | ||
token: 'dummy_sandbox', | ||
customer: { | ||
age: '22', | ||
anonymousId: '9c6bd77ea9da3e68', | ||
id: 'user@1', | ||
email: '[email protected]', | ||
phone: '9112340375', | ||
}, | ||
}, | ||
event: 'unsubscribe', | ||
token: 'dummy_sandbox', | ||
}, | ||
userId: '', | ||
}), | ||
|
@@ -405,9 +428,12 @@ export const trackTestData = [ | |
JSON: { | ||
properties: { | ||
distinct_id: '54321', | ||
token: 'dummy_sandbox', | ||
customer: { | ||
age: '22', | ||
email: '[email protected]', | ||
anonymousId: '9c6bd77ea9da3e68', | ||
id: 'user@1', | ||
}, | ||
products: [ | ||
{ | ||
|
@@ -423,9 +449,10 @@ export const trackTestData = [ | |
quantity: 3, | ||
}, | ||
], | ||
property1: 'value1', | ||
property2: 'value2', | ||
}, | ||
event: 'TestEven001', | ||
token: 'dummy_sandbox', | ||
}, | ||
userId: '', | ||
}), | ||
|