SlideShare a Scribd company logo
Metrics on the front, party
data in the back
Approaches to bringing metrics to the front end
Matt Fellows
@matthewfellows
github.com/mefellows
WARNING:
Intended for mature audiences only. Content may contain
harsh and/or violent outbreaks concerning Adobe Analytics.
Offended viewers are advised to stop using the product
immediately and take the team go-karting with the savings.
Why do we need metrics?
Down the rabbit hole
“Alice: Would you tell me, please, which way I ought to go from here?
The Cheshire Cat: That depends a good deal on where you want to get to.
Alice: I don't much care where.
The Cheshire Cat: Then it doesn't much matter which way you go.
― Lewis Carroll, Alice in Wonderland
If we are to succeed, we ought to know where we are and where we’re
going
The lesson?
Metrics on the front, data in the back
Hit Counters - The Analytics Dark Ages
Hit counters tell us basically nothing about how to improve our website:
● We don’t know what we could do to improve the site
● We can’t distinguish between real people and crawlers
● We can’t tell if changing the comic, or the navigation or making
pretty pictures makes any difference at all
We need a way to measure things in more detail to improve our
chances of adding business value
So we evolved….
Analytics 2.0
s.businessUnit = 'ske';
s.country = 'au';
s.platform = 'd';
s.section = 'homepage';
require(['omniture'], function (omniture) {
var queueTrackingOnly = 'false';
if (queueTrackingOnly == 'true' && omniture.store) {
omniture.store({"pageName":"home page","channel":"home","prop4":"home page","prop6":"home","prop11":"b19ee802-ce67-e511-80e9-
6c3be5b017d4","prop12":"loggedin","prop54":"c79529bc-4559-49be-a5b6-8fc8b42c27be","eVar54":"c79529bc-4559-49be-a5b6-8fc8b42c27be"});
}
else {
s.pageName = 'home page';
s.channel = 'home';
s.prop4 = 'home page';
s.prop6 = 'home';
s.prop11 = 'b19ee802-ce67-e511-80e9-6c3be5b017d4';
s.prop12 = 'loggedin';
s.prop54 = 'c79529bc-4559-49be-a5b6-8fc8b42c27be';
var s_code = s.t(); if (s_code) document.write(s_code);
}
});
Analytics 2.0
Instead of sticking hit counters on our websites, we stuck large chunks
of of javascript into our web pages...
And it was good
Metrics on the front, data in the back
Analytics 2.0
Told us a hell of a lot about what people did on our websites
(Impressions, Attribution, Funnel Analysis and so on).
But...
1. Designed for business users
2. Lack APIs
3. Cumbersome to implement
4. Real-time (no - they are lying)
5. Data Monoliths (do you own your data and can you query it?)
Metrics on the front, data in the back
The Lean Startup
http://theleanstartup.com/principles
Lean Startup
Build, measure, learn and repeat.
This changed the landscape in a number of fundamental ways:
● Develop -> deploy cycle had to shrink
● Rise of DevOps & Continuous Delivery
● Requires better visibility into operational and business metrics
Previous generation tooling insufficient for this purpose.
New Generation Analytics Platforms
Complement traditional analytics tools, and are
1. Designed for technical users
2. API first
3. Easier to implement
4. Near real-time
5. Data ownership
6. Alerts/Notifications
We can now begin ask questions and answer them immediately:
“Did my change to the Widget result in more, less or no change?”
New Generation Analytics Platforms
Commercial
1. keen.io
2. segment.io
3. trak.io
4. KISS Metrics
5. Datadog <- this one is nice!
Open Source:
4. SGG Stack (Statsd, Graphite and Grafana) <- start here
5. TICK Stack (Telegraf, InfluxDB, Chronograf, Kapacitor)
We can take ownership of the metrics we need
Isomorphic Universal Metrics
Metrics on the front and back
Creating, deploying and integrating our own metrics stack is easy.
Implementation
Implementation Architecture
1. React front-end (canonical TODO App) + Redux
2. Metrics Stack
a. Statsd as wire protocol
b. InfluxDB as the time-series database
c. Bucky to broker web <-> InfluxDB
3. All wired together with Docker
Challenge: Sending metrics to statsd (UDP) from Node and direct
from the browser.
Implementation
Bucky to the rescue
Implementation
Setup Bucky...
import bucky from 'bucky';
import { metricsHost, metricsIsEnabled } from 'config';
bucky
.setOptions({
host: metricsHost,
active: metricsIsEnabled
});
import analytics from 'redux-analytics';
const track = ({ type, payload = {} }) => {
const { value = 1 } = payload;
const key = `mymetricnamespace.actions.${type}`;
bucky.count(key, value);
};
const analyticsMiddleware = analytics(track, ({ meta }) =>
meta.metrics);
Create some Redux middleware
Add metadata to Flux Standard Action
const action = {
type: 'MY_ACTION',
meta: {
metrics: {
type: 'my-analytics-event',
payload: {
postfix: 'special', //
value: 3 // default is 1
}
}
}
};
// Will result in the statsd metric ${metricsPrefix}.actions.my-analytics-event.special to be incremented by 3
Metrics on the front, data in the back
Manual Instrumentation
import bucky from 'bucky';
class HelloApp extends React.Component {
constructor(props) {
super(props);
bucky.send('helloapp.constructor', 2432.43434); // gauge
this.state = {
filterType: 'all'
};
}
Creating, deploying and integrating our own metrics stack is easy.
Demo
Universal React with metrics
https://github.com/mefellows/react-redux-todo-app/
Matt Fellows
PRESENTED BY:
@matthewfellows
github.com/mefellows
Thank you!
■ Bucky (http://github.hubspot.com/bucky/)
■ Metrics, Metrics Everywhere
(https://dl.dropboxusercontent.com/u/2744222/2011-04-09-
Metrics-Metrics-Everywhere.pdf)
■ Redux Analytics (https://github.com/markdalgleish/redux-
analytics)
■ StatsD (https://github.com/etsy/statsd/)
■ TICK Docker (https://github.com/mefellows/docker-tick)
■ Fun Omniture Memes
■ TODO App: React + Redux + Bucky + TICK Demo
(https://github.com/mefellows/react-redux-todo-app/)
References

More Related Content

PDF
Web Performance Culture and Tools at Etsy
PDF
Take My Logs. Please!
PDF
Metrics-Driven Engineering
PDF
Build an App with JavaScript and jQuery - LA - July 27
PDF
PWA 應用 - 實現網站離線瀏覽
TXT
Energy ~ nikola tesla secret ~ 9 79% conv ~ 100% comm of $110 sale teslaecoe...
PDF
Baekjoon Online Judge 1648번 풀이
PDF
Health Monitoring
Web Performance Culture and Tools at Etsy
Take My Logs. Please!
Metrics-Driven Engineering
Build an App with JavaScript and jQuery - LA - July 27
PWA 應用 - 實現網站離線瀏覽
Energy ~ nikola tesla secret ~ 9 79% conv ~ 100% comm of $110 sale teslaecoe...
Baekjoon Online Judge 1648번 풀이
Health Monitoring

Viewers also liked (19)

PPT
HistChine 5.10
PPTX
Parotid Tumor (Indonesian Language)
PDF
2016 03 Mieux connaître le marché du MICE
PPTX
IDRC - B Signer - v4
PDF
Zen and Taxonomy Communication - The Art of Facilitating & Communicating Taxo...
PPT
The importance of rest
PDF
Enterprise Knowledge and National Park Service KMWorld 2015 Presentation
PDF
Membuat Presentasi Menarik Menggunakan Prezi
PPT
Tutor core 01 handle and store materials
PPTX
Pedestrian safety powerpoint
PDF
Consumer Driven Contracts and Your Microservice Architecture @ Warsaw JUG
PPTX
Portrait de startuper #40 - DraftQuest - David Meulemans
PPTX
Portrait de startuper #44 - Dynseo - Justine Sauquet
PPTX
GRF IDRC 2014_presentation_CALVELLO
PPTX
4- Emergency Preparedness in the supply chain- Chaimongkol
PDF
порядок аттест педработ
PDF
о методобъединении
PDF
4344
PPT
Лекция №1
HistChine 5.10
Parotid Tumor (Indonesian Language)
2016 03 Mieux connaître le marché du MICE
IDRC - B Signer - v4
Zen and Taxonomy Communication - The Art of Facilitating & Communicating Taxo...
The importance of rest
Enterprise Knowledge and National Park Service KMWorld 2015 Presentation
Membuat Presentasi Menarik Menggunakan Prezi
Tutor core 01 handle and store materials
Pedestrian safety powerpoint
Consumer Driven Contracts and Your Microservice Architecture @ Warsaw JUG
Portrait de startuper #40 - DraftQuest - David Meulemans
Portrait de startuper #44 - Dynseo - Justine Sauquet
GRF IDRC 2014_presentation_CALVELLO
4- Emergency Preparedness in the supply chain- Chaimongkol
порядок аттест педработ
о методобъединении
4344
Лекция №1
Ad

Similar to Metrics on the front, data in the back (20)

PDF
How Bitbucket Pipelines Loads Connect UI Assets Super-fast
PDF
Downloading the internet with Python + Scrapy
PDF
With Great Nerdery Comes Great Responsibility
PPTX
Grokking Engineering - Data Analytics Infrastructure at Viki - Huy Nguyen
PDF
JCConf 2016 - Google Dataflow 小試
PDF
Drools 6.0 (Red Hat Summit)
ODP
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
ODP
Intravert Server side processing for Cassandra
PPTX
Revolver
PDF
Browsers with Wings
PDF
Make your animations perform well
PPTX
Fast by Default
KEY
Jarv.us Showcase — SenchaCon 2011
PDF
Turku loves-storybook-styleguidist-styled-components
PDF
Asynchronous single page applications without a line of HTML or Javascript, o...
PDF
Bootiful Development with Spring Boot and React - UberConf 2018
PDF
apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...
PDF
From Idea to App (or “How we roll at Small Town Heroes”)
PDF
Playing With The Web
PDF
Make Your Animations Perform Well - JS Conf Budapest 2017
How Bitbucket Pipelines Loads Connect UI Assets Super-fast
Downloading the internet with Python + Scrapy
With Great Nerdery Comes Great Responsibility
Grokking Engineering - Data Analytics Infrastructure at Viki - Huy Nguyen
JCConf 2016 - Google Dataflow 小試
Drools 6.0 (Red Hat Summit)
NYC* 2013 - "Advanced Data Processing: Beyond Queries and Slices"
Intravert Server side processing for Cassandra
Revolver
Browsers with Wings
Make your animations perform well
Fast by Default
Jarv.us Showcase — SenchaCon 2011
Turku loves-storybook-styleguidist-styled-components
Asynchronous single page applications without a line of HTML or Javascript, o...
Bootiful Development with Spring Boot and React - UberConf 2018
apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...
From Idea to App (or “How we roll at Small Town Heroes”)
Playing With The Web
Make Your Animations Perform Well - JS Conf Budapest 2017
Ad

More from DiUS (20)

PDF
Lunch and Learn: You have the data, now what?
PDF
How to build confidence in your release cycle
PDF
Serverless microservices: Test smarter, not harder
PDF
Test Smart, not hard
PDF
10 things-to-inspire-in-10-mins
PDF
Trends and development practices in Serverless architectures
PDF
Deploying large-scale, serverless and asynchronous systems - without integrat...
PDF
The Diversity Dilemma - Supporting our Sisters in STEM
PDF
GameDay - Achieving resilience through Chaos Engineering
PDF
The case for consumer-driven contracts
PDF
Deploy with Confidence using Pact Go!
PDF
Crafting Quality Software
PPTX
Antifragility and testing for distributed systems failure
PDF
DIY IoT Backend
PDF
How to Build Hardware Lean
PDF
Behaviour Change and Coaching: What we can learn from BJ Fogg
PDF
Power in Agile Teams
PPTX
The Diversity Dilemma: Attracting and Retaining Talented Women in Technology-...
PDF
Rise of the machines: Continuous Delivery at SEEK - YOW! Night Summary Slides
PPTX
AWS Summit Melbourne 2014 | The Path to Business Agility for Vodafone: How Am...
Lunch and Learn: You have the data, now what?
How to build confidence in your release cycle
Serverless microservices: Test smarter, not harder
Test Smart, not hard
10 things-to-inspire-in-10-mins
Trends and development practices in Serverless architectures
Deploying large-scale, serverless and asynchronous systems - without integrat...
The Diversity Dilemma - Supporting our Sisters in STEM
GameDay - Achieving resilience through Chaos Engineering
The case for consumer-driven contracts
Deploy with Confidence using Pact Go!
Crafting Quality Software
Antifragility and testing for distributed systems failure
DIY IoT Backend
How to Build Hardware Lean
Behaviour Change and Coaching: What we can learn from BJ Fogg
Power in Agile Teams
The Diversity Dilemma: Attracting and Retaining Talented Women in Technology-...
Rise of the machines: Continuous Delivery at SEEK - YOW! Night Summary Slides
AWS Summit Melbourne 2014 | The Path to Business Agility for Vodafone: How Am...

Recently uploaded (20)

PPTX
Introuction about ICD -10 and ICD-11 PPT.pptx
PPTX
artificial intelligence overview of it and more
PDF
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
PPT
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
PPTX
presentation_pfe-universite-molay-seltan.pptx
PPT
tcp ip networks nd ip layering assotred slides
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PPTX
Digital Literacy And Online Safety on internet
PDF
How to Ensure Data Integrity During Shopify Migration_ Best Practices for Sec...
PDF
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
PDF
Sims 4 Historia para lo sims 4 para jugar
PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PDF
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
PDF
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
PPTX
innovation process that make everything different.pptx
PDF
Cloud-Scale Log Monitoring _ Datadog.pdf
PPTX
Introduction to Information and Communication Technology
PDF
Testing WebRTC applications at scale.pdf
PDF
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
Introuction about ICD -10 and ICD-11 PPT.pptx
artificial intelligence overview of it and more
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
presentation_pfe-universite-molay-seltan.pptx
tcp ip networks nd ip layering assotred slides
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
Digital Literacy And Online Safety on internet
How to Ensure Data Integrity During Shopify Migration_ Best Practices for Sec...
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
Sims 4 Historia para lo sims 4 para jugar
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
The New Creative Director: How AI Tools for Social Media Content Creation Are...
innovation process that make everything different.pptx
Cloud-Scale Log Monitoring _ Datadog.pdf
Introduction to Information and Communication Technology
Testing WebRTC applications at scale.pdf
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...

Metrics on the front, data in the back

  • 1. Metrics on the front, party data in the back Approaches to bringing metrics to the front end Matt Fellows @matthewfellows github.com/mefellows
  • 2. WARNING: Intended for mature audiences only. Content may contain harsh and/or violent outbreaks concerning Adobe Analytics. Offended viewers are advised to stop using the product immediately and take the team go-karting with the savings.
  • 3. Why do we need metrics? Down the rabbit hole
  • 4. “Alice: Would you tell me, please, which way I ought to go from here? The Cheshire Cat: That depends a good deal on where you want to get to. Alice: I don't much care where. The Cheshire Cat: Then it doesn't much matter which way you go. ― Lewis Carroll, Alice in Wonderland
  • 5. If we are to succeed, we ought to know where we are and where we’re going The lesson?
  • 7. Hit Counters - The Analytics Dark Ages Hit counters tell us basically nothing about how to improve our website: ● We don’t know what we could do to improve the site ● We can’t distinguish between real people and crawlers ● We can’t tell if changing the comic, or the navigation or making pretty pictures makes any difference at all We need a way to measure things in more detail to improve our chances of adding business value So we evolved….
  • 8. Analytics 2.0 s.businessUnit = 'ske'; s.country = 'au'; s.platform = 'd'; s.section = 'homepage'; require(['omniture'], function (omniture) { var queueTrackingOnly = 'false'; if (queueTrackingOnly == 'true' && omniture.store) { omniture.store({"pageName":"home page","channel":"home","prop4":"home page","prop6":"home","prop11":"b19ee802-ce67-e511-80e9- 6c3be5b017d4","prop12":"loggedin","prop54":"c79529bc-4559-49be-a5b6-8fc8b42c27be","eVar54":"c79529bc-4559-49be-a5b6-8fc8b42c27be"}); } else { s.pageName = 'home page'; s.channel = 'home'; s.prop4 = 'home page'; s.prop6 = 'home'; s.prop11 = 'b19ee802-ce67-e511-80e9-6c3be5b017d4'; s.prop12 = 'loggedin'; s.prop54 = 'c79529bc-4559-49be-a5b6-8fc8b42c27be'; var s_code = s.t(); if (s_code) document.write(s_code); } });
  • 9. Analytics 2.0 Instead of sticking hit counters on our websites, we stuck large chunks of of javascript into our web pages... And it was good
  • 11. Analytics 2.0 Told us a hell of a lot about what people did on our websites (Impressions, Attribution, Funnel Analysis and so on). But... 1. Designed for business users 2. Lack APIs 3. Cumbersome to implement 4. Real-time (no - they are lying) 5. Data Monoliths (do you own your data and can you query it?)
  • 14. Lean Startup Build, measure, learn and repeat. This changed the landscape in a number of fundamental ways: ● Develop -> deploy cycle had to shrink ● Rise of DevOps & Continuous Delivery ● Requires better visibility into operational and business metrics Previous generation tooling insufficient for this purpose.
  • 15. New Generation Analytics Platforms Complement traditional analytics tools, and are 1. Designed for technical users 2. API first 3. Easier to implement 4. Near real-time 5. Data ownership 6. Alerts/Notifications We can now begin ask questions and answer them immediately: “Did my change to the Widget result in more, less or no change?”
  • 16. New Generation Analytics Platforms Commercial 1. keen.io 2. segment.io 3. trak.io 4. KISS Metrics 5. Datadog <- this one is nice! Open Source: 4. SGG Stack (Statsd, Graphite and Grafana) <- start here 5. TICK Stack (Telegraf, InfluxDB, Chronograf, Kapacitor)
  • 17. We can take ownership of the metrics we need
  • 18. Isomorphic Universal Metrics Metrics on the front and back
  • 19. Creating, deploying and integrating our own metrics stack is easy. Implementation
  • 21. 1. React front-end (canonical TODO App) + Redux 2. Metrics Stack a. Statsd as wire protocol b. InfluxDB as the time-series database c. Bucky to broker web <-> InfluxDB 3. All wired together with Docker Challenge: Sending metrics to statsd (UDP) from Node and direct from the browser. Implementation
  • 22. Bucky to the rescue Implementation
  • 23. Setup Bucky... import bucky from 'bucky'; import { metricsHost, metricsIsEnabled } from 'config'; bucky .setOptions({ host: metricsHost, active: metricsIsEnabled });
  • 24. import analytics from 'redux-analytics'; const track = ({ type, payload = {} }) => { const { value = 1 } = payload; const key = `mymetricnamespace.actions.${type}`; bucky.count(key, value); }; const analyticsMiddleware = analytics(track, ({ meta }) => meta.metrics); Create some Redux middleware
  • 25. Add metadata to Flux Standard Action const action = { type: 'MY_ACTION', meta: { metrics: { type: 'my-analytics-event', payload: { postfix: 'special', // value: 3 // default is 1 } } } }; // Will result in the statsd metric ${metricsPrefix}.actions.my-analytics-event.special to be incremented by 3
  • 27. Manual Instrumentation import bucky from 'bucky'; class HelloApp extends React.Component { constructor(props) { super(props); bucky.send('helloapp.constructor', 2432.43434); // gauge this.state = { filterType: 'all' }; }
  • 28. Creating, deploying and integrating our own metrics stack is easy.
  • 29. Demo Universal React with metrics https://github.com/mefellows/react-redux-todo-app/
  • 31. ■ Bucky (http://github.hubspot.com/bucky/) ■ Metrics, Metrics Everywhere (https://dl.dropboxusercontent.com/u/2744222/2011-04-09- Metrics-Metrics-Everywhere.pdf) ■ Redux Analytics (https://github.com/markdalgleish/redux- analytics) ■ StatsD (https://github.com/etsy/statsd/) ■ TICK Docker (https://github.com/mefellows/docker-tick) ■ Fun Omniture Memes ■ TODO App: React + Redux + Bucky + TICK Demo (https://github.com/mefellows/react-redux-todo-app/) References