Ratio - Header
Blog Optimisation

Using machine learning to make your content work harder

24.01.2019

Today I’m going to try to achieve the impossible: distil the scale and complexity of machine learning into something that hopefully broadly makes sense to someone new to the subject.

This is intended to be a guide for marketers and not an in-depth data science and technical configuration thesis. What you should take away from this article is:

  • How to explain machine learning in simple terms
  • Begin to understand how machine learning (even at a simple level) can help solve marketing challenges of scale, cost and management
  • Some sample machine learning scenarios related to you
  • How the data and technology all fits together
  • What you’ll need to achieve your first project

Are you sitting comfortably? Then let’s begin. 

What is this “machine learning” of which you speak?

Well that’s the big question isn’t it? 

Is it artificial intelligence, is it chat bots, is it Cognitive computing…. Is it teaching your laptop how to fetch a stick? 

Well in essence machine learning is best considered as a subset of the AI landscape. In the context of the marketing world, it’s really about learning how successful outcomes are achieved in your digital channels: what are users doing successfully, how can we learn from that, and then how can we take other users through a similar successful journey.

This will make a bit more sense as we run through some examples. For starters though, let’s use an analogy, because everyone loves an analogy….

An analogy (not a car one, for once)

I like to think of machine learning as a bit like a child playing with those little bricks that they have to try to fit into holes of different shapes.

toys child

Essentially you’re chucking the bricks at a child, telling him to work out which brick goes into which hole, and then keep chucking bricks at him until it has tried enough combinations that eventually he knows which brick goes into which hole.

Machine learning really is the same concept. Machine learning is like a blank newborn baby’s brain with nothing in it, and nothing that it CAN do UNTIL we feed it with information and tell it what we want it to achieve.

To be clear, It is NOT some magic ball that we can chuck all our data at and expect it to come back and tell us our fortune. That would be wonderful though, wouldn’t it.

To break that down a bit further, you’re feeding information and a task into the “brain”. In our example that’s the parent giving the child the toys and telling him the objective: to get the right bricks in the right holes. In the digital world that might be learning which content produces the best outcome for a particular CTA goal.

Then the brain (or in our case the Azure Machine Learning platform) keeps taking more and more bricks (data from the website) and then working out which elements and paths achieve our objective and which don’t.

So you might find that certain types of content directly contribute to our goal, whereas other types have no impact or even a negative impact (such as bouncing off the site).

Once our brain has done enough training to have statistical probability that a particular action is more likely to achieve our objective than another, it’s then able to tell us (or rather our website) what to show to the next user who has similar traits.

Where does data fit into this?

That’s a very good question.

As you’ve probably gathered by now, this process starts with data and lots of it. I’ll talk a bit more about this in a minute.

Your data is fed into your machine learning model. It’s the nutrition. The food. The chow. The model then trains itself based on the data it’s receiving, and which combinations of content, journeys etc are getting to the success objective or goal you’ve defined.

optimisation process

Once the machine is up and running there is also a process of ongoing optimisation against your target, some of which the model will continue to do as it processes more and more data, and some of which your data experts will want to refine based on the performance of the content recommendations being served. As with anything with personalisation and testing, it needs love and attention to work hardest for you.

So what sort of models could I consider?

Before we press on into more of the detail of setting up machine learning for the first time, I want to quickly run through three common examples of how content recommendations could work. Again, don’t worry too much about the science behind this: I’m writing for a marketing audience.

Frequently bought together, which is the Amazon-style recommendation where we know that a content item such as an article is frequently viewed by users along with another content item in a visit. We can then identify this as high value content and serve recommendations to other users on the same journey.

Item to item is more of a content relationship model, whereby we’re looking at attributes such as ratings and categories and matching them up so that people who view one type of content will be served content of similar attributes.

User to item recommendations are those where we are looking at the past profile of a particular user and then recommending the next best content for them based on their history. Essentially we’re getting into the creation of audience types here.

