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
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
More Decks by Jean Carlo Emer
See All by Jean Carlo Emer
Web & Mobile
jcemer
1
220
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
160
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
遠藤な_めぐろLT #38 「社内のAI活用推進」@麻布台_20261009
endonanana
0
120
AI駆動開発の時代になったのでトヨタ生産方式から見直す
terurou
7
5.9k
ソフトウェア ファクトリー - 再現性のあるソフトウェアの工場づくり / Software factory
iktakahiro
1
700
Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
0
160
契約書画像からの情報抽出に特化した視覚接地モデルを育てる話
sansantech
PRO
1
170
AI時代のPRレビューにどう向き合うか?
kairim0
1
220
FOSS4Gを活用した自治体業務DXの試み
470715
0
150
大型犬好きによるPugの紹介
yamanoku
1
150
二歩目のフロントエンド・ウェブアクセシビリティ
camiha
2
430
Claude Code本は、どのように執筆チームで書かれたか
oikon48
1
360
Post AI時代のリファクタリング実践記 / Refactoring in the post AI era
kaminashi
1
180
自分で立ててみるLLMサービス
y_sera15
0
160
Featured
See All Featured
Facilitating Awesome Meetings
lara
57
7.2k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
550
The SEO identity crisis: Don't let AI make you average
varn
0
590
YesSQL, Process and Tooling at Scale
rocio
174
15k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
ラッコキーワード サービス紹介資料
rakko
1
5.3M
Building an army of robots
kneath
307
47k
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
460
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
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