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
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
4人目のSREはAgent
tanimuyk
0
180
2026年6月23日 Syncable Tech + Start Python Club にて
hamukazu
0
150
週末にループ・エンジニアリングの理解を深めるためのスライド
nagatsu
0
320
iOS アプリの「これって不具合ですか?」を AI に調べてもらう
miichan
0
140
【セミナー資料】Claude Code をセキュアに使うための考え方と設定の勘どころ / Claude Code Webinar 20260616
masahirokawahara
2
470
コミットの「なぜ」を読む
ota1022
0
120
徹底討論!ECS vs EKS!
daitak
3
1.7k
レガシーな広告配信システムでのAI駆動開発/運用の挑戦
i16fujimoto
0
120
事業会社における 機械学習・推薦システム技術の活用事例と必要な能力 / ml-recsys-in-layerx-wantedly-2026
yuya4
0
160
FPGAの開発コンペでZephyrを使ってみた
iotengineer22
0
200
AIAU_UMEMOGU_ninomiya_slide
ninomiya_ii
0
260
スタートアップにAmazon EKSは早すぎる? マルチプロダクト戦略を加速する Platform Engineeringの実践 / Is Amazon EKS Too Soon for Startups? Practical Platform Engineering to Accelerate a Multi-Product Strategy
elmodev09
1
1.8k
Featured
See All Featured
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
260
Designing Powerful Visuals for Engaging Learning
tmiket
1
430
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
340
Information Architects: The Missing Link in Design Systems
soysaucechin
0
980
30 Presentation Tips
portentint
PRO
1
330
Building Applications with DynamoDB
mza
96
7.1k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.5k
The Curse of the Amulet
leimatthew05
2
13k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.4k
Amusing Abliteration
ianozsvald
1
210
Are puppies a ranking factor?
jonoalderson
1
3.6k
WENDY [Excerpt]
tessaabrams
11
38k
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