Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to add custom Facets and Elements to Sitecore.Analytics.Model.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<model>
<elements>
<element interface="Sitecore.Analytics.Model.Entities.IContactAddresses, Sitecore.Analytics.Model" implementation="Sitecore.Analytics.Model.Generated.ContactAddresses, Sitecore.Analytics.Model"/>
...
<element interface="ISlayTitans.CMS.xDB.Interfaces.Facets.IKeyInteractionsFacet, ISlayTitans.CMS" implementation="ISlayTitans.CMS.xDB.Facets.KeyInteractionsFacet, ISlayTitans.CMS" />
<element interface="ISlayTitans.CMS.xDB.Interfaces.Elements.ISwatchDownloadedElement, ISlayTitans.CMS" implementation="ISlayTitans.CMS.xDB.Elements.SwatchDownloadedElement, ISlayTitans.CMS" />
<element interface="ISlayTitans.CMS.xDB.Interfaces.Elements.IVideoPlayedElement, ISlayTitans.CMS" implementation="ISlayTitans.CMS.xDB.Elements.VideoPlayedElement, ISlayTitans.CMS" />
<element interface="ISlayTitans.CMS.xDB.Interfaces.Elements.ISampleOrderElement, ISlayTitans.CMS" implementation="ISlayTitans.CMS.xDB.Elements.SampleOrderElement, ISlayTitans.CMS" />
</elements>
<entities>
<contact>
<factory type="Sitecore.Analytics.Data.ContactFactory, Sitecore.Analytics" singleInstance="true" />
<template type="Sitecore.Analytics.Data.ContactTemplateFactory, Sitecore.Analytics" singleInstance="true" />
<facets>
<facet name="Personal" contract="Sitecore.Analytics.Model.Entities.IContactPersonalInfo, Sitecore.Analytics.Model" />
...
<facet name="KeyInteractions" contract="ISlayTitans.CMS.xDB.Interfaces.Facets.IKeyInteractionsFacet, ISlayTitans.CMS" />
</facets>
</contact>
</entities>
</model>
</sitecore>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment