What’s new about goals in Sitecore 8

Hello Folks,

Disclaimer — All Information in this Blog is using Sitecore 8 Technical Preview. So, it may change upon final release

I recently got the opportunity to play around with Sitecore 8 and hence thought about sharing some exciting new features of Sitecore 8 Experience Platform. 

Since there is a lot of exciting stuff in SItecore 8, I chose to focus on specific areas of Experience Platform and the topic for this post is Goals.

1. Customer Intelligence Options 

A new section has been added to the Goal Item (/sitecore/system/Marketing Center/Goals/) with the name Customer Intelligence Options.There are 3 fields on the sections and they are

Track as latest event Once the goal is triggered by the contact (visitor) it appears in the Latest Events panel in the Contact tab.
Show in events When this event is triggered by the contact (visitor) it appears in the list of Events shown in the Visits tab.
Event image Associates an image with an event.

The below image shows the new customer intelligence section on the Goal Item

Goal Item

Goal Item

 

As you can see below that the contact card will display the Goal information if you checked the field “Track as Latest Event” on the goal

Experience Profile Contact

Contact Card

As you can see below that the contact card will display the Goal information if you checked the field “Show in Events” on the goal item

Experience Profile2

Contact Card 2

2. API Changes : Triggering a Goal Programatically

There also have been changes to the API for triggering goal in Sitecore 8, The below method shows an updated way to trigger a goal programatically


 if (Sitecore.Analytics.Tracker.IsActive && Sitecore.Analytics.Tracker.Current.CurrentPage != null)
   {
       Sitecore.Data.Items.Item GoaltoTrigger = Sitecore.Context.Database.GetItem("{Item ID of the Goal}");
       if (GoaltoTrigger != null)
       {
           Sitecore.Analytics.Data.Items.PageEventItem registerthegoal = new Sitecore.Analytics.Data.Items.PageEventItem(GoaltoTrigger);
           Sitecore.Analytics.Model.PageEventData eventData = Sitecore.Analytics.Tracker.Current.CurrentPage.Register(registerthegoal);
           eventData.Data = GoaltoTrigger["Description"];
          Sitecore.Analytics.Tracker.Current.Interaction.AcceptModifications();
       }
   }

you could also create an extension method for triggering/registering a goal.


 public static void TriggerGoal(string GoalName, string Description)
  {
      if (Sitecore.Analytics.Tracker.IsActive && Sitecore.Analytics.Tracker.Current.CurrentPage != null)
      {
         Sitecore.Analytics.Tracker.Current.CurrentPage.Register(GoalName, Description);
      }
  }

Stay tuned for more exciting posts

Should you have any questions, Please do not hesitate to comment below

Advertisements
Posted in Technology. Tags: . 2 Comments »

2 Responses to “What’s new about goals in Sitecore 8”

  1. Sitecore 8 : Overview of Experience Profile | Horizontal Integration Says:

    […] events that appear in the Latest events group are preconfigured in the Content Editor, Please follow this blog to know more […]

  2. kalimaddula Says:

    Hi Sheetal,

    I’ve used your code to trigger the goal. It’s been successfully executed without any errors but i’m not able to view the changes in the Experience profile. I enabled the checkbox properties to track the visits as well. Could you please let me know Is there any way to view that changes.

    Thanks & Regards,
    Kali Krishna


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: