Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Thinking metrics on React apps
Search
Jean Carlo Emer
October 27, 2016
Technology
190
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Thinking metrics on React apps
Jean Carlo Emer
October 27, 2016
More Decks by Jean Carlo Emer
See All by Jean Carlo Emer
Web & Mobile
jcemer
1
210
Cache em aplicações web
jcemer
0
340
Aplicações Web - um estudo sobre React
jcemer
1
220
Lapidando o Globo Play
jcemer
1
290
Desenvolvedor mobile precisa aprender Web
jcemer
1
150
Evolução e futuro do uso de paradigmas no JavaScript
jcemer
3
640
Tudo o que a web (podia ser) ainda será
jcemer
8
680
Embarque App
jcemer
0
510
Componentes para a web
jcemer
15
1.2k
Other Decks in Technology
See All in Technology
【Oracle AI Spotlight ウェビナー】AWSか、Azureか、Google Cloudか。その議論にオラクルを含める意義。
oracle4engineer
PRO
1
160
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
54k
AWSとGitHub Actionsの責任境界と 組織で安全に使用する取り組み
nealle
1
240
AI駆動開発を組織で促すために
lycorptech_jp
PRO
7
9.1k
OAuth SPIFFE Client Authentication(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
420
承認ゲートは何を守っているのか? AIエージェントの自律購入を実測した結果
yama3133
1
110
AI時代のデータ基盤を考える問い
pacocat
0
800
PM領域でのAI Agentの活用
lycorptech_jp
PRO
0
200
Sony-DroidKaigi2026
sony
0
190
サーバー常駐型の 簡易障害調査AI エージェントを作ってみた話
masayoshi
1
500
「面白い!」を信じ抜け。激動の時代を貫く、オンリーワン・エンジニアの条件
kizawa2020
2
590
markdown-poster Introduction
kazamori
0
450
Featured
See All Featured
How to Talk to Developers About Accessibility
jct
2
530
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
400
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
57k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
400
Exploring anti-patterns in Rails
aemeredith
3
480
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Designing for Performance
lara
611
70k
Making Projects Easy
brettharned
120
6.7k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
660
The Pragmatic Product Professional
lauravandoore
37
7.4k
Transcript
Thinking metrics on React apps @jcemer
I work on GloboPlay. globo.com
None
None
React Router 2.0 & Server side render & Client side
user login
1. How can we track our traffic with Google
Analytics?
<PageView location={this.props.location} />
@PureRender class PageView extends Component { static propTypes = {
location: PropTypes.object.isRequired } componentDidMount() { const { action, state } = this.props.location trackPageView(action, state) } componentDidUpdate() { /* */ } }
2. How can we analyse custom data?
Global metrics data: user account info & app version
<DocumentMetrics data={{ appVersion: "2.3" }} />
function handleStateChangeOnClient(vars) { setMetricsDataLayer(vars) } export default withSideEffect( reducePropsToState, handleStateChangeOnClient
)(DocumentMetrics) https://github.com/ gaearon/react-side-effect
3. How can we track the user navigation flow?
Playlist Recommendation
Component metrics: playlist or other lists
<Playlist /> <Recommendation /> <Video /> is a list of
<Video /> is a list of
<Playlist /> <Recommendation /> <Video metrics="playlist" /> is a
list of <Video metrics="recommendation" /> is a list of
<LinkMetrics data="playlist"> <Playlist /> </LinkMetrics> https://facebook.github.io/ react/docs/context.html
class Video extends Component { static contextTypes = { linkMetrics:
PropTypes.object } render() { const state = { metrics: this.context.linkMetrics } return <Link state={state}>/* ... */</Link> } }
* redux should be an option too
Components React side effect Context
Thank you! @jcemer