Posts

Showing posts from September, 2020

Using Sitecore FXM to update and track contacts

Image
Sitecore Federated Experience Manager aka FXM is a great feature to utilize some of the Sitecore's CMS, marketing and analytics capabilities on non-Sitecore websites. If you are new to FXM you can read more about how to integrate FXM into your non-Sitecore website and utilize its capabilities on  Sitecore's FXM documentation page . While the well-known uses of FXM are to add placeholders to pages to show Sitecore content, track click action, assign marketing attributes and track goals, the area FXM lacks out of the box is contact tracking and updates. The FXM's scbeacon JavaScript API has following three methods you can use trackEvent trackGoal trackOutcome You can read more about these methods in the documentation . As you can see there is no out of the box API method to identify or update contact. In cases where you have a non-authenticated public website on Sitecore but an authenticated member portal on non-Sitecore website it would be really useful to pass the authentic

Sitecore Content Search API - Random Search Results using Solr

More often than you think you may get a requirement to show random related content on a page, whether it's related news articles for news website or related sale items for an eCommerce website or friend suggestions for a social networking website. This is a common requirement in eCommerce where we want to cross sell items from the same category as the current item. Most of the RDBMS databases have this feature built-in to return a random results for a select query, however Sitecore uses search providers to get its results which makes this little tricky to achieve. In this article I will show how to achieve this using the Sitecore's default search provider Solr . Solr comes with a RandomSortField out of the box which you can use to sort results randomly. You will need to pass random_{RandomValue}  or  {RandomValue}_ random  as value for sort parameter to get your search results sorted randomly. However, for the same sort value the results are always sorted in the same order. So