Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
eb8af40
initial
carson-campbell Jan 14, 2025
e00c01e
Add Datacloud Typescript sdk
carson-campbell Jan 15, 2025
44afb8e
datacloud
carson-campbell Jan 22, 2025
c5c2a93
Send Datacloud events for PLP and ProductImpressions
carson-campbell Jan 29, 2025
0d85bf3
initial
carson-campbell Jan 14, 2025
ebe00b4
Add Datacloud Typescript sdk
carson-campbell Jan 15, 2025
babc18e
datacloud
carson-campbell Jan 22, 2025
e57a5dc
Send Datacloud events for PLP and ProductImpressions
carson-campbell Jan 29, 2025
a0831df
Merge branch 'W-17405592.IntialDatacloudEvent' of https://github.com/…
carson-campbell Jan 29, 2025
15affac
Update site and add in pages for catalog events
carson-campbell Jan 29, 2025
db95768
Update use-datacloud.js
carson-campbell Jan 30, 2025
11f838b
error handling update
carson-campbell Jan 30, 2025
bfca24f
Update package.json
carson-campbell Jan 30, 2025
6f05e48
add unit test for usedatacloud hook
yunakim714 Feb 4, 2025
d3f736e
add all unit tests
yunakim714 Feb 4, 2025
ced0250
lint
yunakim714 Feb 4, 2025
30bfe7a
update retail app package-lock
yunakim714 Feb 12, 2025
fdf8ff4
fix retail app jest tests
yunakim714 Feb 12, 2025
d94c0fa
revert lock file changes
yunakim714 Feb 12, 2025
30e229c
update package lock
yunakim714 Feb 12, 2025
c8a8b60
revert package-lock changes
yunakim714 Feb 14, 2025
da2c19b
revert package lock changes
yunakim714 Feb 14, 2025
4ecb471
Update Changelog
yunakim714 Feb 14, 2025
fe2e008
revert all package-lock changes
yunakim714 Feb 14, 2025
8c1985e
Merge branch 'feature/datacloud-events' into W-17405592.IntialDataclo…
yunakim714 Feb 14, 2025
ea00fc5
lint
yunakim714 Feb 14, 2025
987fde8
Merge branch 'W-17405592.IntialDatacloudEvent' of github.com:Salesfor…
yunakim714 Feb 14, 2025
6e7349c
update retail package lock
yunakim714 Feb 14, 2025
a970e1e
resolve generated project lint errors
yunakim714 Feb 18, 2025
bbb7ec6
fix datacloud eventtype
yunakim714 Feb 18, 2025
a83af15
add customer no to registered customers
yunakim714 Feb 18, 2025
8746604
surface datacloud config values in generator script
yunakim714 Feb 19, 2025
2cc7c92
fix typo
yunakim714 Feb 19, 2025
1e1542e
update constructdatacloudproduct
yunakim714 Feb 19, 2025
beeedaf
add block comments to all methods
yunakim714 Feb 19, 2025
cec651f
push datacloud hook changes
yunakim714 Feb 19, 2025
cdb4b8b
lint
yunakim714 Feb 19, 2025
e75b1bd
remove contactpointemail from pageview event
yunakim714 Feb 20, 2025
314a161
update mock data
yunakim714 Feb 20, 2025
e2294a8
lint
yunakim714 Feb 21, 2025
f3b6f1a
move sdk initialization to constructor
yunakim714 Feb 26, 2025
a787967
DRY code
yunakim714 Feb 26, 2025
1cc04a0
move datacloud mock data to mocks module
yunakim714 Feb 26, 2025
1ec9988
fix syntax error
yunakim714 Feb 27, 2025
90ddf3f
Cleanup
yunakim714 Feb 27, 2025
62b9d61
update dnt behavior based on new guidelines
yunakim714 Feb 27, 2025
c86d825
log error and pass config as args
yunakim714 Mar 5, 2025
3659904
lint
yunakim714 Mar 5, 2025
43b6729
if DNT, do not send identity profile event
yunakim714 Mar 6, 2025
a8a54f1
bump bundle size max
yunakim714 Mar 6, 2025
663b93a
update deviceid and sessionid values
yunakim714 Mar 7, 2025
112cabc
usecurrentcustomer for customerid
yunakim714 Mar 7, 2025
d01e296
use js-cookie Cookies
yunakim714 Mar 7, 2025
0e605d6
fix tests
yunakim714 Mar 7, 2025
9271988
reduce bundle size
yunakim714 Mar 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@
"dependencies": {
"node-fetch": "^2.6.9"
}
}
}
1 change: 1 addition & 0 deletions packages/pwa-kit-create-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## v3.9.0-dev (Oct 29, 2024)
- Support Node 22 [#2218](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2218)
- Update `default.js` template to include new login configurations [#2079] (https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2079)
- Add Data Cloud API configuration to `default.js`. [#2229] (https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2229)

## v3.8.0 (Oct 28, 2024)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ module.exports = {
// By setting this to true, the Einstein activities generated by the environment will appear
// in production environment reports
isProduction: false
},
// Datacloud api config
dataCloudAPI: {
appSourceId: '{{answers.project.dataCloud.appSourceId}}',
tenantId: '{{answers.project.dataCloud.tenantId}}'
}
},
// This list contains server-side only libraries that you don't want to be compiled by webpack
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ const {handler} = runtime.createHandler(options, (app) => {
],
'connect-src': [
// Connect to Einstein APIs
'api.cquotient.com'
'api.cquotient.com',
'*.c360a.salesforce.com'
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ const {handler} = runtime.createHandler(options, (app) => {
],
'connect-src': [
// Connect to Einstein APIs
'api.cquotient.com'
'api.cquotient.com',
'*.c360a.salesforce.com'
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ module.exports = {
// By setting this to true, the Einstein activities generated by the environment will appear
// in production environment reports
isProduction: false
},
// Datacloud api config
dataCloudAPI: {
appSourceId: '{{answers.project.dataCloud.appSourceId}}',
tenantId: '{{answers.project.dataCloud.tenantId}}'
}
},
// This list contains server-side only libraries that you don't want to be compiled by webpack
Expand Down
22 changes: 16 additions & 6 deletions packages/pwa-kit-create-app/scripts/create-mobify-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ const RETAIL_REACT_APP_QUESTIONS = [
}
]

// Project dictionary describing details and how the gerator should ask questions etc.
// Project dictionary describing details and how the generator should ask questions etc.
const PRESETS = [
{
id: 'retail-react-app',
Expand Down Expand Up @@ -265,7 +265,9 @@ const PRESETS = [
['project.commerce.shortCode']: 'kv7kzm78',
['project.commerce.isSlasPrivate']: false,
['project.einstein.clientId']: '1ea06c6e-c936-4324-bcf0-fada93f83bb1',
['project.einstein.siteId']: 'aaij-MobileFirst'
['project.einstein.siteId']: 'aaij-MobileFirst',
['project.dataCloud.appSourceId']: '10a761d0-5d19-41fa-8681-0591d5884e27',
['project.dataCloud.tenantId']: 'g43g8zrvh1ytcztdmmzg8m3dh1'
},
assets: ['translations'],
private: false
Expand All @@ -290,7 +292,9 @@ const PRESETS = [
['project.commerce.shortCode']: 'kv7kzm78',
['project.commerce.isSlasPrivate']: false,
['project.einstein.clientId']: '1ea06c6e-c936-4324-bcf0-fada93f83bb1',
['project.einstein.siteId']: 'aaij-MobileFirst'
['project.einstein.siteId']: 'aaij-MobileFirst',
['project.dataCloud.appSourceId']: '10a761d0-5d19-41fa-8681-0591d5884e27',
['project.dataCloud.tenantId']: 'g43g8zrvh1ytcztdmmzg8m3dh1'
},
assets: ['translations'],
private: true
Expand All @@ -315,7 +319,9 @@ const PRESETS = [
['project.commerce.shortCode']: 'kv7kzm78',
['project.commerce.isSlasPrivate']: true,
['project.einstein.clientId']: '1ea06c6e-c936-4324-bcf0-fada93f83bb1',
['project.einstein.siteId']: 'aaij-MobileFirst'
['project.einstein.siteId']: 'aaij-MobileFirst',
['project.dataCloud.appSourceId']: '10a761d0-5d19-41fa-8681-0591d5884e27',
['project.dataCloud.tenantId']: 'g43g8zrvh1ytcztdmmzg8m3dh1'
},
assets: ['translations'],
private: true
Expand All @@ -340,7 +346,9 @@ const PRESETS = [
['project.commerce.shortCode']: 'xitgmcd3',
['project.einstein.clientId']: '1ea06c6e-c936-4324-bcf0-fada93f83bb1',
['project.einstein.siteId']: 'aaij-MobileFirst',
['project.commerce.isSlasPrivate']: true
['project.commerce.isSlasPrivate']: true,
['project.dataCloud.appSourceId']: '10a761d0-5d19-41fa-8681-0591d5884e27',
['project.dataCloud.tenantId']: 'g43g8zrvh1ytcztdmmzg8m3dh1'
},
assets: ['translations'],
private: true
Expand All @@ -365,7 +373,9 @@ const PRESETS = [
['project.commerce.shortCode']: 'performance-001',
['project.einstein.clientId']: '1ea06c6e-c936-4324-bcf0-fada93f83bb1',
['project.einstein.siteId']: 'aaij-MobileFirst',
['project.commerce.isSlasPrivate']: false
['project.commerce.isSlasPrivate']: false,
['project.dataCloud.appSourceId']: '10a761d0-5d19-41fa-8681-0591d5884e27',
['project.dataCloud.tenantId']: 'g43g8zrvh1ytcztdmmzg8m3dh1'
},
assets: ['translations'],
private: true
Expand Down
3 changes: 3 additions & 0 deletions packages/template-retail-react-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v6.1.0-dev
- Send PWA Kit events to Data Cloud [#2229] (https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2229)

## v6.0.0
- DNT Consent Banner: [#2203](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2203)
- Implemented opt-in Social & Passwordless Login features and fixed the Reset Password flow which now leverages SLAS APIs [#2079] (https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2079)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {useIntl} from 'react-intl'
import {Button} from '@salesforce/retail-react-app/app/components/shared/ui'
import ProductScroller from '@salesforce/retail-react-app/app/components/product-scroller'
import useEinstein from '@salesforce/retail-react-app/app/hooks/use-einstein'
import useDatacloud from '@salesforce/retail-react-app/app/hooks/use-datacloud'
import {useCurrentCustomer} from '@salesforce/retail-react-app/app/hooks/use-current-customer'
import useIntersectionObserver from '@salesforce/retail-react-app/app/hooks/use-intersection-observer'
import {useWishList} from '@salesforce/retail-react-app/app/hooks/use-wish-list'
Expand Down Expand Up @@ -41,6 +42,7 @@ const RecommendedProducts = ({zone, recommender, products, title, shouldFetch, .
const {data: customer} = useCurrentCustomer()
const {customerId} = customer
const {data: wishlist} = useWishList()
const datacloud = useDatacloud()

const createCustomerProductListItem = useShopperCustomersMutation(
'createCustomerProductListItem'
Expand Down Expand Up @@ -98,6 +100,13 @@ const RecommendedProducts = ({zone, recommender, products, title, shouldFetch, .
},
recommendations.recs.map((rec) => ({id: rec.id}))
)
datacloud.sendViewRecommendations(
{
recommenderName: recommendations.recommenderName,
__recoUUID: recommendations.recoUUID
},
recommendations.recs.map((rec) => ({id: rec.id}))
)
}
}, [isOnScreen, recommendations])

Expand Down
Loading
Loading