Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 페이스북
- beanstalk
- Elastic Beanstalk
- fanzeel
- 알려줌
- react
- angular
- hybrid
- AWS
- https
- cors
- angular4
- 안드로이드
- S3
- 도메인
- node.js
- Route53
- 카카오톡
- swift
- node
- JavaScript
- TypeScript
- nextjs
- ios
- Android
- 웹뷰
- php
- NeXT
- 네이티브
- 감사일기
Archives
- Today
- Total
목록react-ga (1)
쪼렙 as! 풀스택
Nexjs 에서 구글 애널리틱스 사용하기.
나는 ReactGA 라이브러리를 쓰기로 했다. $ yarn add react-ga 모든 페이지에서 componentDidMount() 에다가, 페이지 트래킹 셋팅을 할 수 도 있겠지만, 그것은 좀 귀찮은 일이다. 그래서 next/Router 의 onRouteChangeComplete 리스너를 달아서, 라우팅주소가 변경될때마다, 자동으로 트래킹을 하게 만들었다. import ReactGA from 'react-ga';import Router from 'next/router' Router.onRouteChangeComplete = url => { console.log("라우트 체인지 컴플릿", url) const pathName = window.location.pathname; ReactGA.initiali..
개발 일지/Web & Server
2018. 9. 6. 11:40