SlideShare a Scribd company logo
1 of 77
Download to read offline
Audience segmentation with
machine learning
Richard Lawrence
Rise at Seven
@richlawre
About me
SEO background,
studying a Data
Science degree in
spare time.
@richlawre
About me
Follow me on Twitter
@richlawre
@richlawre
What we’re going to
cover
@richlawre
@richlawre
A bit of context
about machine
learning AUDIENCE 1
Pageviews
Transaction
revenue
AUDIENCE 2
AUDIENCE 3
The agenda
@richlawre
An overview of
how audience
segmentation
works
AUDIENCE 1
Pageviews
Transaction
revenue
AUDIENCE 2
AUDIENCE 3
The agenda
@richlawre
Some detail about
how to do it
AUDIENCE 1
Pageviews
Transaction
revenue
AUDIENCE 2
AUDIENCE 3
The agenda
@richlawre
How to take things
further
AUDIENCE 1
Pageviews
Transaction
revenue
AUDIENCE 2
AUDIENCE 3
The agenda
A bit of context
@richlawre
It learns with
labelled data
@richlawre
What is supervised
machine learning?
@richlawre
It finds
patterns in
data
What is unsupervised
machine learning?
Audience segmentation
in a nutshell
@richlawre
We extract data about
individual sessions from
web analytics
@richlawre
Extracting the data
CHANNEL SESSIONS TRANSACTIONS REVENUE
Organic search 1000 50 £12,000
Paid search 700 30 £3,000
Direct 500 25 £6,000
Referral 300 30 £4,000
Instead of
grouping sessions
by channel or
section...
@richlawre
Extracting the data
...we extract
details about
individual
sessions
@richlawre
SESSION ID PAGEVIEWS TIME PER PAGE REVENUE
Session 1 7 30 seconds £77.50
Session 2 10 20 seconds £27.50
Session 3 5 23 seconds £36.50
Session 4 8 18 seconds £45.30
We then use unsupervised
machine learning to find
interesting patterns
@richlawre
Instead of
analysing sessions
grouped together
in some way...
Finding patterns
@richlawre
AUDIENCE 1
Pageviews
Transaction
revenue
AUDIENCE 2
AUDIENCE 3
...we use machine
learning to find
patterns in user
behaviour.
@richlawre
Finding patterns
This results in
actionable audience
segments
@richlawre
The Gatherer
Landing section: Homepage
Least time
per page
Most number of
pages viewed
Highest number of
conversions per
session
Most likely to
download a
brochure
Description:
The Gatherer comes directly to the website to the homepage,
visits multiple car models to download a brochure for each to look
at offline later.
Example CRO Test:
Link to a model comparison table from
the homepage with option to download
a brochure for each model
Likely onsite journey
Example segment from
Car manufacturer
Second section: Car Models
Exit section: Car Models
@richlawre
The Skipper
Example segment from
Train operator
Description:
The Skipper has likely already done their travel research (around
when to travel & where) multiple times without buying and are
simply returning - likely at the last minute - to finally finish task.
Example CRO Test:
Use a cookie to add a banner to the
homepage that takes a returning user
back to where they left off in the
transaction process.
Slightly more time
per page then average
More likely to buy in
the evening or at night
Fewest days since last
session
Fewest pages per
visit
Over index for
visiting via tablet
Over index for
visiting via email
@richlawre
Why do you need to do
this?
@richlawre
1.Find behaviours you
may not have realised
existed
@richlawre
2.Generate test
hypotheses for CRO
@richlawre
3.Track behaviours
over time (more about
this later)
@richlawre
How to do it
@richlawre
The key steps
1. Extract the data
2. Process the data
3. Select features
4. Cluster the data
5. Manually explore the segments
@richlawre
1.Extracting the data
@richlawre
Using Google Analytics API
Extract by Session ID
or Client ID
@richlawre
https://www.jcchouinard.com/google-analytics-api-using-python/
Using Google Analytics API
Useful dimensions:
landingPagePath
secondPagePath
exitPagePath
@richlawre
https://www.jcchouinard.com/google-analytics-api-using-python/
Using Google Analytics API
Useful metrics:
pageviewsPerSession
revenuePerTransaction
goalXXCompletions
https://www.jcchouinard.com/google-analytics-api-using-python/
@richlawre
Using Google Analytics API
There is a limit on the
number of
metrics/dimensions
10
@richlawre
https://www.jcchouinard.com/google-analytics-api-using-python/
Using Google Analytics API
There is also a limit
on the number of
rows per call
25,000
@richlawre
https://www.jcchouinard.com/google-analytics-api-using-python/
Using Google Analytics API
The answer is to
loop over days,
metrics, dimensions
& merge!
@richlawre
https://www.jcchouinard.com/google-analytics-api-using-python/
Using BigQuery
Data is nested -
I’ve found it makes
things more
difficult at the
session level
https://adswerve.com/blog/google-analytics-queries-in-bigquery-part-two-users-sessions-unnesting-hits/
@richlawre
Using BigQuery
However it is
possible to do and
there is some great
information around
https://adswerve.com/blog/google-analytics-queries-in-bigquery-part-two-users-sessions-unnesting-hits/
@richlawre
Using BigQuery
Can also run the
unsupervised
machine learning
algorithm directly
in SQL
https://adswerve.com/blog/google-analytics-queries-in-bigquery-part-two-users-sessions-unnesting-hits/
@richlawre
Using BigQuery
Previously used 1M
sessions with
Python & Google
Colab - BigQuery
wasn’t necessary
https://adswerve.com/blog/google-analytics-queries-in-bigquery-part-two-users-sessions-unnesting-hits/
@richlawre
Using BigQuery
Choose days at
random to ensure
variation
https://adswerve.com/blog/google-analytics-queries-in-bigquery-part-two-users-sessions-unnesting-hits/
@richlawre
2.Processing the data
@richlawre
Useful data transformations
Change hours of
the day to
morning,
afternoon,
evening,night
SESSION ID DAY DAY TYPE
Session 1 Monday Weekday
Session 2 Tuesday Weekday
Session 3 Saturday Weekend
Session 4 Wednesday Weekday
@richlawre
Change days to
weekday &
weekend
@richlawre
SESSION ID DAY DAY TYPE
Session 1 Monday Weekday
Session 2 Tuesday Weekday
Session 3 Saturday Weekend
Session 4 Wednesday Weekday
Useful data transformations
Change pages to
sections
@richlawre
SESSION ID DAY DAY TYPE
Session 1 Monday Weekday
Session 2 Tuesday Weekday
Session 3 Saturday Weekend
Session 4 Wednesday Weekday
Useful data transformations
Useful data transformations
Combine certain
conversion points
@richlawre
SESSION ID DAY DAY TYPE
Session 1 Monday Weekday
Session 2 Tuesday Weekday
Session 3 Saturday Weekend
Session 4 Wednesday Weekday
Here is a useful link
to do find and
replace it in Python
& Pandas
@richlawre
SESSION ID DAY DAY TYPE
Session 1 Monday Weekday
Session 2 Tuesday Weekday
Session 3 Saturday Weekend
Session 4 Wednesday Weekday
Useful data transformations
You could use
Google DataPrep
instead
@richlawre
SESSION ID DAY DAY TYPE
Session 1 Monday Weekday
Session 2 Tuesday Weekday
Session 3 Saturday Weekend
Session 4 Wednesday Weekday
Useful data transformations
One hot encoding
Converts categories
to 1s & 0s.
SESSION
ID
CHANNEL
Session 1 Organic Search
Session 2 Paid Search
Session 3 Direct
Session 4 Direct
SESSION
ID
ORGANIC
SEARCH
PAID
SEARCH
DIRECT
Session 1 1 0 0
Session 2 0 1 0
Session 3 0 0 1
Session 4 0 0 1
@richlawre
Values aren’t
increasing so doesn’t
skew the clustering
algorithm
SESSION
ID
CHANNEL
Session 1 Organic Search
Session 2 Paid Search
Session 3 Direct
Session 4 Direct
SESSION
ID
ORGANIC
SEARCH
PAID
SEARCH
DIRECT
Session 1 1 0 0
Session 2 0 1 0
Session 3 0 0 1
Session 4 0 0 1
@richlawre
One hot encoding
Use for numerical as
well as categorical
data
SESSION
ID
CHANNEL
Session 1 Organic Search
Session 2 Paid Search
Session 3 Direct
Session 4 Direct
SESSION
ID
ORGANIC
SEARCH
PAID
SEARCH
DIRECT
Session 1 1 0 0
Session 2 0 1 0
Session 3 0 0 1
Session 4 0 0 1
@richlawre
One hot encoding
See here for how to
do it with Python
SESSION
ID
CHANNEL
Session 1 Organic Search
Session 2 Paid Search
Session 3 Direct
Session 4 Direct
SESSION
ID
ORGANIC
SEARCH
PAID
SEARCH
DIRECT
Session 1 1 0 0
Session 2 0 1 0
Session 3 0 0 1
Session 4 0 0 1
@richlawre
One hot encoding
3.Selecting features
@richlawre
Best subset regression
Choose desired
response variable
& find potential
explanatory
variables
@richlawre
Best subset regression
Runs regression
analysis for
combinations of
variables at once to
find correlation
@richlawre
Best subset regression
This will help you
narrow down
features to find
useful patterns
within
@richlawre
Best subset regression
See Python
walkthrough here
@richlawre
4.Clustering the data
@richlawre
Principal Component
Analysis
Transforms a large
set of variables into
a smaller one
without much loss
@richlawre
Principal Component
Analysis
See walkthrough
here.
@richlawre
Using a KMeans algorithm
The
unsupervised
machine learning
algorithm to find
patterns
@richlawre
Using a KMeans algorithm
See a full
walkthrough here
with Python.
@richlawre
Using a KMeans algorithm
You can also do this
directly in BigQuery.
@richlawre
Using a silhouette score
Way of finding the
optimum
number of
clusters
@richlawre
Using a silhouette score
Optimal number is
at the elbow in
the graph - not
much gain after
this
@richlawre
5.Always manually
explore the segments!
@richlawre
Taking it to the next level
@richlawre
Classify any future session
@richlawre
Use the labelled
data to train a
supervised
machine learning
algorithm - we use
deep learning
Classify any future session
@richlawre
The better defined
your segments,
the better this will
perform
Classify any future session
@richlawre
Push the labelled
sessions back into
Google Analytics
via Data Import
Visualise in Streamlit
@richlawre
CRM segment 1
CRM segment 2
CRM segment 3
CRM segment 4
CRM segment 5
Summary
@richlawre
Unsupervised machine learning
finds interesting patterns in data.
@richlawre
Apply this to individual sessions
from Google Analytics to create
behaviour segments.
@richlawre
This can be a great source of ideas
for CRO hypotheses.
@richlawre
There are 5 steps for the analysis:
extract,process,feature selection,
cluster,manually explore
@richlawre
You can use Python or other
toolsets (Google Cloud) to do the
analysis.
@richlawre
You can use the segments to label
any future session on the website.
@richlawre
Thanks!
@richlawre

