Showing posts with label Analytics. Show all posts
Showing posts with label Analytics. Show all posts

Thursday, March 17, 2016

Hedgehog Persona Tool Part VI

(Squared Euclidean) Distance and going the extra mile to get it.

In my previous blog post I touched on the concept of Squared Euclidean Distance between patterns. So what is this Distance and why do we care? It is the numerical representation of a difference between two Sitecore patterns. Going back to an example from Persona Tool let's look at several patterns:


The yellow one almost maxes out on Analytics but quite low on Customer Relations and Campaigns and Targeting keys. The pink one is obviously very different: high on Innovation and Customer Relations and very low on Technology and Analytics. If we were to find out how we can measure this difference we would use Sitecore's GetDistance method from Sitecore.Analytics.Patterns namespace in Sitecore.Analytics assembly. I decompiled this method and this is what it looks like:



Pattern's Space.Dimensions is a number of Profile Keys. In our case it would be 6. Following the logic we see that each Profile Key value is compared between the two patterns and this result is multiplied by itself. Then added to a cumulative value which is our distance.

Here's a snapshot from watching two keys and how they compare to each other. The first key ([0]) happens to be Analytics.


Here's a great blog post on visualizing pattern cards by Adam Conn. You can download his module and watch the current visit's pattern change before your eyes!

Hedgehog Persona Tool takes this process of pattern matching to a whole new level. As previously discussed, Sitecore patterns are preset, and may not accurately reflect visitor behavior. You can compare this process to a conference planning: you expect visitors from certain states and prepare badges (Pattern Cards) for them with state names. But as visitors come you might realize that some of them arrive from totally different areas and your badges (Pattern Cards) are irrelevant. The Hedgehog Persona Tool allows us to see the accurate visitor behavior in real time. Each visit stored in Mongo is turned into a pattern, matched against other patterns and then assigned to a cluster with similar patterns for a much more detailed and accurate analysis.

If you'd like more information about persona development and marketing strategy, reach out to Hedgehog Digital Marketing Innovation Team.




Tuesday, February 2, 2016

Hedgehog Persona Tool Part I

Do we really know our visitors?

Profile and Pattern Cards can be very useful, but using them the first time requires that the marketers make a lot of assumptions about their visitors. Marketers create an initial series of Profile and Pattern Cards and as visitors navigate the site they are matched to one of these established cards. Sitecore does that by calculating Squared Euclidean distance between a visit’s pattern and each Pattern Card. This distance is expressed in a numerical value (double). Whichever pattern happens to be “closest” is the one the visitor is assigned to.

There’s a great project you can download and play with. http://www.launchsitecore.net/ I installed it on the Sitecore 8.0 (rev. 150621) and connected it to MongoDB 3.0. I also added more Profile Keys and one additional Pattern Card. In the example below we have a Developer Pattern Card. Sitecore creates a radar chart representing the card.



As I navigate the Launch Sitecore site I am matched to the very Pattern Card we were looking at: Developer.



The question is – how does a marketer know what the actual pattern for the visit looks like? Sitecore determined the closest pattern and essentially forces it upon the visit. What if erroneous assumptions were made? What if there are large groups of visitors that don’t even come close to either of the established Pattern Cards?

My project began with this idea in mind, because it would be great if there was a tool that could help us accurately gather this information. The program that I am currently developing from Hedgehog Development was originally masterminded by Mike Edwards. The tool looks at all visits to your site, determines their patterns and groups them together depending on the Squared Euclidean Distance between the patterns decided by the user. At the maximum possible distance all patterns are aggregated and averaged into one grouping that represents an average visitor to a given site. As the distance is decreased more groups are formed with patterns differing from each other by that new, smaller distance. What’s great is that a user can lay the groups over their Sitecore Pattern Cards and visualize the difference.

The screen shot below shows an average visit to my site. The radar chart displays all Profile Keys for this Profile (such as Analytics, Technology, etc). The grouping tells us what percentage of visits were aggregate into this grouping, how many visits the percentage represents, and a value for each Key.


I can "turn on" one of my Pattern Cards (Content Owner for instance) and see the difference between my average visitor and a Pattern Card. This is incredibly helpful to understanding my users and the content they are looking at on my site.



The tool is currently undergoing enhancements to make it more informative, intuitive, and to offer additional features.

If you'd like more information about persona development and marketing strategy, reach out to Hedgehog Digital Marketing Innovation Team.

Saturday, January 3, 2015

THINK BIG Sitecore 8 Mongo DB.

