Create personalized page

PREREQUISITES: You have created one or more user segments. For more information, see For developers: Create segments.
Personalizing a page gives you the opportunity to serve different content to different types of users (user segments). You can build set of rules on which the user segments are based. You can then create different versions of the pages of your website. 
This sample code demonstrates how to create a personalized page:

C#
>using System;
>using System.Collections.Generic;
>using System.Linq;
>using System.Text;
>using System.Threading.Tasks;
>using Telerik.Sitefinity.Personalization.Impl;
>namespace Telerik.Sitefinity.Documentation.CodeSnippets.DevGuide.SitefinityEssentials.Personalization
>{
>    public partial class PersonalizationSnippets
>    {
>        public static void CreatePersonalizedPage(Guid personalizationMasterId, Guid segmentId)
>        {
>            var personalizationManager = PersonalizationManager.GetManager();
>            personalizationManager.CreatePersonalizedPage(personalizationMasterId, segmentId);
>            personalizationManager.SaveChanges();
>        }
>    }
>}
>```   
> You need to pass the *personalizationMasterId* and the *segmentId* as parameters. *PersonalizationMasterId* is a property of the **PageData**. The *PersonalizationMasterId* parameter is the ID of the page, for which the personalized version is created.  
> For more information on getting the **PageData**, see [For developers: Query pages](slug://for-developers-query-pages).  
> After a page is personalized, the system displays *Personalized*link in the pages grid. If you click the link, you can see all available personalization versions of a page. To view a personalized version of the page in a browser, click it.
Want to learn more?
Enhance your Sitefinity skills by enrolling in free training sessions. Become Sitefinity certified through Progress Education Community to strengthen your professional credentials.
New to Sitefinity?