More Related Content

What's hot

Product, service and category page links (and how to get them) - Rebecca Moss...
Product, service and category page links (and how to get them) - Rebecca Moss...Product, service and category page links (and how to get them) - Rebecca Moss...
Product, service and category page links (and how to get them) - Rebecca Moss...Rebecca Moss
 
How to Incorporate ML in your SERP Analysis, Lazarina Stoy -BrightonSEO Oct, ...
How to Incorporate ML in your SERP Analysis, Lazarina Stoy -BrightonSEO Oct, ...How to Incorporate ML in your SERP Analysis, Lazarina Stoy -BrightonSEO Oct, ...
How to Incorporate ML in your SERP Analysis, Lazarina Stoy -BrightonSEO Oct, ...LazarinaStoyanova
 
The Online PR Show deck
The Online PR Show deckThe Online PR Show deck
The Online PR Show deckLukeBudka
 
News SEO: Why we’ve de commissioned AMP - Brighton SEO September 2021
News SEO: Why we’ve de commissioned AMP - Brighton SEO September 2021News SEO: Why we’ve de commissioned AMP - Brighton SEO September 2021
News SEO: Why we’ve de commissioned AMP - Brighton SEO September 2021Daniel Smullen
 
brighton final.pptx
brighton final.pptxbrighton final.pptx
brighton final.pptxssuser152aeb
 
