all things Sitecore related

Tested: Sitecore Wildcards and DMS statistics

By on June 6, 2012 in DMS, Rules Engine, Sitecore with 5 Comments

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 (*).

Tested: Sitecore Wildcards and DMS statistics image thumb4

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.

Tested: Sitecore Wildcards and DMS statistics image thumb5

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:



//The following constants must match tokens defined in Sitecore
const string TOKEN_PRODUCT_DETAIL = "%Product Detail%";

private List<NameValueCollection> GetSampleData()
{
var list = new List<NameValueCollection>();
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;
}


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.

Tested: Sitecore Wildcards and DMS statistics image thumb6

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.

Tested: Sitecore Wildcards and DMS statistics image thumb7

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.

Tags: , , , , , , ,

About the Author

About the Author: Pieter is Technical Marketing Manager for Sitecore Netherlands and owner of Gaatverweg.nl. He has more than ten years experience with software developing in multiple programming languages and with different Content Management Systems. Before joining Sitecore Pieter was a lead developer for multiple Sitecore and .Net projects, he joined Sitecore in 2011 as an Solution Architect in The Netherlands, after two years as an Solution Architect he joined the Technical Marketing department. In the role as Techinical Marketing Manager he is responsible for the Global MVP program and the Sitecore technical branding strategy. You can follow Pieter on twitter: @pieterbrink123 or Google+ .

Subscribe

If you enjoyed this article, subscribe now to receive more just like it.

There Are 5 Brilliant Comments

Trackback URL | Comments RSS Feed

Sites That Link to this Post

  1. (@pieterbrink123) (@pieterbrink123) | June 6, 2012
  2. (@Sitecore_nl) (@Sitecore_nl) | June 7, 2012
  3. (@SitecoreFR) (@SitecoreFR) | June 7, 2012
  4. regarding sitecore (@regardsitecore) | June 7, 2012
  5. (@sitecorenz) (@sitecorenz) | June 11, 2012

Post a Comment

Your email address will not be published. Required fields are marked *

Top