I show some methods for extracting value from your marketing analytics data using modelling techniques. Topics include:
● Sales Forecasting
● What’s in your customers shopping carts?
● What are your customers searching for?
Python source code for all the charts is available on Ayima's GitHub:
● https://github.com/Ayima/google-merch-data-mining
● https://github.com/Ayima/onsite-search-data-mining
1. Using AI for Ecommerce Analytics
Toronto June 24th 2019
2. Alex Galea
Senior Data Analyst | Ayima
● Full stack data analytics
● Author of Beginning Data Science with Python and
Jupyter
● M.Sc. Physics
● Leafs fan
4. What is AI?
Virtual assistant
Self-driving cars
Recommendation engines
Digital advertising
Predict answers to questions
Predict how to steer a car
Predict what things to show users
Predict what people see your ad
6. “Artificial intelligence is not that artificial; it’s human beings
that are doing the work”
- Anonymous Google employee [source]
Artificial Intelligence: Hype VS Reality
8. Hype:
● “100% REAL ARTIFICIAL
INTELLIGENCE”
● “JUST CONNECT, AUTOMATE
AND INCREASE CONVERSIONS
BY 100%!”
● “SIT BACK AND RELAX WHILE
THE MAGIC WORKS”
● “AI technologies free up human
brain power and intellect”
Artificial Intelligence: Hype VS Reality
9. Reality:
● Even the best AI solutions are
highly specialized and limited
● No guaranteed wins. Each case is
different.
● Black box technologies make it
easy to build bad models.
● AI models rely on domain
expertise.
Artificial Intelligence: Hype VS Reality
10. AI Applications in Digital Marketing
Provide insights to help determine:
● Product
● Promotion
● Price
● Place
Example: a promotional email
● What products to include?
● What is the price?
● How many emails to send? Who are they sent to?
11. Top Areas of Impact
1. Matching customers to products
- Showing ads & promotions to the right people
- Good product recommendations
2. Determining offerings
- Product price points
- What products / bundles to sell
- Timing promotions
3. Optimizing UX and content
- Personalized experiences
- Webpage / blog topics & keywords
12. Today’s Topics
1. Matching customers to products
- Showing ads & promotions to the right people
- Good product recommendations
2. Determining offerings
- Product price points
- What products / bundles to sell
- Timing promotions
3. Optimizing UX and content
- Personalized experiences
- Webpage / blog topics & keywords
13. Outline
● Google Merchandise Store
● Sales Forecasting
● What’s in your customers shopping carts?
● What are your customers searching for?
14. Exploring the
Google Merch Store
● We explore these data modeling
topics using Google Merch Store
analytics data
● GA sample data from 2016-2017 is
available on BigQuery [1]
● Analysis in the following slides
can be applied to your website,
but the story will be different.
https://shop.googlemerchandisestore.com
[1] https://support.google.com/analytics/answer/7586738?hl=en
15. ● Google Merch Store Data Mining
https://github.com/Ayima/google-merch-data-mining
http://ayi.ma/s6u0y
● Onsite Search API Data Extraction & Modeling
https://github.com/Ayima/onsite-search-data-mining
http://ayi.ma/gkbt8
Everything you see Today is
Available on our GitHub
16. Sales Forecasting
● Plan for the future
- Data driven motivation for big-picture marketing efforts
● Compare sales expectation to actual
- Justify marketing spend
- Be accountable for wins and losses
● Product forecasts
- Inform when and which products to promote
● Anomaly detection
- Identify and fix issues fast
17. Open Source Approach to Forecasting
Forecast
● Modeling daily sales
data, to forecast
revenue in
upcoming quarters
● Facebook’s open
source Python/R
library Prophet
● Alternatives:
- PowerBI
- Tableau
- Excel (ARIMA)
19. Justify Marketing Spend
● How did actual sales compare with the prediction?
● Especially helpful when during downtrends, when forecast
YoY is negative
20. Use Segments to Narrow Your Focus
Device Traffic Source Region
● Forecast on a per-segment basis to inform marketing plan & assess outcomes
- e.g. Forecast mobile + homepage to compare cell phone UX upgrade with expected
performance
● Fine tune forecasts by removing segments
- e.g. Remove previous campaign traffic to show “clean slate”
21. Data Driven Product Strategies
Men’s Zip Hoodie
Google Sunglasses
Forecast peak / minimum
demand
● 💡 Time paid advertising
campaigns on a per-product basis
(can be automated)
22. Data Driven Product Strategies
Men’s Zip Hoodie
Google Sunglasses
Understand long-term trends
● Useful for product design teams
● Attempt to correct trends with new
marketing angles (“fresh coat of paint”)
23. Data Driven Product Strategies
Men’s Zip Hoodie
Google Sunglasses
Quantify expectations
24. Sales Forecasting
● Forecasts are a highly applicable use case for AI in marketing
● By using open source, your forecasts can be:
- Automated & integrated with other processes
- Customizable
- Free
- 100% owned by your company
25. What’s in your customers shopping carts?
● Identify similar products
- Use knowledge of prior purchases for targeted marketing campaigns
- Identify promotional bundle opportunities
- Implement / audit realtime recommendation engine
- Inform UX design
26. Obvious Patterns = Quick Wins: Buying in Bulk
● People prefer to buy in
multiples of 5...
● 💡 Offer bulk discount rates?
27. Obvious Patterns = Quick Wins: Paired for Success
Top product pairs in transactions:
Men’s and Women’s Hoodies
➔ 💡 Link to other gender pair
item on PDPs?
28. Obvious Patterns = Quick Wins: Paired for Success
Top product pairs in transactions:
Youtube Products
➔ 💡 Offer discounted bundles of
YouTube items?
29. Obvious Patterns = Quick Wins: Associative Heatmap
More
frequently
bought
together
(colorbar)
Popular product
combinations:
Stickers
➔ 💡 Make stickers
available as
add-on item?
30. Mix and Match
Popular Google
Sunglasses colour
combinations:
More
frequently
bought
together
(colorbar)
Red +
Blue
● 77% of red
orders have
blue
● 60% of blue
orders have red
39. What’s in your customers shopping carts?
● Basic transaction patterns can be inspiration for
promotions (add ons, bundles, etc…)
● Algorithmic pattern mining finds more
complicated patterns
- Can be fully autonomous:
- Given shopping cart X, what items to
recommend?
- Constantly update rules based on
customer behaviour
40. ● Looking at onsite search data
● Understand customer point of view
- Are there navigation pain points?
- Should you think about stocking new products?
● Identify and track trends to inform marketing efforts
- Time promotions with periodic peak interest
- Look at overall trends. Are these specific to your website or global?
- Build content for upwards trending topics (+ SEO keywords 📈)
What are your customers searching for?
41. Onsite Search Dataset
● Google Merch Store onsite search
is not publically available
● We extracted onsite search data
from GA for a top European
fashion retailer
● Full source code for data
extraction via GA API with Python
is available on our GitHub [1]
[1] https://github.com/Ayima/onsite-search-data-mining
42. Understanding your Customer: Right Brain Thinking
● Word clouds
offer a visually
stimulating way
to interpret
information
● Appealing to
“right brain”
● SEO keyword
research + blog
topic inspiration
45. Word clouds kind of suck though...
● No context, hard to read, very
little data, etc…
● Better strategy: model and
visualize topics
46. Natural Language Processing (NLP)
1. “Supervised” approach:
a. Manually bucket sample of
search terms into topics
b. Train model
c. Apply to full dataset
2. “Unsupervised” approach:
a. Train model to automatically
group related words from search
terms into topic groups
b. Apply to full dataset
47. 1. “Supervised” approach:
a. Manually bucket sample of
search terms into topics
b. Train model
c. Apply to full dataset
2. “Unsupervised” approach:
a. Train model to automatically
cluster related words from search
terms into topic groups
b. Apply to full dataset
We’ll use Latent Dirichlet Allocation (LDA)
Natural Language Processing (NLP)
48. Brain Power Required
● Without “domain knowledge”,
the model outputs are useless...
● Iterative process:
a. Review clusters by eye
b. Adjust model parameters
and/or training data
c. Retrain model
● Once happy with results,
manually add topic labels
49. Let there be Topics!
● Map labelled topic model
back onto source data
(onsite searches)
50. Look for trends 🔎 “Dresses” and “Exotic Styles” most
popular in the summer
53. Paint a Clear Picture with Forecasting
● Seasonal trend
projections for
coming year(s)
54. Paint a Clear Picture with Forecasting
● Long term trends
up or down
55. Look for Opportunities or Diagnose Issues
with Google Trends
● Google trends data* is good
reference for how your
users “should” behave
* CSV tables available online or via unofficial APIs
Hmm, we would expect more
searches for “long sleeve tops” in
the Fall …
56. ● Onsite search provides a rich dataset where AI techniques can be applied to
help understand your customers and inform marketing decisions
- Keyword research & content inspiration
- Topic discovery
- Trending topic analysis
What are your customers searching for?
57. ● We looked at an assortment of general AI topics
- Note: AI excels at solving specific problems
● Sales forecasting
- Using open-source tools to customize,
automate and own your forecasts
● What’s in your customers shopping carts?
- Generating product recommendations
- Identifying products & bundles to promote
● What are your customers searching for?
- Timing promotions
- Topic discovery & trend analysis
Summary
58. Everything you saw Today is
Available on our GitHub
Thank you to the open-source Python development
community for building the tools I use! 👏
● Google Merch Store Data Mining
https://github.com/Ayima/google-merch-data-mining
http://ayi.ma/s6u0y
● Onsite Search API Data Extraction & Modeling
https://github.com/Ayima/onsite-search-data-mining
http://ayi.ma/gkbt8