Isn’t this a bit advanced?

If you’re looking at this slide and thinking “but we’re not even doing basic personalisation”, you’re not alone. We did a presentation on machine learning at a recent financial services event, and one of the questions we got from an attendee was “We’re still grappling with personalisation – this is way beyond our capability. We want to get the basics done first”.

And for some people that’s right. For some people machine learning is going to be premature. It might be a lack of data, it might be a lack of skills internally or within the agency, it might be time, and so on and so on.

However, Machine learning ironically also helps to solve some of those blockers as well. 

The long awaited example…

Let’s take a look at a hypothetical legal client called Bodgett & Scarpa. The digital manager at Bodgett is fairly typical for a professional services marketing representative, with a lot of challenges that we see in B2B organisations that keep pumping out thought leadership content but have no real idea which articles (or subject matters) are actually driving value for them. These challenges might be:

  • We are a legal firm with hundreds of thought leadership articles, loosely tagged with metadata
  • We have no real way of tracking which audience segments are engaging with our content
  • We have no analytics about which content is driving further onward engagement
  • We have no idea of the most valuable content or service to show the user next

So let’s take a look at a typical basic scenario they might want to solve as their first foray into machine learning, and begin by defining the objective:

“We want to know which of our content is performing best for our Brexit audience in the UK to drive them through to our highest value content or CTA based on what previous users have successfully converted on”

So a fairly straightforward scenario, and one that Azure’s Machine learning Recommendations model can be used to achieve reasonably quickly.

Data data data data

Now that we have our objective, the foundation is our data. Without this we have nothing to feed our machine learning “brain” with. 

We need to understand what data we have and where it sits. If you’re a Sitecore marketer then the chances are you have xDB turned on, which is the user data collection database. This will be running in the background collecting basic data about your users such as number of visits, pages viewed, inbound traffic source and so on. 

You’ll probably also want to then be configuring goals and events so that you can start to collect meaningful information about valuable journeys, conversion points, traffic channels and so on. This will all stem from whatever you have defined as your success objective for your project.

You may also consider enriching your xDB data with other data you hold about known users in platforms such as CRM. For example, you may want to classify a user in Sitecore as a cold, warm or hot lead and then pass this information into your machine learning brain to see how different sales lead types behave.

Finally you’ll want to consider how you extract data from Sitecore and GA in the first place and manipulate this to make sure that the model you’re creating is backed up by data, but also the impact can be measured on the other end of the process.

For all of this you’re going to need an experience data analyst who knows their way around your platform and analytics, and can make sure that your thinking and hypotheses are validated rather than guesses.

As you get more advanced you’ll also want to consider how you support more complex scenarios, at which point you start getting into hardcore data science and the need for deep mathematical and statistical specialists to support the creation of your ML models. However let’s not burden ourselves with that too much for now.

Don’t forget the human element

Whilst data is the foundation of machine learning, don’t forget the “Why”.

By which I mean the human element – we can see what journeys people are taking, but without understanding WHY then we may be missing the rationale for this. For example, users may have a specific mindset or need when they’re arriving at our site, at different points in our journey, whether they are a customer or not, and so on.

Consider doing research and user testing to truly understand the audience and motivations. Also look at competitor research. Your competitors might not always be right, but you may notice signs of clear engagement (e.g. comments, ratings) that have been driven by factors such as clearer signposting, content structure or tone of voice. A common problem is using internal jargon for navigation that mean nothing to the average user.

What data is available to us?

In the Sitecore world (and indeed most currently CMS/experience platforms of similar nature) you’ll be collecting a bunch of data out of the box such as:

  • Content viewed
  • Country of origin
  • Goals triggered
  • Audience profile matched
  • And more… for example, other data you’ve already integrated such as CRM profile values for a user

You’ll also have your content (or item) data set up as well. This will be things like category/taxonomy, region, topic, metadata and so on.

