Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

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 for Node.js 16 and earlier

gcloud app deploy app.flexible.yaml

Deploying to App Engine flexible Environment for Node.js 18 and later

gcloud app deploy app.flexible_os.yaml

Running the tests

See Contributing.