I am trying to set up some Personalization using profile and pattern cards. I have done the below steps to achieve this:
- Create profile keys, profile card, and pattern card.
- Associate the target content items with profile cards.
- Setup Personalization rule to match a specific pattern on the home page banner component and change the banner image if a user visits specific page and revisits the home page.
- Publish all the above changes.
Problem **: **I see personalization working fine in master DB but not in web DB even after me publishing all the above changes. Any Idea?
I see all the above items in web DB by switching. The only difference is the content items where we tag profile cards have a different icon as below
Below is the caching rules applied to the component being personalized:
I see some errors getting logged at the line Tracker.Enabled
var interactionProfile = Tracker.Current.Interaction.Profiles["VisitorType"];
if (interactionProfile != null)
Item matchingPattern = Context.Database.GetItem(interactionProfile.PatternId?.ToString("D"));
if (matchingPattern != null)
Persona persona = GetPersonaDataObject() ?? new Persona();
persona.VisitorId = Tracker.Current.Contact?.ContactId.ToString("N");
persona.ProfileKey = matchingPattern.Name;
persona.DatasourceName = datasourceName;
Set and Get Persona Object is used to add data to HttpContext.Current.Items . In the component being personalized we call another method which would access these context items and add inside a script tag for google analytics.