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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Jean Carlo Emer
October 27, 2016
Technology
200
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
Transcript
22 slides
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
More Decks by Jean Carlo Emer
See All by Jean Carlo Emer
Web & Mobile
jcemer
1
220
Cache em aplicações web
jcemer
0
350
Aplicações Web - um estudo sobre React
jcemer
1
230
Lapidando o Globo Play
jcemer
1
290
Desenvolvedor mobile precisa aprender Web
jcemer
1
160
Evolução e futuro do uso de paradigmas no JavaScript
jcemer
3
650
Tudo o que a web (podia ser) ainda será
jcemer
8
700
Embarque App
jcemer
0
510
Componentes para a web
jcemer
15
1.2k
Other Decks in Technology
See All in Technology
複数システムが同居した 15 年物の AWS アカウントを解体するための考古学
wa6sn
3
140
ライフワーク「猫でもわかるDirectConnect」
kentapapa
0
330
AWS Quick 入門 | 目指せ Quick マスター 01
inariku
PRO
2
340
Kiro Crew 入門 (手を離しても進む仕事) | 目指せ Kiro マスター 11
inariku
PRO
4
730
JAWS_FESTA2026_オンプレ-AWS間プロキシサーバの移行_性能_障害対応で得た実践ノウハウ_高島一晃.pdf
tkazuaki0820
1
110
AI時代の組織作り:チーム開発から「個人×AI」への移行と、持続可能な「開発資本」の築き方
ham0215
3
830
81天的 AI Agent 軟體開發團隊治理實務分享
regionbbs
0
160
AI時代における医療情報システムのセキュリティ / Security of Healthcare IT Systems in the AI Era
henryofficial
0
160
Context != Context: One window, many lifecycles (AI Native DevCon, Nov 2026)
birgitta410
0
120
E2E Test というハーネス — AI時代の自動テスト民主化
daishukojima
0
300
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
17
120k
【Oracle AI SPOTLIGHT ウェビナー】【特別開催:日本語で解説!】Oracle AI World 2026 最新情報フィードバック
oracle4engineer
PRO
1
200
Featured
See All Featured
Utilizing Notion as your number one productivity tool
mfonobong
4
640
Building Applications with DynamoDB
mza
96
7.3k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
320
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
Testing 201, or: Great Expectations
jmmastey
46
8.4k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.2k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
The Art of Programming - Codeland 2020
erikaheidi
57
14k