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
0
170
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
300
Aplicações Web - um estudo sobre React
jcemer
1
190
Lapidando o Globo Play
jcemer
1
260
Desenvolvedor mobile precisa aprender Web
jcemer
1
120
Evolução e futuro do uso de paradigmas no JavaScript
jcemer
3
610
Tudo o que a web (podia ser) ainda será
jcemer
8
630
Embarque App
jcemer
0
490
Componentes para a web
jcemer
15
1.2k
Other Decks in Technology
See All in Technology
AI Agent Agentic Workflow の可観測性 / Observability of AI Agent Agentic Workflow
yuzujoe
0
220
CQRS/ESになぜアクターモデルが必要なのか
j5ik2o
0
930
産業的変化も組織的変化も乗り越えられるチームへの成長 〜チームの変化から見出す明るい未来〜
kakehashi
PRO
1
530
Data Hubグループ 紹介資料
sansan33
PRO
0
2.6k
歴史から学ぶ、Goのメモリ管理基礎
logica0419
14
2.7k
I tried making a solo advent calendar!
zzzzico
0
150
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
2.9k
テストセンター受験、オンライン受験、どっちなんだい?
yama3133
0
210
Oracle Cloud Infrastructure:2025年12月度サービス・アップデート
oracle4engineer
PRO
0
270
Digitization部 紹介資料
sansan33
PRO
1
6.5k
re:Invent2025 セッションレポ ~Spec-driven development with Kiro~
nrinetcom
PRO
2
170
AIと融ける人間の冒険
pujisi
0
120
Featured
See All Featured
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
36
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
32
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
110
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
100
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
GitHub's CSS Performance
jonrohan
1032
470k
Chasing Engaging Ingredients in Design
codingconduct
0
97
Building Applications with DynamoDB
mza
96
6.9k
Optimizing for Happiness
mojombo
379
70k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1k
Done Done
chrislema
186
16k
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