Skip to content

Latest commit

 

History

History
54 lines (36 loc) · 1.81 KB

File metadata and controls

54 lines (36 loc) · 1.81 KB

Integrating with Google Analytics

This sample application shows how to integrate your Node.js application with Google Analytics on Google App Engine.

App Engine standard environment users: See tutorial Integrating with Google Analytics for more information on running and deploying this app.

App Engine flexible environment users: See tutorial Integrating with Google Analytics for more information on running and deploying this app.

Setup

Before you can run or deploy the sample, you need to do the following:

  1. Refer to the appengine/README.md file for instructions on running and deploying.

  2. Create a Google Analytics Property and obtain the Tracking ID.

  3. Add your tracking ID to app.yaml.

  4. Install dependencies:

    npm install
    

Running locally

GA_TRACKING_ID=YOUR_TRACKING_ID npm start

Deploying to App Engine standard Environment

gcloud app deploy app.standard.yaml

Deploying to App Engine flexible Environment

gcloud app deploy app.flexible.yaml

Running the tests

See Contributing.