In Sitecore you can personalize your website with conditions and actions using the Rules Engine (so called Conditional Rendering rules). In Sitecore 6.5 the interface for defining conditional rendering rules is integrated in to the page-editor, this way it´s easier for the marketeer to create and maintain pesonalization rules.
But as a developer you want to create predefined rules and activate them on the template standard values, the same way personalisation was working in Sitecore 6.4. This is still posible with 6.5 only by default the Personalisation section of the presentation component properties is hidden in Sitecore 6.5.
The following steps will enable the Personalisation section in the Presentation Component Properties dialog window.
Open the Content Editor, press the Sitecore Logo button on the top left and select Application Options.
In the Application Options dialog window go to the View tab. Underneath the Control Properties section, tick the checkbox Show Personalization Section and press Ok.
That´s it! The Personalization Section will be visible again.
With this test we want to check what Sitecore DMS does with Wildcards. How are Wildcard URL’s and shown on the Analytics Reports?
Wildcard items in Sitecore are a convenient way to handle dynamic URLs. They let you pass data through the URL instead of relying on query string values that are appended to the URL. More information about the Wildcards and a introduction to the Wildcard Shared Source Module can be found in this article (written by Adam Conn).
Creating a testing environment
For this testing environment I’ve installed the shared source Wildcard module. After installing the module I opened the Content Editor and created a ‘products’ item, underneath the products item I created a wildcard item (*).
Configure the Wildcard Module
Go to /sitecore/system/Modules/Wildcards/. Create a new token called ‘Product Detail’ in the Tokens folder. And create the a new route called ‘Product Route’ within the Routes folder. In the Product Route item add the Wildcard item (*) to the Items field and define the rule in the Rules field.
The Wildcard module comes with two Sublayouts; DisplayDynamicUrls and DisplayTokenValues. For this test we are going to use the DisplayDynamicUrls sublayout. We need to alter the GetSampleData() method in DisplayDynamicUrls.ascx.cs. Open the DisplayDynamicUrls.ascx.cs and navigate to the GetSampleData() method and change the code so it will look like the following code:
[code language=”csharp”]
//The following constants must match tokens defined in Sitecore
const string TOKEN_PRODUCT_DETAIL = “%Product Detail%”;
private List GetSampleData()
{
var list = new List();
list.Add(new NameValueCollection { { TOKEN_PRODUCT_DETAIL, “product1” } });
list.Add(new NameValueCollection { { TOKEN_PRODUCT_DETAIL, “product2” } });
list.Add(new NameValueCollection { { TOKEN_PRODUCT_DETAIL, “product3” } });
return list;
}
[/code]
Now add the DisplayDynamicUrls sublayout to the Layout Details of the products item.
The test
Generate analytics data
Open a new browser, clear all cookies (I use Chrome Incognito Window) and visit the products item. You can see that the DisplayDynamicUrls sublayout generates Sample links based on the Sample data you configured in the GetSampleData() method.
Click the Sample links and close the browser.
View the Latest Visit Report
Open the Latest Visits report in the Engagement Analytics and select the latest visit. In the bottom of report you can find the visited pages. You can see that Sitecore has logged the wildcard page visits.
The verdict
At this point there is no indication that Wildcards are causing any problems with Sitecore DMS statistics. This is a straight forward simple test without any other complex systems involved, implementing wildcard in combination with DMS on complex systems needs thorough testing before deployment. Consider creating a Proof of Concept before starting to developt your sollution.
Please leave a comment if you have experience with Wildcards and DMS in a more complex scenario.
Check the default subscriber profile by clicking the E-Mail Campaign node and go to the content folder. In the Implementation Details section check the selected profile in the Default SubsciberProfile field. By default this will be Profiles/Subscriber:
You can find the different profiles in the Profiles folder located at /sitecore/system/Settings/Security/Profiles/Subscriber in the Core database.
The Subscriber profile item is based on the Subscriber template. Open the /sitecore/templates/Modules/EmailCampaign/Subscriber template in the Template Manager and add a custom field called Hobby.
The hobby field will be added to the profile of the EmailCampaign Subscribers. Go to the User Manager, select a subscriber and click Edit. On the profile tab the hobby field will appear, insert a value into the hobby field.
Now let’s use the Hobby value to personalize the e-mail message.
There are two ways how you can use these fields within the e-mails. You can type $Hobby$ in a text field or within a richtext area you can select the field in the Insert Field dropdownlist.
To have the Insert Field options you need to add the Html Drop Down item to the toolbar of your Rich text profile or you can use the default Message profile by adding /sitecore/system/Settings/Html Editor Profiles/ Message Content to the source field of the rich text field.
Create a new e-mail in the EmailCampaign manager. And add the hobby fields to the E-mail by typing $Hobby$ or selecting hobby from the Insert Field dropdown in the rich text editor.
Save the change and close the Editor. Now reload your E-mail in the Message Preview tab and the $hobby$ field will be personalized and show my Hobby surfing.