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
"うちにはまだ早い"は本当? ─ 小さく始めるPlatform Engineering入門
harukasakihara
6
550
アプリブロック機能のつくりかたと、AIとHTMLの不合理な相性の良さについて
kumamotone
1
250
クラウドネイティブ DB はいかにして制約を 克服したか? 〜進化歴史から紐解く、スケーラブルアーキテクチャ設計指針〜
hacomono
PRO
6
950
古今東西SRE
okaru
2
190
生成AI時代に信頼性をどう保ち続けるか - Policy as Code の実践
akitok_
1
240
AI 時代の Platform Engineering
recruitengineers
PRO
1
180
「背中を見て育て」からの卒業 〜専門技術としてのテスト設計を軸に、品質保証のバトンを繋ぐ〜 #genda_tech_talk
nihonbuson
PRO
3
1.3k
【関西製造業祭り2026春】現場を変える技術はここまで来た〜世界最大の製造業見本市から持って帰ってきたもの〜
tanakaseiya
0
140
CyberAgent YJC Connect
shimaf4979
1
180
Gaussian Splattingの表現力を拡張する — 高周波再構成とインタラクションへのアプローチ —
gpuunite_official
0
170
AIエージェントの支払い基盤 AgentCore Payments概要
kmiya84377
2
180
毎日の作業を Claude Code 経由にしたら、 ノウハウがコードになった
kossykinto
1
1.3k
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.6k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
190
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Fireside Chat
paigeccino
42
3.9k
Practical Orchestrator
shlominoach
191
11k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
390
Technical Leadership for Architectural Decision Making
baasie
3
360
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
740
HDC tutorial
michielstock
2
660
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
From π to Pie charts
rasagy
0
180
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