Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
690
Embarque App
jcemer
0
510
Componentes para a web
jcemer
15
1.2k
Other Decks in Technology
See All in Technology
AIエージェントの自己改善をどう設計するか / How to Design Self-Improvement for AI Agents
22mi
25
17k
Slack上でインフラをトラブルシュートする! Agentic Platform Engineeringの第一歩
teru0x1
5
1.9k
アプリログインとWeb認証基盤をつなぐ ASWebAuthenticationSession 作法
shimastripe
1
390
AI時代、データエンジニアが一番おもろい
genshun9
0
680
AIは推し活である。
kurazuuuuuu
1
940
絵ではじめるKubernetesセキュリティ
aoi1
4
700
Oracle Cloud Network Path Analyzerを試してみた/I Tried Out Oracle Cloud Network Path Analyzer
masakiokuda
1
110
今話題のAI「Jev」って何? 宇宙最速で学ぶ会
minorun365
PRO
30
19k
Goodbye ShellScript, Hello File-based App
shunsock
0
670
AIエージェントを最高のパートナーに育てる方法|評価と判断軸を育てる5つのステップ
koichiaoki
1
160
Minecraft JavaのMODをSwiftで作る
1mash0
0
200
Kiro Meetup #8 Kiro アップデート (2026/3/21〜2026/9/24)
katzueno
1
110
Featured
See All Featured
It's Worth the Effort
3n
188
29k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Odyssey Design
rkendrick25
PRO
2
810
Making Projects Easy
brettharned
120
6.8k
Crafting Experiences
bethany
1
350
We Are The Robots
honzajavorek
0
380
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1k
Automating Front-end Workflow
addyosmani
1369
210k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
460
Designing for humans not robots
tammielis
254
26k
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