Now we have our objective and we have some understanding of how we think people will get to our data, so we can build out a data model for our machine learning platform that consists of the facets we have available to us. In this example it will be something like:

  • Audience
  • Country
  • Category of content viewed
  • Pages viewed
  • Goals

 So let’s take that item-to-item model I spoke about earlier.

Item to Item model

So the model we’re looking at here is essentially matching the attributes of content the user is looking at to the attributes of other content. We’re plugging this data into our Machine learning model so that we can evaluated the data based on this, and then come up with a “best match” content recommendation.

 machine learning diagram

This is a basic visual representation of how that works. We’ve got our categories along the horizontal axis (I only have two here as this is a very simple model) and along the vertical axis is the content rating.

Our model is looking for correlation for a best match, which in this case is the result in green in the top right.

The model can then fire this information back to Sitecore and Sitecore can then display the content ID in the “recommended content” component of the page the user is sitting on (or a subsequent page).

Very basic, but you get the idea.

“Frequently bought together”

If we look at another example, we want to show content based on what other similar users are looking at. If I take myself as an example, I have browsed around the site reading content about Brexit and Politics and getting extremely irate.

frequently bought together

This information is shunted into our machine learning model and it’s saying “aha, I can see that we have other similar users who’ve viewed the same kind of content and they have ended up on our EU whitepaper page, so let’s serve that to Steve”.

Again, simple examples, but it shows a good starting point where you’re producing a lot of content but aren’t sure how users are navigating around or what is generating the most value for you.

This is all just working off the provision of a constant stream of data that is continually being processed so that the result is as relevant and up to date as possible.

Why Azure Machine Learning?

Due to the amount of data processing involved and the ability to plug Sitecore into another Machine learning engine using existing APIs, we at Ratio would tend to advocate the use of best of breed technologies to ensure the most robust data processing capability and also the ability to scale.

Azure’s Machine learning service specifically is a mature platform with easy connectivity to data sources, which of course enables that movement of data to support our process. It’s also of course a well known platform and also an Enterprise platform with live applications in multiple industries of all sizes, giving you the confidence in your investment. Finally the scale is almost unlimited when it comes to the amount of data that needs to be crunched.

Someone asked me recently if you can run your ML service on-premise… the answer is that there are a few solutions out there that claim to offer this, but for most businesses this will be time and cost prohibitive, and well as skills prohibitive, so unless there is a very good reason then stick to cloud.

I’m just going to give you a quick glimpse under the hood into the Azure ML model configuration guide. It’s unlikely that as a marketer you will ever even look at this – this will be something that your Data and Technical team will set up based on your requirements – but I wanted to show you the actual model that does all of this data processing.

machine learning flow

At a base level it’s a bit like creating a drag and drop flow diagram, but there are a huge amount of attribute and configuration options and it can end up getting complex very quickly. 

Once you have your model set up and your initial data in it, you’ll need to put your model live and ready for use. This is a process of just deploying it as a web services to connect to your web platform.

Data can then start passing between the two platforms, and your content recommendations will start coming back into your on-site content recommendation components.

What you’ll need

1. Sitecore xDB collecting data, or other data collection tool e.g. Tealium

2. Data collection points configured (e.g. audience types, goals, content categorisation)

3. Objectives set

4. Data expert (or data scientist as you get more advanced)

5. An ML subscription to a service such as Azure ML

6. An ML developer (e.g. Python developer) for Azure ML configuration

 

To summarise…

1. Understand the data you’re collecting

2. Define your goals

3. Prepare the data and your website components

4. Connect your data via API

5. Create the Azure ML model

6. Deploy the web service

7. Measure and optimise

And finally

Hopefully this was a useful machine learning 101 guide. This topic is complex and wide-ranging topic with hundreds and thousands of different uses, but this should give you an insight into how you can start to use the technology to automate your content marketing efforts.