Taxonomy in Sitecore module aims to support your marketing strategy and provide a consistent way of organising your content in Sitecore. Version 2.2 is compatible with Sitecore version 10.4.
Once the taxonomy tags are defined, you can easily classify your Sitecore Content Items by assigning the appropriate tags and start creating personalisation rules based on them. This will empower you to serve the relevant content for the target audience(s) while using Sitecore Experience Analytics to measure traffic, engagement value and outcomes.
As soon as this is all setup, you can get more insights on how visitors are interacting with your website and its content. This is very important for your marketing strategy as you continue to learn and adjust this over time in accordance with the continual cycle: test, learn, adjust and re-test.
The module ships the following Taxonomy defined around the programming languages and their types & classifications:
- Programming Language
- Programming Language Type
- Programming Classification
A base Content template has a "Programming Language" Multilist with Search field to assign the relevant Taxonomy tags.
Taxonomy field name can be specified in a config file. There is a TaxonomyField setting in ..\src\Foundation\TaxonomyInSitecore\App_Config\Include\TaxonomyInSitecore.config
, so that you can easily reference to your custom taxonomy field.
Continuing the programming topic, Sitecore Profiles, presented in the module, are aligned with the Programming Classifications and implemented on the example of the next IT Professionals:
- Back-End Developer
- Front-End developer
- Full Stack Developer
Then the predefined Profile Cards are being associated to programming language Tags.
ProcessTaxonomyProfiles custom pipeline hooks into Sitecore.Analytics.Pipelines.ProcessItem.ProcessItemProcessor
pipeline to dynamically assign the relevant Profile Cards to the context item based on the linked tags to it.
Note, that there is no need to create a physical linkage between your Content Items and Profiles Cards as you can associate the required Profile Cards to Content Items and score the latter during the ProcessItemProcessor pipeline execution.
The genius of this approach is that you no longer need to assign the required Profile Cards to each Content Item individually. Instead, you just need to link them to your Taxonomy tags and then they will be inherited automatically via tags. As a result it will save you from the duplication of work and bring more efficiency to your content classification.
Tags View Rendering ..\src\Feature\TaxonomyComponents\Views\Taxonomy\Tags.cshtml
and TagList Controller Rendering ..\src\Feature\TaxonomyComponents\Views\Taxonomy\TagList.cshtml
list all tags assigned to an Item. Depending on your specific project requirements you can use either one.
Sitecore packages contain:
SQL package (../SQL scripts/
) contains the following script to support the taxonomy custom metric; when executing, follow the order they are listed below to make sure that the required SQL entities are present:
Fact_TaxonomyMetrics.sql
- creates a custom table in SQL;TaxonomyMetrics_Type.sql
- creates a type to manipulate the data in the custom table;Add_TaxonomyMetrics_Tvp.sql
- creates a stored procedure.
TaxonomyReporting project implements a custom Taxonomy report to review the overall tags performance and drill down to the individual tags - see the total number of visits and engagement value:
The implementation of the custom report consists of the below classes:
-
..\Models\TaxonomyMetrics.cs
defines a model for the taxonomy dimension and metrics; -
..\Aggregation\TagFactCalculator.cs
calculates the values of individual metrics defined in theTaxonomyMetrics
model, for example, number of visits and engagement value; -
..\Aggregation\TaxonomyResolver.cs
extends theIGroupResolver<T>
interface to determine tags associated with a visit and group records for dimension while implementing theMeasureGroupOccurrences()
method; -
..\Pipelines\RegisterTaxonomyPageEvent.cs
registers an event with tags associated with a visited page and store it in xDB.
- Include the TaxonomyInSitecore project to your Visual Studio solution;
- Define your Taxonomy structure;
- Create Data Templates relevant to your Taxonomy structure in your Sitecore instance on the example of the attached ones in the
Taxonomy Data Templates-1.0.zip
package; - Populate your Taxonomy with the relevant tags;
- Create Profiles and assign them to tags accordingly;
- Add a Taxonomy field to your content Data Templates and configure the ProcessTaxonomyProfiles custom pipeline by adding your Taxonomy field reference to
..\TaxonomyInSitecore\App_Config\Include\TaxonomyInSitecore.config
. Make sure that the config file is deployed to your Sitecore destination folder; - Assign the relevant tags to your content items. Adapt Renderings from the enclosed
Taxonomy Views-1.1.zip
package where applicable to render the relevant tags in the front-end for the Context Item. - Execute SQL-scripts from the SQL package (
../SQL scripts/
) for the Reporting DB; note that the executiuon order is important and please follow the order the scripts are listed above to make sure that the required table and type is created before calling it; - Configure a custom Dimension and a Metric for a Tag visit and its engagement value to support a custom report on Taxonomy performance (all configuration items are enclosed as Sitecore packages):
- in Master DB via the Marketing Control Panel
/sitecore/system/Marketing Control Panel/Experience Analytics/Dimensions/Visits/By taxonomy
/sitecore/system/Marketing Control Panel/Experience Analytics/Dimensions/Visits/By taxonomy/All visits by taxonomy
- in Core DB
/sitecore/client/Applications/ExperienceAnalytics/Common/System/ChartFields/FlexibleMetrics/Engagement value
- Configure the RegisterTaxonomyPageEvent pipeline by copying
..\TaxonomyReporting\App_Config\Include\TaxonomyReporting.config
into your final\App_Config\Include\
folder; - Deploy Page Events and Segments via Control Panel -> Deploy marketing definitions
Hope you found this module useful, your contributions and suggestions will be very much appreciated. Please submit a pull request.
The Taxonomy in Sitecore module is released under the MIT license what means that you can modify and use it how you want even for commercial use. Please give it a star if you like it and your experience was positive.