SEO Strategy: Where The F**K Do I Even Start? - Brighton SEO April 2022
SEO Strategy: Where The F**K Do I Even Start? - Brighton SEO April 2022 SEO Strategy: Where The F**K Do I Even Start? - Brighton SEO April 2022
SEO Strategy: Where The F**K Do I Even Start? - Brighton SEO April 2022 SophieBrannon
 
SMX West 2020 - Leveraging Structured Data for Maximum Effect
SMX West  2020 - Leveraging Structured Data for Maximum EffectSMX West  2020 - Leveraging Structured Data for Maximum Effect
SMX West 2020 - Leveraging Structured Data for Maximum EffectAbby Hamilton
 
How to Grow your Organic Search Traffic in International Markets #ConnectaBern
How to Grow your Organic Search Traffic in International Markets #ConnectaBernHow to Grow your Organic Search Traffic in International Markets #ConnectaBern
How to Grow your Organic Search Traffic in International Markets #ConnectaBernAleyda Solís
 
A crash course into SEO and what moves the needle with scalable processes
A crash course into SEO and what moves the needle with scalable processesA crash course into SEO and what moves the needle with scalable processes
A crash course into SEO and what moves the needle with scalable processespatrickstox
 
SEO & UX: So Happy Together
SEO & UX: So Happy TogetherSEO & UX: So Happy Together
SEO & UX: So Happy TogetherRand Fishkin
 
The True Value of Syndicated Links Experiment
The True Value of Syndicated Links ExperimentThe True Value of Syndicated Links Experiment
The True Value of Syndicated Links ExperimentSarah Fleming
 
Giulia Panozzo | BrightonSEO Measurefest | October 2022
Giulia Panozzo | BrightonSEO Measurefest | October 2022Giulia Panozzo | BrightonSEO Measurefest | October 2022
Giulia Panozzo | BrightonSEO Measurefest | October 2022GiuliaPanozzo1
 
International SEO Strategy - Helga Bendea - Seocamp
International SEO Strategy - Helga Bendea - SeocampInternational SEO Strategy - Helga Bendea - Seocamp
International SEO Strategy - Helga Bendea - SeocampHelga Bendea
 