The time has come to start experimenting with Sitecore 8 and its powerful Analytics. Download is available here: https://dev.sitecore.net/en/Downloads/Sitecore_Experience_Platform/8_0/Sitecore_Experience_Platform_8_0.aspx

Since I chose to use SIM to install it I had to rename the zip file to "sitecore 8.0 rev. 141212"

I was particularly interested in Experience Profile where I can obtain a wealth of information about a specific visitor: their goals met, their score, value per visit, pages visited, etc, etc, etc. My assumption was that there would be some out of the box visitor information, at least a list of visitors. But the list was blank. The problem was that to use any Sitecore analytics I had to wire up the Mongo DB first.

Instructions I followed came from


There was a problem I encountered with installation.




Because I was only testing it on my local environment I could skip several steps in the process, such as moving the Mongo DB folder to another location or setting it up as a service. Setting up as a service allows automatic start of the Mongo DB when I power up my machine. But if you don't mind manually running the exe file then it's not an issue. The connection strings were set up automatically which was a bonus. 

The next step was to install MongoVue (http://www.mongovue.com/) It allows visualization into the database after you add a connection. 


I set a simple goal (home page visit event) and went to the site in the browser. The next step is going to Sitecore dashboard and click on Experience Profile. From there you can navigate to any visitor (provided there are some).



The overview tab on a visitor detail page is where achieved goals are listed (under Latest Events). 



One more thing. I needed set the session timeout to 1 min instead of the default 20 minutes in the web config file. Otherwise I'd have to wait for 20 minutes for analytics data to be reflected in the profile. 

<sesstionState mode="InProc" cookieless="false" timeout="1">

Thursday, October 23, 2014

MV TESTING

Followed the steps in the documentation. Seems really nice and simply. One interesting point: MV test takes precedence over personalization. What I mean is this: if I have personalization set up on a component, for example if my pattern is Developer I see "Welcome to out Developers!" text widget. But if I am a Marketer I see "Welcome to our Marketers!" copy. But in my test I have a third copy "Welcome to all!". When I run my test on this page even though the text widget is configured to change its content (text) depending of a visitor pattern it won't! Because the logic behind the test is to flip copy to a different variant, without keeping track of patterns.

As I write this I am running a test and periodically hopping all over the site to see a different copy but so far I haven't...Not a good thing. Where is my next variant? BRB

Ok..I don't like this. I only see the first variant. Either my test is configured to proceed to next variant after a certain time that hasn't expire yet OR...I have no clue why it's not doing it :(

Wednesday, October 22, 2014

DMS Profiling, Personalization Based on a Pattern Card

I continue to swim in the open waters of Sitecore Digital Marketing System.

PROFILING. I know, it's not politically correct but I'll do it anyway. I set a new profile and made 4 profile cards and 4 pattern cards. My questions form the start was: are they related? Do engagement value points have to match one for one between them? The answer seemed to be no, but I was not able to see the patter matching happening. I was clicking on all the right pages (developer) but none of the patterns seemed to match. Until I updated the value points to be exactly the same between corresponding cards and patterns.

I.E. Profile card called Developer has values 1,2, 7, therefore Pattern card for Developer should also have 1,2, 7 for engagement value points.

I discovered that visitor's profile changes as user navigates the site. I originally assumed that once it reaches a certain "status" it keeps it. But it doesn't. The pattern changes between the pattern cards defined on the site depending on which pages I click.

In the API you can get to the same profile collection two different ways. From the current visit itself or through a current visitor.

var visitorProfiles = Sitecore.Analytics.Tracker.Visitor.CurrentVisit.Profiles;
var visitProfiles = Tracker.CurrentVisit.Profiles;

Then to actually match the pattern I iterate though all profiles:

var personaProfile = Tracker.CurrentVisit.Profiles.Where(profile => profile.ProfileName == evaluatorTypeProfile.Name).FirstOrDefault();

            if (personaProfile != null)
            {
                 // load the details about the matching pattern card
                 Item patternCard = Sitecore.Context.Database.GetItem(new ID(personaProfile.PatternId));
                 if (patternCard != null)
                 {
                        //DO YOUR MAGIC HERE
                  }
             }




PERSONALIZATION BASED ON A PATTERN CARD

This is such a quick and visual way personalize based on visitor's pattern. Once I had my profile and cards set up I made a custom condition on a component like this:

in Page Editor click the component. Click Personalize icon and make a new condition like this:

where the current visit matches the Developer pattern pattern card in the Visitor Categories profile

Text in blue is my actual Pattern Card and Profile. Then for this condition I chose a different datasource. Reloaded the page and I checked my current pattern. Happened to be Developer, just like in the condition. And the text inside my personalized component changed accordingly. Success!