philipwalton/analyticsjs-boilerplate
소개
analytics.js 사용 예제와 모범 사례.
학습 및 교육측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- -1
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalanalytics.js boilerplate
Best practices for implementing analytics.js on modern websites.
For an in-depth explanation of all the features used in this boilerplate (as well as how to report on them), see my article:
The Google Analytics Setup I Use on Every Site I Build →
Boilerplate versions
analytics/base.js
The base boilerplate extends the default tracking snippet and includes the following features:
- Tracks uncaught errors.
- Tracks custom user, session, and hit-level dimensions.
- Sends an initial pageview.
- Sends a pageload performance event.
analytics/autotrack.js
The autotrack boilerplate builds on top the base boilerplate and includes select autotrack plugins
analytics/multiple-trackers.js
The multiple-trackers boilerplate builds on the autotrack boilerplate and includes support for using multiple trackers.
Running the boilerplate locally
analytics.js boilerplate uses webpack to compile the source and webpack-dev-server to run it locally.
To install the dependencies and load the boilerplate in a browser, run the following commands:
npm install
npm start
Then visit localhost:8080 in your browser and open the developer console to see the analytics.js debug output.
Running different boilerplate versions
The boilerplate index.js JavaScript file imports the base boilerplate by default. To run a different version, replace the URL imported via import('./analytics/base.js') with the version you want to load.
관련 프로젝트 살펴보기
불러오는 중…