-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Personalize][Initializers] Move XP tracking API examples to separate add-on initializer #980
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, see some comments.
Overall, I'm noticing we still have a lot of duplicated code in Layout.tsx
accross initializers. We are duplicating to include either <VisitorIdentification/>
or <CdpIntegrationScript/>
as follows:
<VisitorIdentification/>
should be added when nextjs-styleguide-tracking is included<CdpIntegrationScript/>
should be added when nextjs-personalize is included
Maybe we need a new abstraction here (similar to <Navigation />
?) that makes these inclusions independent of Layout.tsx
?
Note we should have more flexibility with in this PR.
We will also need to apply same treatment to nextjs-sxa
add-on.
packages/create-sitecore-jss/src/initializers/nextjs-personalize/index.ts
Outdated
Show resolved
Hide resolved
packages/create-sitecore-jss/src/initializers/nextjs-styleguide-tracking/index.ts
Outdated
Show resolved
Hide resolved
packages/create-sitecore-jss/src/initializers/nextjs-styleguide-tracking/index.ts
Outdated
Show resolved
Hide resolved
packages/create-sitecore-jss/src/initializers/nextjs-styleguide-tracking/index.ts
Outdated
Show resolved
Hide resolved
packages/create-sitecore-jss/src/initializers/nextjs/prompts.ts
Outdated
Show resolved
Hide resolved
packages/create-sitecore-jss/src/templates/nextjs-styleguide-tracking/data/dictionary/en.yml
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome 👍
Description / Motivation
inquirer
, dave into source code of other libs which implement controls)nextjs-styleguide
nextjs-styleguide-tracking
andnextjs-personalize
are created togethernextjs-styleguide-tracking
is created withoutnextjs-styleguide
/tracking
pageScripts
component in order to do not duplicateLayout
componentTesting Details
Types of changes