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. Content suggested using Mavention Suggested Content After deploying the Solution Package, three Features are installed.

Configuring Web Application

First there is the WebApplication-scoped Feature called “Mavention Visitor Tracking Web Application Configuration”. The Mavention Visitor Tracking Web Application Configuration Feature in the list of Web Application Features As I mentioned in my previous article, the log of all visits can grow pretty quickly and using a SharePoint List for storing the log is a pretty bad idea. Instead, the Mavention Suggested Content uses a custom database to store the log. After activating the Mavention Visitor Tracking Web Application Configuration Feature a new SPDatabase is created.

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”. The Mavention Visitor Tracking Feature in the list of Site Collection Features Activating this Feature enables tracking visits within this Site Collection. Every time a user visits a page, an entry will be added to the tracking database.

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. The Mavention Visitor Tracking Web Parts Feature in the list of Site Collection Features In my previous article I discussed how the relevance of suggested content depends on the analysis of logged visits. In this version Mavention Suggested Content uses a fairly simple mechanism, where it looks up all users who have previously visited particular page, and then counts up all other pages that have been visited the most. Using the configuration settings of the Suggested Pages Web Part you can configure how many suggested pages should be displayed. Configuring the number of suggested pages to be displayed in the properties of the Suggested Pages Web Part

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)

Others found also helpful: