Published: 07 December 2015

So you want to configure a goal in Sitecore that is triggered when a visitor goes to a specific page or number of pages on your website? It feels like this should be the most easy thing to do but bizarrely its not that straight forward or intuitive so I thought I’d write a quick guide to show you how.

As with most things in Sitecore there are a number of ways to do things but this way seemed to be fairly simple to follow. For the purposes of this tutorial I am setting up a goal to measure if a user views our Personalisation and Segmentation page.

First go to the page in Content Editor mode and make a note of the Page ID of the page you are trying to set the goal up for. You’ll find this ID as a long string of numbers and letters at the top of the ‘Quick Info’ section of the page surrounded in parenthesis brackets (see pic below).

Next go back to the Sitecore dashboard and go in to the Marketing Control Panel.

On the left you will see ‘Goals’ as part of the content tree. It will probably already have a number of example Goals in there that come as part of Sitecore when installed. It is worth noting that these are not set up or pre-configured though so don’t expect them to be working unless you have gone in to each of them and defined their rules.

You create a new goal by selecting the Goals icon on the left and then clicking the ‘Goal’ button on the right or the ‘Goal’ option on the insert list in the toolbar.

The next window will ask you to simply give your Goal a name. This is simply for reporting purposes so just call it something meaningful.

Once you have created a goal, you should probably at least assign a number of points that you are going to attach to this goal. This would be relative to the way you score all your goals and will be the subject of a future article so I won’t cover it in any more detail here. 

Next scroll down to ‘Rules’ and select the ‘Edit rule’ link.

To create a goal attached to a page we need to know the page’s ID. Sitecore simply considers a page an ‘item’ so its no good looking for ‘page’ or ‘url’ when trying to find this rule. The one we are looking for is ‘where the item ID compares to value’.

The simplest way to find the appropriate rule is to type ‘id’ in to the search box at the top to filter the long list to just the few that are probably relevant. 

Click on ‘where the item ID compares to value’ and it should add this as your first rule to the lower half of this panel.

Select ‘compares to’ and set it to ‘is equal to’ in the pop up window and hit ‘OK’ to close the window.

Then select ‘value’ and in the pop up window paste (or type) the page ID of the page we are measuring (without the parentheses) and hit OK. You should have this Page ID noted (or you copied it) from the first step of this tutorial. If not open a new window in your browser and go back to the content tree to get it.

If you get this right it should now display the page’s name in the rule as per the screen grab below.

If you wanted this Goal to be triggered when a user viewed a number of different pages, you can add additional rules with different page ID’s by simply selecting the ‘where the item ID compares to value’ rule at the top and it will add it as an additional rule below. Remember to change the ‘and’ to an ‘or’ though.

If you have a page or a selection of pages that all use a particular page template. You can use this similar method but use the ‘where the item template is specific template’ rule instead. 

Close this panel by hitting OK. Finally Save and Publish you’re your Goal. Depending on Workflow and Permissions for your site you may need to publish the relevant page(s) too.

Another common issue when setting up goals is you may see at the top of the Goal panel that the Goal will not be published as it is ‘not in the final workflow step’. You may need to go to the ‘Review’ tab in the toolbar and ‘Deploy’ this Goal in order for it to be published and start recording.

I hope you have found this short tutorial useful and it has perhaps set you on the right path with configuring goals.

Goal measurement and configuration is the first step in learning about you users behaviour on the website. Through scoring these goals correctly and feeding them in to an Engagement Plan we use these goals to drive Personalisation of customer journeys.

If you have any questions then please email us at or maybe we can help you further with some Sitecore training?

Paul Stephen

Page Name: {% PageName %}

Page Template: {% PageTemplate %}

CampaignID: {% AgentReferrer.ID %}

CampaignName: {% AgentReferrer.Name %}

CampaignPhone: {% AgentReferrer.Phone %}

Item Location: {% PageLocation %}

Search Session Exists: False