Machine learning and remarketing are two very popular ways of enhancing marketing campaigns. Used in tandem, they can deliver much better business outcomes. This session reveals how to get started with machine learning-driven remarketing using R.
3. - The Explosion of Data
- Machine Learning
- Remarketing
- Why They Work Well Together
- How Google is Using ML for Remarketing
- Use Case:
- Using R for Remarketing
- Some Questions to Ask
- Summary
7. What is Machine Learning?
ARTIFICIAL INTELLIGENCE
An agent that perceives its environment and makes decisions to maximize
the chances of achieving a goal. Eg. Computer vision, natural language
processing,
MACHINE LEARNING
A subset of AI. “The science of getting computers to act without
being explicitly programmed.”
SUPERVISED
LEARNING
UNSUPERVISED
LEARNING
REINFORCEMENT
LEARNING
9. Machine Learning Connects People to Products & Services
In 2015, Pinterest acquired Kosei, a machine learning company that specialized in the
commercial applications of machine learning tech (specifically, content discovery and
recommendation algorithms).
Today, machine learning touches virtually every aspect of Pinterest’s business operations,
from spam moderation and content discovery to advertising and email newsletter
subscribers.
13. Machine Learning: In summary
• Machine Learning infers KNOWLEDGE from DATA
• It then generalizes this knowledge to unseen data
• ML can personalize the interactions we have with brands
• As a result, it is a hugely powerful development –in marketing and
elsewhere
19. Remarketing in a Nutshell
Engages customers who are already interested
Delivers a high ROI
Isn’t affected by ad blockers
Can have a limited shelf-life
Need to be wary of privacy laws
Safari has clamped down on cookie-based tracking
22. Why Do ML and Remarketing Fit Together?
Scale
Dynamic
Creative
Context
Multi-tasking
23. How ML Enhances Remarketing
In this example, the user is interacting with three value propositions and
the current state of his/her interactions are represented by the shaded
circles. The user has seen one impression of the first value proposition
(state 1), has downloaded the second value proposition (state 3), and has
not seen any impressions of the third (state 0).
24. Smart Lists Bring ML to Remarketing
Your site must be:
1.An e-commerce site
2.Generating 500 monthly transactions
3.Attract 10,000 daily pageviews
28. Using R for Remarketing
Need: CRM data, GAP logs, BigQuery
Potential Use: You could find a customer who recently visited your web
site, has a certain amount of historic spend with your e-commerce solution
or in your physical stores, and has shown behavior similar to previous high-
profit customers.
You may want to focus on such high ROI customers to realize an effective
“more-with-less” digital marketing strategy.
This may sound hard to put into practice, but in reality, many companies
already have sufficient data within their Google Analytics logs, corporate
databases, or CRM systems to realize this aspiration. The only missing piece
is a way to link and correlate those data sources in a scalable, timely, and
cost-effective way to extract intelligence for optimized digital marketing.
29. The Process
- Setup your website to capture the all-important Google Analytics Client
ID
- Use BigQuery to generate your own training dataset for creating a
statistical model
- Create a remarketing list based on your statistical predictive model,
again using the power of BigQuery
- Create an AdWords audience that will target only the website visitors
that are more likely to convert into a sale
Set up Analytics
Import
Data
Bind and
Clean Data
Create
Model
Create
Target List
Upload
Audience
32. Example: Business Insurance Provider
- The steps towards conversion are assigned a number. We will call this
field CV_stage
- A value of 3 means the customer has applied for a quote
- A value of 5 means they have taken out at least one policy
- We add a new variable with a value of either 1 or 0. We label this
variable CV_flag
- This provides the basis to develop a statistical model
1. Visits Site
2. Starts
App.
3. Submits
App.
4. Retrieves
Quote
5. Takes
Policy
33. Target Audience Characteristics
We want to analyse customers who:
- Took out a policy
- Live in Texas
- Work in a white collar profession
34. Variables for Assessment (Training Data)
Product page visited
Time on site
Browser used
Number of pages visited
Demographic targeting
Geographic targeting
Policy holder (Y/N)
35. Logistic Regression Model
•Yi is the objective variable, in this case the conversion success or
failure for each customer, i
•Xi is the explanatory variable
•alpha is the intercept and betai are the regression coefficients
•pi is predicting the conversion rate, which will be used in the
remarketing list
40. Some Questions to Consider
• How to ensure I don’t underfit/overfit to the data?
• Is my machine learning model robust against measurement noise?
• Is my model easily scalable to higher dimensions and/or to bigger
data set?
• Have we checked sufficiently for collinearity?
• How can we explain any outliers?
42. Summary: Machine Learning and Remarketing
- Machine Learning can interpret data and identify patterns in behaviour
that will lead to future actions.
- This makes it the perfect fit for a remarketing campaign.
- Google, Facebook, and Amazon are employing this technology and
providing access to all customers.
- We should therefore consider how we will find our own competitive
advantage in a level (if highly sophisticated) field.
- The ability to add our own data and create ML models is a fantastic way
to achieve this.
- Marketers should work closely with their data analysis teams to harness
the power of ML for remarketing.
46. Why Does Machine Learning Matter?
Google’s self-driving cars and robots get a
lot of press, but the company’s real future
is in machine learning, the technology that
enables computers to get smarter and
more personal. – Eric Schmidt
Hinweis der Redaktion
Welcome to this webinar on machine learning and remarketing.
This session will cover some different topics and specialisms to the other sessions during this course, but hopefully you will find them to be relevant to your jobs.
I imagine that there is a broad spectrum of familiarity within the group of attendees, from more to less familiar with the details of this presentation.
My aim is to provide an approachable, relatively brief introduction to both ML and remarketing, assuming that most will already be aware of what these disciplines entail.
My next objective is to show why and how ML and remarketing work together. I want to do this in two ways; first, I will look at how ML is being incorporated into advertising products like Google AdWords.
Second, I will look at how we can take the data from our analytics platforms and run our own analysis. These findings can then be re-uploaded in the form of audience lists, ready to use for remarketing.
We have extended the session by 30 minutes, as there is clearly quite a lot to get through.
With that said, let’s get started.
Lots of oil, but the combustion engine has not yet been invented
We are now fully into the age of ‘big data’. In 2017, this is how much data was created by people every single minute.
4 million searches on Google, 46,000 Uber trips, 3 million GBs of internet data in the US alone.
There are people, intentions, relationships behind every single one of these data points.
The challenge is trying to make sense of it all, turning it into something genuinely insightful or useful.
The most successful attempts have been driven by machine learning.
ML – Infers KNOWLEDGE from DATA
Then generalizes the observations to unseen data
Classification, regression
Clustering, recommendation
Reward maximization
Within the marketing industry, AI and ML have sometimes been conflated. In truth, ML is a subset of AI.
AI covers a range of uses of machines to carry out tasks, including the fields of NLP and deep learning.
The fascination is eternal; even the ancient Greeks told stories about machines that could mimic humans.
Machine Learning is an application of AI based on the idea that we should be able to give machines data and let them learn on their own. Algorithms are the building blocks of ML applications.
Supervised learning: We label data and input these to the system.
Unsupervised learning: We feed in data and allow the machine to categorize it
Reinforcement learning: Based on reward maximization
ML is everywhere and we see a lot of the same companies here that we saw at the beginning. The ones with most data to process are the ones most likely to use ML to harness its potential.
ML is a competitive advantage. Pinterest, while not as frequently cited as FB or Google, has grown at a phenomenal rate on the back of its adoption of ML.
We can get sidetracked by the theory, but today I also want to look at how exactly we can use ML to interpret data for uses like remarketing.
We will return to this process later, but for now suffice to say there are 5 stages to any ML project.
We gather and synthesize data, we clean the data to make sure it is comprehensible and standardized (this often takes a long time), we decide on the ML algorithm to use, we review the findings and, if they are significant, we visualize them and act on the outcomes.
In marketing, there are lots of ML applications in action every day.
ML is behind predictive analytics, which is particularly important for remarketing. We take historical data, the algorithm identifies patterns, and it predicts future actions, allowing us to make better decisions.
Sentiment analysis on product reviews or social media, document retrieval on Google is a machine learning application, and deep learning is increasingly used for visual search.
We could spend all day on ML, but let’s take a quick look at remarketing before getting on the examples.
Most of you will be familiar with RM, so I won’t labor the point. For those that aren’t familiar, the concept is really quite simple.
Remarketing, also known as retargeting, can dramatically increase your conversion rates and ROI. This is because past site visitors who are already familiar with your brand are much more likely to become customers or complete other valuable actions on your site.
We are still only scratching the surface with RM. In reality, it can be used to continue engaging with prospects at any stage of the funnel.
The more we can learn from past behaviors, the more effective our remarketing activities can be.
Remarketing in Google AdWords consists of static images, animated images, video, responsive ads, and text ads that are placed on the Google Display and Google Search Network. What makes remarketing different from standard Display and Search advertising is the targeting. Remarketing consists of using a special tracking code to place cookies on the browsers of people visiting your website, and then serving ads to those with that cookie, specifically, on the Display and Search network.
Standard remarketing – This AdWords feature allows you to show ads to your past visitors as they browse websites and apps on the Display Network.
Dynamic remarketing – A feature of AdWords that lets you show ads to past visitors that have any products or services they viewed on your site.
Remarketing for mobile apps – If someone used your mobile app or mobile website, AdWords will let you show ads to them when they use other mobile apps or are on other mobile websites.
Remarketing lists for search ads – This AdWords feature is also known as RLSA. It enables you to target past visitors on the Search Network. You can target and customize search ads for these past visitors while they search on Google and Google’s Search partner sites.
Video Remarketing – AdWords will allow you to serve ads to people who have interacted with your YouTube channel or other videos. You can serve them ads on YouTube or through Display Network videos and websites.
Email list remarketing – Also known as customer match, if you have a list of emails of your customers, you can upload them to AdWords. This feature enables you to serve ads to them if they are signed in to Google Search, Gmail, or YouTube.
Your ads are front and center in your leads’ Facebook feed: in other words, they occupy prime real estate.
Facebook remarketing isn’t impacted by ad blockers which are crippling most native ads these days.
Marketers have so much information at their fingertips through Facebook ads that they target exactly who they want.
There are 4 core reasons that ML and RM go so well together:
Scale. We have so much data and consumer behavior is very fragmented across channels.
Context: ML allows us to speak to customers at the right time, in the right place. This can be down to their device, the time of day, their stage in the purchase cycle. Importantly, ML algorithms increase in accuracy as they gain feedback.
Creative: Assets can now be created automatically to fir a user’s context. So, beyond the obvious targeting capabilities of RM, we can also ensure that we say the right thing once we reach our customer.
Multi-tasking: There is a lot to do in digital marketing. Even the best creative fatigues, there are multiple channels to manage, budgets run out.. ML can support in all of these areas.
Smart Lists are remarketing lists generated by deep learning powered artificial intelligence.
While remarketing is a very simple idea, traditional lists can become bloated with people unlikely to convert. This is a result of the limited criteria available for adding people to remarketing lists with. As the name suggests, a Smart List is a lot smarter and more selective about who gets added to, and removed from, a remarketing list.
Once you meet the minimum criteria, Smart Lists draw on Google’s incredibly powerful machine learning brain to sort through your site’s conversion data. Scanning through this data for specific signals which show people are more likely to convert. The signals analysed by Google include referrer, device, browser, location and visit duration to name but a few. Google analyses this data every day and then adds people to, or removes them from, the Smart List.
Improve CTR by up to 12x
Python, R, SQL
This is drawn primarily from a project I worked on last year.
The first stage is to ensure we have the right data sources and a significant enough quantity of data to work with.
CRM data from this insurance company, GAP logs (hit level), and access to Google BigQuery (Hadoop would do the same job)
At a simple level, these are the steps we want to take.
We’ll use the GA Client ID, cross-reference and bind with the CRM data to get a full picture of each customer.
This will be used as a training data set to identify patterns in behavior among customers who have taken out the action that we want future customers to take.
We will then use a predictive model to generate a list of prospects
BigQuery will help us to score these prospects
This will go back into AdWords and we can select the threshold for targeting
80:20 split
To achieve this goal, you need to have some way of linking the website visitor with a specific entry in your internal database. Google Analytics provides a unique identifier called the Client ID for each visitor, that can be used to tie two databases together. It is important to note that you should never save personally identifiable information (PII) in Google Analytics.
For our example, there are 5 conversion stages. We need to label this field within our data set - supervised learning.
We also need to know what will be relevant/irrelevant for the analysis. For this analysis, we want to know what the relationship is between visiting certain pages at certain times, and income levels, for example. We also want to leave this relatively open, as there will be other relationships we have not considered.
We will do this by generating correlation coefficients for each pair of variables.
In this step, you will run the regression. You will use the R function glm to perform the logistic regression by specifying a binomial distribution (family=binomial). You can generate the initial model and print the results to the screen with the following commands. Note the use of b_CV_flag as the objective variable
It allows you to make predictions from data by learning the relationship between features of your data and some observed, continuous-valued response. Regression is used in a massive number of applications ranging from predicting stock prices to understanding gene regulatory networks.
This model hinges on a binary outcome. Either the customer converts and at least books a test drive (success) or they don't (failure). To model this scenario, you will build a statistical model using logistic regression analysis to predict the likelihood of a conversion.
We assume that Y can be predicted from X
A useful abstraction that models how we assume the world will work based on how it worked in the past
The best model is the one that achieves the highest probability of conversion –trying to find relationships between coefficients
The ROC curve is a graphical representation of the contrast between true positive rates and the false positive rate at various thresholds. It’s often used as a proxy for the trade-off between the sensitivity of the model (true positives) vs the fall-out or the probability it will trigger a false alarm (false positives).
The ROC (Receiver Operating Characteristic) curve, is normalized from the gain chart. Here, the value of AUC (the area under the ROC curve) becomes the indicator of the goodness of the performance of the classification algorithm. It takes a value between zero and one, where 0.5 would be random and a higher number would indicate a better model than randomness.
So far we have seen how to build a linear regression model using the whole dataset. If we build it that way, there is no way to tell how the model will perform with new data. So the preferred practice is to split your dataset into a 80:20 sample (training:test), then, build the model on the 80% sample and then use the model thus built to predict the dependent variable on test data.
Doing it this way, we will have the model predicted values for the 20% data (test) as well as the actuals (from the original dataset). By calculating accuracy measures (like min_max accuracy) and error rates (MAPE or MSE), we can find out the prediction accuracy of the model. Now, lets see how to actually do this..
One way to evaluate the value of a predictive model is to generate a cumulative Gain chart. Simply put, it visually shows the gain in response from using the predictive model as opposed to remarketing randomly across the customer database. The larger the distance between the Gain line and the baseline the better the predictive model is. To generate the Gain chart in R you will need to run the following commands.
The coefficients are multiplied with the respective variable and multiplied by 100 to create a score between 0 to 100 for each user.
generate_remarketing_list.sql
By sorting this list based on the conversion probability in descending order, you will have a prioritised list of users to follow up with for remarketing outreach, for example through Google Adwords, DoubleClick, and Google Analytics Premium.