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
330
Aplicações Web - um estudo sobre React
jcemer
1
210
Lapidando o Globo Play
jcemer
1
280
Desenvolvedor mobile precisa aprender Web
jcemer
1
150
Evolução e futuro do uso de paradigmas no JavaScript
jcemer
3
630
Tudo o que a web (podia ser) ainda será
jcemer
8
670
Embarque App
jcemer
0
500
Componentes para a web
jcemer
15
1.2k
Other Decks in Technology
See All in Technology
AI時代のYAGNI:「爆速で無駄になった機能」からの学び / 20260720 Naoki Takahashi
shift_evolve
PRO
3
350
「早く出す」より「事業に効く」 ── 顧客の業務サイクルから逆算するAI時代の二重ループ開発と「変化の設計者」 / devsumi2026
rakus_dev
1
420
「守りたい体験」を渡すだけで E2E を生成させられるようになった話
hinac0
1
720
GoでCコンパイラを作った話
repunit
0
130
凡エンジニアがこの先生きのこるためには。〜TypeScript完全に理解したい〜
alchemy1115
2
310
AICoEでAIネイティブ組織への進化
yukiogawa
0
200
非定型なドキュメントを効率よくリファクタする 〜えぇ!?仕様書27本の移行が1日で終わったって!?〜
subroh0508
2
570
SRE本の知られざる名シーン / The Hidden Gems of Google SRE Book
nari_ex
1
430
AI時代の開発生産性は、個人技からチーム設計へ
moongift
PRO
4
2.4k
DatabricksにおけるMCPソリューション
taka_aki
1
280
AIが当たり前の組織で エンジニアはどう育つか
nishihira
0
110
AIが実装を自走する時代の認知負債との戦い
lycorptech_jp
PRO
1
500
Featured
See All Featured
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
320
How to Think Like a Performance Engineer
csswizardry
28
2.7k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
390
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
180
Building the Perfect Custom Keyboard
takai
2
810
A Soul's Torment
seathinner
6
3.1k
[SF Ruby Conf 2025] Rails X
palkan
2
1.2k
Building Applications with DynamoDB
mza
96
7.1k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
What's in a price? How to price your products and services
michaelherold
247
13k
Ruling the World: When Life Gets Gamed
codingconduct
0
280
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.2k
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