Skip to main content

Posts

Showing posts from June, 2023

Part 2: Keycloak Integration with Sitecore

Part 2: Keycloak Integration with Sitecore This blog will cover the process of setting up Keycloak with Sitecore content management, building upon the explanation provided in the Part 1 blog on Keycloak Integration with Sitecore . Step 1: Configure OpenID Connect Create a pipeline processor to configure OpenID connect to talk to Keycloak identity providers. public class KeycloakIdentityProvider : IdentityProvidersProcessor { protected override string IdentityProviderName => "keycloak"; private string ClientId => Settings.GetSetting(KeycloakSettings.ClientId, ""); private string ClientSecret => Settings.GetSetting(KeycloakSettings.ClientSecret, ""); private string Authority => Settings.GetSetting(KeycloakSettings.Authority, ""); private string MetadataAddress => Settings.GetSetting(KeycloakSettings.MetadataAddress, ""); private string RedirectURL => Settings.GetSetting(Ke

Create a Custom Page View Event for Interactions

Create a custom page view event for interactions Once the user visit with the website, Sitecore creates new contact into "[website_Xdb.Collection.Shard0].[xdb_collection].[Contacts]" or "[website_Xdb.Collection.Shard1].[xdb_collection].[Contacts]". Contact could be known or unknown.  When the user will interact with the website all interactions will be saved into "[website_Xdb.Collection.Shard0].[xdb_collection].[Interactions]" or "[website_Xdb.Collection.Shard1].[xdb_collection].[Interactions]" for particular contact as you can see ContactId in Interactions table. For each interaction, it is mandatory to have one event. All events you can see in the "Events" field inside the interaction table in JSON format. In the event JSON, out of the box, the page view event looks like the below JSON: In this case, if you want to create your custom PageViewEvent and want to add more fields then you can follow the below steps: Create a Custom Facet