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
180
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
320
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
650
Embarque App
jcemer
0
500
Componentes para a web
jcemer
15
1.2k
Other Decks in Technology
See All in Technology
260422_Sansan_Tech_Talk__関西_vol.3_データ活用のリアル__矢田__.pdf
sansantech
PRO
0
130
運用システムにおけるデータ活用とPlatform
sansantech
PRO
0
140
20260428_Product Management Summit_Loglass_JoeHirose
loglassjoe
3
4.2k
Anthropic「Long-running a gents」をGeminiで再現してみた
tkikuchi
0
670
AgentCore×VPCでの設計パターンn選と勘所
har1101
4
340
社内エンジニア勉強会の醍醐味と苦しみ/tamadev
nishiuma
0
250
データを"持てない"環境でのアノテーション基盤設計
sansantech
PRO
1
160
ServiceNow Knowledge 26 の歩き方
manarobot
0
240
AIが盛んな時代に 技術記事を書き始めて起きた私の中での小さな変化
peintangos
0
280
Angular Architecture Revisited Modernizing Angular Architectural Patterns
rainerhahnekamp
0
100
VespaのParent Childを用いたフィードパフォーマンスの改善
taking
0
130
20260423_執筆の工夫と裏側 技術書の企画から刊行まで / From the planning to the publication of technical book
nash_efp
3
640
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.8k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
380
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
170
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
270
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
680
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
BBQ
matthewcrist
89
10k
Typedesign – Prime Four
hannesfritz
42
3k
Building AI with AI
inesmontani
PRO
1
920
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
170
Design in an AI World
tapps
1
200
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