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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Jean Carlo Emer
October 27, 2016
Technology
0
180
Thinking metrics on React apps
Jean Carlo Emer
October 27, 2016
Tweet
Share
More Decks by Jean Carlo Emer
See All by Jean Carlo Emer
Web & Mobile
jcemer
1
190
Cache em aplicações web
jcemer
0
310
Aplicações Web - um estudo sobre React
jcemer
1
200
Lapidando o Globo Play
jcemer
1
270
Desenvolvedor mobile precisa aprender Web
jcemer
1
130
Evolução e futuro do uso de paradigmas no JavaScript
jcemer
3
620
Tudo o que a web (podia ser) ainda será
jcemer
8
640
Embarque App
jcemer
0
490
Componentes para a web
jcemer
15
1.2k
Other Decks in Technology
See All in Technology
スピンアウト講座03_CLAUDE-MDとSKILL-MD
overflowinc
0
900
Phase12_総括_自走化
overflowinc
0
1k
Phase03_ドキュメント管理
overflowinc
0
1.9k
会社紹介資料 / Sansan Company Profile
sansan33
PRO
16
410k
詳解 強化学習 / In-depth Guide to Reinforcement Learning
prinlab
0
360
「通るまでRe-run」から卒業!落ちないテストを書く勘所
asumikam
2
460
テストプロセスにおけるAI活用 :人間とAIの共存
hacomono
PRO
0
140
AgentCoreとLINEを使った飲食店おすすめアプリを作ってみた
yakumo
2
170
夢の無限スパゲッティ製造機 #phperkaigi
o0h
PRO
0
330
生成AIで速度と品質を両立する、QAエンジニア・開発者連携のAI協調型テストプロセス
shota_kusaba
0
380
SaaSに宿る21g
kanyamaguc
2
110
GitHub Copilot CLI で Azure Portal to Bicep
tsubakimoto_s
0
170
Featured
See All Featured
Navigating Team Friction
lara
192
16k
Designing for Performance
lara
611
70k
So, you think you're a good person
axbom
PRO
2
2k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
480
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
800
Navigating Weather and Climate Data
rabernat
0
140
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
330
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
96
Claude Code のすすめ
schroneko
67
220k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.5k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
230
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