Building a Search Intent-Driven Website Architecture (SEO Mastery Summit 2022...
Building a Search Intent-Driven Website Architecture (SEO Mastery Summit 2022...Building a Search Intent-Driven Website Architecture (SEO Mastery Summit 2022...
Building a Search Intent-Driven Website Architecture (SEO Mastery Summit 2022...LazarinaStoyanova
 
Using command line to save time on common SEO tasks
Using command line to save time on common SEO tasks Using command line to save time on common SEO tasks
Using command line to save time on common SEO tasks DinoKukic
 
A beginner's guide to machine learning for SEOs - WTSFest 2022
A beginner's guide to machine learning for SEOs  - WTSFest 2022A beginner's guide to machine learning for SEOs  - WTSFest 2022
A beginner's guide to machine learning for SEOs - WTSFest 2022LazarinaStoyanova
 
Negotiating crawl budget with googlebots
Negotiating crawl budget with googlebotsNegotiating crawl budget with googlebots
Negotiating crawl budget with googlebotsDawn Anderson MSc DigM
 
Traffic & Conversion Sumit 2018 10X Business Growth
Traffic & Conversion Sumit 2018 10X Business GrowthTraffic & Conversion Sumit 2018 10X Business Growth
Traffic & Conversion Sumit 2018 10X Business GrowthRoland Frasier
 
Machine Learning use cases for Technical SEO Automation Brighton SEO Patrick ...
Machine Learning use cases for Technical SEO Automation Brighton SEO Patrick ...Machine Learning use cases for Technical SEO Automation Brighton SEO Patrick ...
Machine Learning use cases for Technical SEO Automation Brighton SEO Patrick ...Ahrefs
 

What's hot (20)

Product, service and category page links (and how to get them) - Rebecca Moss...
Product, service and category page links (and how to get them) - Rebecca Moss...Product, service and category page links (and how to get them) - Rebecca Moss...
Product, service and category page links (and how to get them) - Rebecca Moss...
 
How to Incorporate ML in your SERP Analysis, Lazarina Stoy -BrightonSEO Oct, ...
How to Incorporate ML in your SERP Analysis, Lazarina Stoy -BrightonSEO Oct, ...How to Incorporate ML in your SERP Analysis, Lazarina Stoy -BrightonSEO Oct, ...
How to Incorporate ML in your SERP Analysis, Lazarina Stoy -BrightonSEO Oct, ...
 
The Online PR Show deck
The Online PR Show deckThe Online PR Show deck
The Online PR Show deck
 
News SEO: Why we’ve de commissioned AMP - Brighton SEO September 2021
News SEO: Why we’ve de commissioned AMP - Brighton SEO September 2021News SEO: Why we’ve de commissioned AMP - Brighton SEO September 2021
News SEO: Why we’ve de commissioned AMP - Brighton SEO September 2021
 
brighton final.pptx
brighton final.pptxbrighton final.pptx
brighton final.pptx
 
SEO Strategy: Where The F**K Do I Even Start? - Brighton SEO April 2022
SEO Strategy: Where The F**K Do I Even Start? - Brighton SEO April 2022 SEO Strategy: Where The F**K Do I Even Start? - Brighton SEO April 2022
SEO Strategy: Where The F**K Do I Even Start? - Brighton SEO April 2022
 
SMX West 2020 - Leveraging Structured Data for Maximum Effect
SMX West  2020 - Leveraging Structured Data for Maximum EffectSMX West  2020 - Leveraging Structured Data for Maximum Effect
SMX West 2020 - Leveraging Structured Data for Maximum Effect
 
How to Grow your Organic Search Traffic in International Markets #ConnectaBern
How to Grow your Organic Search Traffic in International Markets #ConnectaBernHow to Grow your Organic Search Traffic in International Markets #ConnectaBern
How to Grow your Organic Search Traffic in International Markets #ConnectaBern
 
A crash course into SEO and what moves the needle with scalable processes
A crash course into SEO and what moves the needle with scalable processesA crash course into SEO and what moves the needle with scalable processes
A crash course into SEO and what moves the needle with scalable processes
 
SEO & UX: So Happy Together
SEO & UX: So Happy TogetherSEO & UX: So Happy Together
SEO & UX: So Happy Together
 
Python for SEO
Python for SEOPython for SEO
Python for SEO
 
The True Value of Syndicated Links Experiment
The True Value of Syndicated Links ExperimentThe True Value of Syndicated Links Experiment
The True Value of Syndicated Links Experiment
 
Giulia Panozzo | BrightonSEO Measurefest | October 2022
Giulia Panozzo | BrightonSEO Measurefest | October 2022Giulia Panozzo | BrightonSEO Measurefest | October 2022
Giulia Panozzo | BrightonSEO Measurefest | October 2022
 
International SEO Strategy - Helga Bendea - Seocamp
International SEO Strategy - Helga Bendea - SeocampInternational SEO Strategy - Helga Bendea - Seocamp
International SEO Strategy - Helga Bendea - Seocamp
 
Building a Search Intent-Driven Website Architecture (SEO Mastery Summit 2022...
Building a Search Intent-Driven Website Architecture (SEO Mastery Summit 2022...Building a Search Intent-Driven Website Architecture (SEO Mastery Summit 2022...
Building a Search Intent-Driven Website Architecture (SEO Mastery Summit 2022...
 
Using command line to save time on common SEO tasks
Using command line to save time on common SEO tasks Using command line to save time on common SEO tasks
Using command line to save time on common SEO tasks
 
A beginner's guide to machine learning for SEOs - WTSFest 2022
A beginner's guide to machine learning for SEOs  - WTSFest 2022A beginner's guide to machine learning for SEOs  - WTSFest 2022
A beginner's guide to machine learning for SEOs - WTSFest 2022
 
Negotiating crawl budget with googlebots
Negotiating crawl budget with googlebotsNegotiating crawl budget with googlebots
Negotiating crawl budget with googlebots
 
Traffic & Conversion Sumit 2018 10X Business Growth
Traffic & Conversion Sumit 2018 10X Business GrowthTraffic & Conversion Sumit 2018 10X Business Growth
Traffic & Conversion Sumit 2018 10X Business Growth
 
Machine Learning use cases for Technical SEO Automation Brighton SEO Patrick ...
Machine Learning use cases for Technical SEO Automation Brighton SEO Patrick ...Machine Learning use cases for Technical SEO Automation Brighton SEO Patrick ...
Machine Learning use cases for Technical SEO Automation Brighton SEO Patrick ...
 

Similar to MeasureFest July 2021 - Session Segmentation with Machine Learning

Creating a Single Source of Truth: Leverage all of your data with powerful an...
Creating a Single Source of Truth: Leverage all of your data with powerful an...Creating a Single Source of Truth: Leverage all of your data with powerful an...
Creating a Single Source of Truth: Leverage all of your data with powerful an...Looker
 
Measuring What Really Matters: Search Engine Metrics & Tracking Tips - David ...
Measuring What Really Matters: Search Engine Metrics & Tracking Tips - David ...Measuring What Really Matters: Search Engine Metrics & Tracking Tips - David ...
Measuring What Really Matters: Search Engine Metrics & Tracking Tips - David ...Energy Digital Summit
 
Séminaire Big Data Alter Way - Elasticsearch - octobre 2014
Séminaire Big Data Alter Way - Elasticsearch - octobre 2014Séminaire Big Data Alter Way - Elasticsearch - octobre 2014
Séminaire Big Data Alter Way - Elasticsearch - octobre 2014ALTER WAY
 
Empower customer success at LinkedIn with advanced analytics and great visual...
Empower customer success at LinkedIn with advanced analytics and great visual...Empower customer success at LinkedIn with advanced analytics and great visual...
Empower customer success at LinkedIn with advanced analytics and great visual...Michael Li
 
Elasticsearch : petit déjeuner du 13 mars 2014
Elasticsearch : petit déjeuner du 13 mars 2014Elasticsearch : petit déjeuner du 13 mars 2014
Elasticsearch : petit déjeuner du 13 mars 2014ALTER WAY
 
Big Data graph Clustering with Laurence O'Toole - Digital Marketing Show, Nov...
Big Data graph Clustering with Laurence O'Toole - Digital Marketing Show, Nov...Big Data graph Clustering with Laurence O'Toole - Digital Marketing Show, Nov...
Big Data graph Clustering with Laurence O'Toole - Digital Marketing Show, Nov...Authoritas
 
Transitioning to-lean-at-infochimps
Transitioning to-lean-at-infochimpsTransitioning to-lean-at-infochimps
Transitioning to-lean-at-infochimpsAsh Maurya
 
Free Basic SEO Course/Workshop - Anadigme
Free Basic SEO Course/Workshop - AnadigmeFree Basic SEO Course/Workshop - Anadigme
Free Basic SEO Course/Workshop - AnadigmeJoaquin Poggi
 
Mining Google Analytics for Marketing Insights
Mining Google Analytics for Marketing InsightsMining Google Analytics for Marketing Insights
Mining Google Analytics for Marketing InsightsKash Dhanda
 
Online SEO Meetup
Online SEO MeetupOnline SEO Meetup
Online SEO MeetupSemrush
 
Frank Bien Opening Keynote - Join 2016
Frank Bien Opening Keynote - Join 2016Frank Bien Opening Keynote - Join 2016
Frank Bien Opening Keynote - Join 2016Looker
 
Frank Bien Opening Keynote - Join 2016
Frank Bien Opening Keynote - Join 2016Frank Bien Opening Keynote - Join 2016
Frank Bien Opening Keynote - Join 2016Looker
 
Advanced Keyword Research for SEO - Training Deck
Advanced Keyword Research for SEO - Training DeckAdvanced Keyword Research for SEO - Training Deck
Advanced Keyword Research for SEO - Training DeckDaniel Brooks
 
Search Analytics at Enterprise Search Summit Fall 2011
Search Analytics at Enterprise Search Summit Fall 2011Search Analytics at Enterprise Search Summit Fall 2011
Search Analytics at Enterprise Search Summit Fall 2011Sematext Group, Inc.
 
Demand quest seo training 1 16x9 10.2018
Demand quest seo training 1 16x9 10.2018Demand quest seo training 1 16x9 10.2018
Demand quest seo training 1 16x9 10.2018Nate Plaunt
 
SearchLove London | Dave Sottimano, 'Using Data to Win Arguments'
SearchLove London | Dave Sottimano, 'Using Data to Win Arguments' SearchLove London | Dave Sottimano, 'Using Data to Win Arguments'
SearchLove London | Dave Sottimano, 'Using Data to Win Arguments' Distilled
 
Cross Device Optimisation - Google Analytics Shortcuts
Cross Device Optimisation - Google Analytics ShortcutsCross Device Optimisation - Google Analytics Shortcuts
Cross Device Optimisation - Google Analytics ShortcutsCraig Sullivan
 

Similar to MeasureFest July 2021 - Session Segmentation with Machine Learning (20)

A6 big data_in_the_cloud
A6 big data_in_the_cloudA6 big data_in_the_cloud
A6 big data_in_the_cloud
 
Creating a Single Source of Truth: Leverage all of your data with powerful an...
Creating a Single Source of Truth: Leverage all of your data with powerful an...Creating a Single Source of Truth: Leverage all of your data with powerful an...
Creating a Single Source of Truth: Leverage all of your data with powerful an...
 
Measuring What Really Matters: Search Engine Metrics & Tracking Tips - David ...
Measuring What Really Matters: Search Engine Metrics & Tracking Tips - David ...Measuring What Really Matters: Search Engine Metrics & Tracking Tips - David ...
Measuring What Really Matters: Search Engine Metrics & Tracking Tips - David ...
 
Séminaire Big Data Alter Way - Elasticsearch - octobre 2014
Séminaire Big Data Alter Way - Elasticsearch - octobre 2014Séminaire Big Data Alter Way - Elasticsearch - octobre 2014
Séminaire Big Data Alter Way - Elasticsearch - octobre 2014
 
Empower customer success at LinkedIn with advanced analytics and great visual...
Empower customer success at LinkedIn with advanced analytics and great visual...Empower customer success at LinkedIn with advanced analytics and great visual...
Empower customer success at LinkedIn with advanced analytics and great visual...
 
Elasticsearch : petit déjeuner du 13 mars 2014
Elasticsearch : petit déjeuner du 13 mars 2014Elasticsearch : petit déjeuner du 13 mars 2014
Elasticsearch : petit déjeuner du 13 mars 2014
 
Big Data graph Clustering with Laurence O'Toole - Digital Marketing Show, Nov...
Big Data graph Clustering with Laurence O'Toole - Digital Marketing Show, Nov...Big Data graph Clustering with Laurence O'Toole - Digital Marketing Show, Nov...
Big Data graph Clustering with Laurence O'Toole - Digital Marketing Show, Nov...
 
Rdfa semtech2011
Rdfa semtech2011Rdfa semtech2011
Rdfa semtech2011
 
Transitioning to-lean-at-infochimps
Transitioning to-lean-at-infochimpsTransitioning to-lean-at-infochimps
Transitioning to-lean-at-infochimps
 
Free Basic SEO Course/Workshop - Anadigme
Free Basic SEO Course/Workshop - AnadigmeFree Basic SEO Course/Workshop - Anadigme
Free Basic SEO Course/Workshop - Anadigme
 
Mining Google Analytics for Marketing Insights
Mining Google Analytics for Marketing InsightsMining Google Analytics for Marketing Insights
Mining Google Analytics for Marketing Insights
 
Online SEO Meetup
Online SEO MeetupOnline SEO Meetup
Online SEO Meetup
 
Frank Bien Opening Keynote - Join 2016
Frank Bien Opening Keynote - Join 2016Frank Bien Opening Keynote - Join 2016
Frank Bien Opening Keynote - Join 2016
 
Frank Bien Opening Keynote - Join 2016
Frank Bien Opening Keynote - Join 2016Frank Bien Opening Keynote - Join 2016
Frank Bien Opening Keynote - Join 2016
 
Technical SEO Audit
Technical SEO AuditTechnical SEO Audit
Technical SEO Audit
 
Advanced Keyword Research for SEO - Training Deck
Advanced Keyword Research for SEO - Training DeckAdvanced Keyword Research for SEO - Training Deck
Advanced Keyword Research for SEO - Training Deck
 
Search Analytics at Enterprise Search Summit Fall 2011
Search Analytics at Enterprise Search Summit Fall 2011Search Analytics at Enterprise Search Summit Fall 2011
Search Analytics at Enterprise Search Summit Fall 2011
 
Demand quest seo training 1 16x9 10.2018
Demand quest seo training 1 16x9 10.2018Demand quest seo training 1 16x9 10.2018
Demand quest seo training 1 16x9 10.2018
 
SearchLove London | Dave Sottimano, 'Using Data to Win Arguments'
SearchLove London | Dave Sottimano, 'Using Data to Win Arguments' SearchLove London | Dave Sottimano, 'Using Data to Win Arguments'
SearchLove London | Dave Sottimano, 'Using Data to Win Arguments'
 
Cross Device Optimisation - Google Analytics Shortcuts
Cross Device Optimisation - Google Analytics ShortcutsCross Device Optimisation - Google Analytics Shortcuts
Cross Device Optimisation - Google Analytics Shortcuts
 

Recently uploaded

怎样办理伦敦大学毕业证(UoL毕业证书)成绩单学校原版复制
怎样办理伦敦大学毕业证(UoL毕业证书)成绩单学校原版复制怎样办理伦敦大学毕业证(UoL毕业证书)成绩单学校原版复制
怎样办理伦敦大学毕业证(UoL毕业证书)成绩单学校原版复制vexqp
 
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...nirzagarg
 
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...nirzagarg
 
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...nirzagarg
 
Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1ranjankumarbehera14
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...nirzagarg
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...Bertram Ludäscher
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...nirzagarg
 
怎样办理旧金山城市学院毕业证(CCSF毕业证书)成绩单学校原版复制
怎样办理旧金山城市学院毕业证(CCSF毕业证书)成绩单学校原版复制怎样办理旧金山城市学院毕业证(CCSF毕业证书)成绩单学校原版复制
怎样办理旧金山城市学院毕业证(CCSF毕业证书)成绩单学校原版复制vexqp
 
Aspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraAspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraGovindSinghDasila
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制vexqp
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Valters Lauzums
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRajesh Mondal
 
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...gajnagarg
 
怎样办理圣路易斯大学毕业证(SLU毕业证书)成绩单学校原版复制
怎样办理圣路易斯大学毕业证(SLU毕业证书)成绩单学校原版复制怎样办理圣路易斯大学毕业证(SLU毕业证书)成绩单学校原版复制
怎样办理圣路易斯大学毕业证(SLU毕业证书)成绩单学校原版复制vexqp
 
Switzerland Constitution 2002.pdf.........
Switzerland Constitution 2002.pdf.........Switzerland Constitution 2002.pdf.........
Switzerland Constitution 2002.pdf.........EfruzAsilolu
 
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...nirzagarg
 
SR-101-01012024-EN.docx Federal Constitution of the Swiss Confederation
SR-101-01012024-EN.docx  Federal Constitution  of the Swiss ConfederationSR-101-01012024-EN.docx  Federal Constitution  of the Swiss Confederation
SR-101-01012024-EN.docx Federal Constitution of the Swiss ConfederationEfruzAsilolu
 

Recently uploaded (20)

怎样办理伦敦大学毕业证(UoL毕业证书)成绩单学校原版复制
怎样办理伦敦大学毕业证(UoL毕业证书)成绩单学校原版复制怎样办理伦敦大学毕业证(UoL毕业证书)成绩单学校原版复制
怎样办理伦敦大学毕业证(UoL毕业证书)成绩单学校原版复制
 
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
 
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
 
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
 
Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
 
怎样办理旧金山城市学院毕业证(CCSF毕业证书)成绩单学校原版复制
怎样办理旧金山城市学院毕业证(CCSF毕业证书)成绩单学校原版复制怎样办理旧金山城市学院毕业证(CCSF毕业证书)成绩单学校原版复制
怎样办理旧金山城市学院毕业证(CCSF毕业证书)成绩单学校原版复制
 
Aspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraAspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - Almora
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for Research
 
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
 
怎样办理圣路易斯大学毕业证(SLU毕业证书)成绩单学校原版复制
怎样办理圣路易斯大学毕业证(SLU毕业证书)成绩单学校原版复制怎样办理圣路易斯大学毕业证(SLU毕业证书)成绩单学校原版复制
怎样办理圣路易斯大学毕业证(SLU毕业证书)成绩单学校原版复制
 
Switzerland Constitution 2002.pdf.........
Switzerland Constitution 2002.pdf.........Switzerland Constitution 2002.pdf.........
Switzerland Constitution 2002.pdf.........
 
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
 
SR-101-01012024-EN.docx Federal Constitution of the Swiss Confederation
SR-101-01012024-EN.docx  Federal Constitution  of the Swiss ConfederationSR-101-01012024-EN.docx  Federal Constitution  of the Swiss Confederation
SR-101-01012024-EN.docx Federal Constitution of the Swiss Confederation
 

MeasureFest July 2021 - Session Segmentation with Machine Learning

  • 1. Audience segmentation with machine learning Richard Lawrence Rise at Seven @richlawre
  • 2. About me SEO background, studying a Data Science degree in spare time. @richlawre
  • 3. About me Follow me on Twitter @richlawre @richlawre
  • 4. What we’re going to cover @richlawre
  • 5. @richlawre A bit of context about machine learning AUDIENCE 1 Pageviews Transaction revenue AUDIENCE 2 AUDIENCE 3 The agenda
  • 6. @richlawre An overview of how audience segmentation works AUDIENCE 1 Pageviews Transaction revenue AUDIENCE 2 AUDIENCE 3 The agenda
  • 7. @richlawre Some detail about how to do it AUDIENCE 1 Pageviews Transaction revenue AUDIENCE 2 AUDIENCE 3 The agenda
  • 8. @richlawre How to take things further AUDIENCE 1 Pageviews Transaction revenue AUDIENCE 2 AUDIENCE 3 The agenda
  • 9. A bit of context @richlawre
  • 10. It learns with labelled data @richlawre What is supervised machine learning?
  • 11. @richlawre It finds patterns in data What is unsupervised machine learning?
  • 12. Audience segmentation in a nutshell @richlawre
  • 13. We extract data about individual sessions from web analytics @richlawre
  • 14. Extracting the data CHANNEL SESSIONS TRANSACTIONS REVENUE Organic search 1000 50 £12,000 Paid search 700 30 £3,000 Direct 500 25 £6,000 Referral 300 30 £4,000 Instead of grouping sessions by channel or section... @richlawre
  • 15. Extracting the data ...we extract details about individual sessions @richlawre SESSION ID PAGEVIEWS TIME PER PAGE REVENUE Session 1 7 30 seconds £77.50 Session 2 10 20 seconds £27.50 Session 3 5 23 seconds £36.50 Session 4 8 18 seconds £45.30
  • 16. We then use unsupervised machine learning to find interesting patterns @richlawre
  • 17. Instead of analysing sessions grouped together in some way... Finding patterns @richlawre
  • 18. AUDIENCE 1 Pageviews Transaction revenue AUDIENCE 2 AUDIENCE 3 ...we use machine learning to find patterns in user behaviour. @richlawre Finding patterns
  • 19. This results in actionable audience segments @richlawre
  • 20. The Gatherer Landing section: Homepage Least time per page Most number of pages viewed Highest number of conversions per session Most likely to download a brochure Description: The Gatherer comes directly to the website to the homepage, visits multiple car models to download a brochure for each to look at offline later. Example CRO Test: Link to a model comparison table from the homepage with option to download a brochure for each model Likely onsite journey Example segment from Car manufacturer Second section: Car Models Exit section: Car Models @richlawre
  • 21. The Skipper Example segment from Train operator Description: The Skipper has likely already done their travel research (around when to travel & where) multiple times without buying and are simply returning - likely at the last minute - to finally finish task. Example CRO Test: Use a cookie to add a banner to the homepage that takes a returning user back to where they left off in the transaction process. Slightly more time per page then average More likely to buy in the evening or at night Fewest days since last session Fewest pages per visit Over index for visiting via tablet Over index for visiting via email @richlawre
  • 22. Why do you need to do this? @richlawre
  • 23. 1.Find behaviours you may not have realised existed @richlawre
  • 25. 3.Track behaviours over time (more about this later) @richlawre
  • 26. How to do it @richlawre
  • 27. The key steps 1. Extract the data 2. Process the data 3. Select features 4. Cluster the data 5. Manually explore the segments @richlawre
  • 29. Using Google Analytics API Extract by Session ID or Client ID @richlawre https://www.jcchouinard.com/google-analytics-api-using-python/
  • 30. Using Google Analytics API Useful dimensions: landingPagePath secondPagePath exitPagePath @richlawre https://www.jcchouinard.com/google-analytics-api-using-python/
  • 31. Using Google Analytics API Useful metrics: pageviewsPerSession revenuePerTransaction goalXXCompletions https://www.jcchouinard.com/google-analytics-api-using-python/ @richlawre
  • 32. Using Google Analytics API There is a limit on the number of metrics/dimensions 10 @richlawre https://www.jcchouinard.com/google-analytics-api-using-python/
  • 33. Using Google Analytics API There is also a limit on the number of rows per call 25,000 @richlawre https://www.jcchouinard.com/google-analytics-api-using-python/
  • 34. Using Google Analytics API The answer is to loop over days, metrics, dimensions & merge! @richlawre https://www.jcchouinard.com/google-analytics-api-using-python/
  • 35. Using BigQuery Data is nested - I’ve found it makes things more difficult at the session level https://adswerve.com/blog/google-analytics-queries-in-bigquery-part-two-users-sessions-unnesting-hits/ @richlawre
  • 36. Using BigQuery However it is possible to do and there is some great information around https://adswerve.com/blog/google-analytics-queries-in-bigquery-part-two-users-sessions-unnesting-hits/ @richlawre
  • 37. Using BigQuery Can also run the unsupervised machine learning algorithm directly in SQL https://adswerve.com/blog/google-analytics-queries-in-bigquery-part-two-users-sessions-unnesting-hits/ @richlawre
  • 38. Using BigQuery Previously used 1M sessions with Python & Google Colab - BigQuery wasn’t necessary https://adswerve.com/blog/google-analytics-queries-in-bigquery-part-two-users-sessions-unnesting-hits/ @richlawre
  • 39. Using BigQuery Choose days at random to ensure variation https://adswerve.com/blog/google-analytics-queries-in-bigquery-part-two-users-sessions-unnesting-hits/ @richlawre
  • 41. Useful data transformations Change hours of the day to morning, afternoon, evening,night SESSION ID DAY DAY TYPE Session 1 Monday Weekday Session 2 Tuesday Weekday Session 3 Saturday Weekend Session 4 Wednesday Weekday @richlawre
  • 42. Change days to weekday & weekend @richlawre SESSION ID DAY DAY TYPE Session 1 Monday Weekday Session 2 Tuesday Weekday Session 3 Saturday Weekend Session 4 Wednesday Weekday Useful data transformations
  • 43. Change pages to sections @richlawre SESSION ID DAY DAY TYPE Session 1 Monday Weekday Session 2 Tuesday Weekday Session 3 Saturday Weekend Session 4 Wednesday Weekday Useful data transformations
  • 44. Useful data transformations Combine certain conversion points @richlawre SESSION ID DAY DAY TYPE Session 1 Monday Weekday Session 2 Tuesday Weekday Session 3 Saturday Weekend Session 4 Wednesday Weekday
  • 45. Here is a useful link to do find and replace it in Python & Pandas @richlawre SESSION ID DAY DAY TYPE Session 1 Monday Weekday Session 2 Tuesday Weekday Session 3 Saturday Weekend Session 4 Wednesday Weekday Useful data transformations
  • 46. You could use Google DataPrep instead @richlawre SESSION ID DAY DAY TYPE Session 1 Monday Weekday Session 2 Tuesday Weekday Session 3 Saturday Weekend Session 4 Wednesday Weekday Useful data transformations
  • 47. One hot encoding Converts categories to 1s & 0s. SESSION ID CHANNEL Session 1 Organic Search Session 2 Paid Search Session 3 Direct Session 4 Direct SESSION ID ORGANIC SEARCH PAID SEARCH DIRECT Session 1 1 0 0 Session 2 0 1 0 Session 3 0 0 1 Session 4 0 0 1 @richlawre
  • 48. Values aren’t increasing so doesn’t skew the clustering algorithm SESSION ID CHANNEL Session 1 Organic Search Session 2 Paid Search Session 3 Direct Session 4 Direct SESSION ID ORGANIC SEARCH PAID SEARCH DIRECT Session 1 1 0 0 Session 2 0 1 0 Session 3 0 0 1 Session 4 0 0 1 @richlawre One hot encoding
  • 49. Use for numerical as well as categorical data SESSION ID CHANNEL Session 1 Organic Search Session 2 Paid Search Session 3 Direct Session 4 Direct SESSION ID ORGANIC SEARCH PAID SEARCH DIRECT Session 1 1 0 0 Session 2 0 1 0 Session 3 0 0 1 Session 4 0 0 1 @richlawre One hot encoding
  • 50. See here for how to do it with Python SESSION ID CHANNEL Session 1 Organic Search Session 2 Paid Search Session 3 Direct Session 4 Direct SESSION ID ORGANIC SEARCH PAID SEARCH DIRECT Session 1 1 0 0 Session 2 0 1 0 Session 3 0 0 1 Session 4 0 0 1 @richlawre One hot encoding
  • 52. Best subset regression Choose desired response variable & find potential explanatory variables @richlawre
  • 53. Best subset regression Runs regression analysis for combinations of variables at once to find correlation @richlawre
  • 54. Best subset regression This will help you narrow down features to find useful patterns within @richlawre
  • 55. Best subset regression See Python walkthrough here @richlawre
  • 57. Principal Component Analysis Transforms a large set of variables into a smaller one without much loss @richlawre
  • 59. Using a KMeans algorithm The unsupervised machine learning algorithm to find patterns @richlawre
  • 60. Using a KMeans algorithm See a full walkthrough here with Python. @richlawre
  • 61. Using a KMeans algorithm You can also do this directly in BigQuery. @richlawre
  • 62. Using a silhouette score Way of finding the optimum number of clusters @richlawre
  • 63. Using a silhouette score Optimal number is at the elbow in the graph - not much gain after this @richlawre
  • 64. 5.Always manually explore the segments! @richlawre
  • 65. Taking it to the next level @richlawre
  • 66. Classify any future session @richlawre Use the labelled data to train a supervised machine learning algorithm - we use deep learning
  • 67. Classify any future session @richlawre The better defined your segments, the better this will perform
  • 68. Classify any future session @richlawre Push the labelled sessions back into Google Analytics via Data Import
  • 69. Visualise in Streamlit @richlawre CRM segment 1 CRM segment 2 CRM segment 3 CRM segment 4 CRM segment 5
  • 71. Unsupervised machine learning finds interesting patterns in data. @richlawre
  • 72. Apply this to individual sessions from Google Analytics to create behaviour segments. @richlawre
  • 73. This can be a great source of ideas for CRO hypotheses. @richlawre
  • 74. There are 5 steps for the analysis: extract,process,feature selection, cluster,manually explore @richlawre
  • 75. You can use Python or other toolsets (Google Cloud) to do the analysis. @richlawre
  • 76. You can use the segments to label any future session on the website. @richlawre