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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Jean Carlo Emer
October 27, 2016
Technology
190
0
Share
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
200
Cache em aplicações web
jcemer
0
330
Aplicações Web - um estudo sobre React
jcemer
1
210
Lapidando o Globo Play
jcemer
1
270
Desenvolvedor mobile precisa aprender Web
jcemer
1
140
Evolução e futuro do uso de paradigmas no JavaScript
jcemer
3
620
Tudo o que a web (podia ser) ainda será
jcemer
8
660
Embarque App
jcemer
0
500
Componentes para a web
jcemer
15
1.2k
Other Decks in Technology
See All in Technology
コーポレートサイトのアクセシビリティ改善とJIS準拠への実践
lycorptech_jp
PRO
2
110
基礎から解説!Icebergで紐解くSnowflake×Databricks連携の現在地
cm_yasuhara
0
160
論文紹介:Pixal3D (SIGGRAPH 2026)
tenten0727
0
680
GitHub Copilot CLI の Rubber Duck 機能を使ってコーディングの品質をあげよう #techbaton_findy
stefafafan
2
500
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
2.6k
"スキルファースト"で作る、AIの自走環境
subroh0508
1
680
AIAgentと取り組むKaggle
508shuto
2
490
AI全盛の今だからこそ、あえてもう一度振り返るAPIの基礎
smt7174
3
150
Directions Asia 2026 | Beyond Buildable AI Agents: Let’s Visualize Partner Value in the AI Era
ryoheig0405
0
150
SDDで⾒える、AIコーディングの"内訳"
lycorptech_jp
PRO
0
210
AI の技術 / AI technology
ks91
PRO
0
110
LT準備のToilを削減 〜決定論×確率論のスライド生成CLI〜
shukob
0
120
Featured
See All Featured
Designing for humans not robots
tammielis
254
26k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
170
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
190
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
910
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
70
39k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
200
Thoughts on Productivity
jonyablonski
76
5.2k
Statistics for Hackers
jakevdp
799
230k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
450
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
180
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
330
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