Cross-selling content on your SharePoint website with Mavention Suggested Content
What is Mavention Suggested Content?
Mavention Suggested Content is a solution for SharePoint 2010 that allows you to present content suggestions to your visitors.
Configuring Web Application
First there is the WebApplication-scoped Feature called “Mavention Visitor Tracking Web Application Configuration”.
Important: Deactivating the Mavention Visitor Tracking Web Application Configuration Feature will delete the database, so be sure that you have a backup of it.
Visits to all pages in all Site Collections within the Web Application will be logged to that database.
Configuring Site Collection
Next there is the Site Collection-scoped Feature called “Mavention Visitor Tracking”.
Important: In the current release only anonymous visits are logged. This allows you to prevent content editors from affecting content suggestions.
To properly support output caching, Mavention Suggested Content uses an HTTP Handler which is being called using JavaScript. This is a similar approach to what other web analytics services use.
Showing content suggestions
The last Feature provided with Mavention Suggested Content, called Mavention Visitor Tracking Web Parts, installs the Suggested Pages Web Part which you can use to display content suggestions to your users.
Tip: You can tweak the analysis mechanism of the Mavention Suggested Content solution by editing the proc_GetSuggestedPages stored procedure in the tracking database.
Formatting content suggestions
Presenting content suggestions should be an integral part of your website. To give you the most flexibility possible, the Suggested Pages Web Part uses XSLT to format the list of suggested pages. The Suggested Pages Web Part uses the following XML structure:
<ArrayOfSuggestedPageInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SuggestedPageInfo>
<Url>http://mavention/pages/about-mavention.aspx</Url>
<Title>About Mavention</Title>
<NumberOfVisits>1900</NumberOfVisits>
</SuggestedPageInfo>
<SuggestedPageInfo>
<Url>http://mavention/pages/who-are-mavens.aspx</Url>
<Title>Who are the Mavens?</Title>
<NumberOfVisits>1678</NumberOfVisits>
</SuggestedPageInfo>
</ArrayOfSuggestedPageInfo>
You can format it easily into an unordered list using the following XSLT snippet:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">
<ul>
<xsl:apply-templates select="//SuggestedPageInfo"/>
</ul>
</xsl:template>
<xsl:template match="SuggestedPageInfo">
<li>
<a href="{Url}">
<xsl:value-of select="Title"/>
</a>
</li>
</xsl:template>
</xsl:stylesheet>
Summary
Suggesting content on your website can help you get more content to your visitors. Mavention Suggested Content is a SharePoint 2010 solution that allows you to present content suggestions using information gathered from other visits. Although the solution is pretty simple and many improvements are possible it shows you how you could approach the process of gathering visit information and presenting content suggestions to your visitors. Download: Mavention Suggested Content (12KB, WSP)