Personalization Hub Manual / Version 2301
Table Of ContentsCreate a fragment file
P13NExperience.fragment.graphql
underpackages/graphql-layer/src/queries/fragments
fragment P13NExperience on P13NExperience { baseline { ...CMTeasable } variants { id target { ...CMTeasable } } }
To enable the fragment preview, modify the file
packages/graphql-layer/src/queries/FragmentPreview.query.graphql
, to include the p13n experience fragment:query FragmentPreview($contentId: String!) { content { content(id: $contentId) { // other fragments here ...P13NExperience } } }
Modify in the same way other fragments where the p13n experience can appear. For example, modify
PageGridPlacement.fragment.graphql
so that a p13n experience on a page grid is personalized.