Create a Goal
This article will briefly cover the topic of Goals in Sitecore and it will also introduce the concept of Engagement Value. A goal in Sitecore, like everything in Sitecore, starts with an Item. Below is a goal you’ll be able to find in your Sitecore site at /sitecore/system/Marketing Center/Goals/Newsletter Signup:
A goal is a simple item defining fields for Name, Points, Category and Description. Points are a core concept of the Digital Marketing System—Engagement Value. By assigning Points to a Goal, you are defining a relative scale for the conversions within your Web site. While a Newsletter Signup currently has 0 points assigned (though you might decide this goal is more valuable), other goals like Instant Demo or a purchase on your site, might carry a higher Points value. It is beyond the scope of this article to discuss the strategy in determining goals for your site, but assigning a point score to your goals will automatically be reflected in the Analytics reports available from Sitecore.
There are several ways to assign a goal to an event in Sitecore. This article will briefly describe the following:
- A visitor visits a page for which a Goal has been assigned
- Prebuilt modules (Web Forms for Marketers) assigning a Save Action for a Goal achievement
- Using the API to define that a Goal has been achieved
1). The simplest way to define that a Goal has been achieved is to assign it to a page in Sitecore. Since any item that has presentation details defined can be a reachable page in Sitecore, this becomes simply setting a value of a field of an item. This field can be edited in either the Content Editor or Page Editor interface (assuming the Attributes Chunk of the Analyze menu is available to the current user). For instance, in the Content Editor, navigate to an article in Launch Sitecore (i.e., /sitecore/content/Home/Articles/CMS/Fundamental Articles/The Launch Sitecore Site). In the top menu, on the Analyze menu, in the Attributes Chunk, there is a Goals Button. Clicking on the Goals button will bring up a checklist that shows all currently defined Goals from the Marketing Center.
You could assign any of these Goals to the currently selected article. In a real-world scenario, this could be a “Thank You” page where a visitor is sent to after completing some transaction, or this could be a landing page that I’m hoping to attract visitors to, or it could even be a custom 404 error page (a Goal could even be what would otherwise be described as a failure….while there are Page Events to model this, I just wanted to drive home the point that Goals are for you to define).
2) Sitecore (and from our Shared Source offering, developers from the community) builds a number of modules that are closely tied to the Digital Marketing System. One of the most popular of these modules is the Web Forms for Marketers module, available at: http://sdn.sitecore.net/Products/Web%20Forms%20for%20Marketers.aspx. The goal of this module is to introduce significant form building capability into the content authoring user interfaces. While the module won’t be fully described here, it is easy to install and try in your test environment. The WFFM module contains a number of prebuilt “Save Actions” (what happens when a Form is submitted). It also allows you to easily create a goal that can be achieved when the form is submitted (or refer to an already created goal from the Marketing Center). A screenshot of one of the Wizard steps from WFFM is below:
3) The Engagement Analytics API Reference Guide available on the Sitecore Developers Network (http://sdn.sitecore.net) has descriptions of the available classes in the Sitecore.Analytics assembly. Take some time to understand the Analytics database schema (which includes Visitors, Visits, Pages, Page Events, etc). The system allows you to programmatically register page events (including Goals) as well as tag individual sessions with additional information for Analytics reports. The following couple lines of code will get you started thinking about how you might register some of these page events programmatically:
Sitecore.Analytics.Data.PageEventData ped = new Sitecore.Analytics.Data.PageEventData("Newsletter Signup");