googleanalytics / ga-dev-tools

A showcase of demos and tools built with the various Google Analytics APIs and Libraries.
https://ga-dev-tools.web.app/
Other
1.38k stars 550 forks source link

GA Demos & Tools

A showcase of demos and tools built with the various Google Analytics APIs and Libraries. View the Site

Submitting Feedback / Reporting Bugs

For the Demos & Tools site

For the Google Analytics platform

Building and running the site locally

Requirements

Running

To run the site locally, first make sure you have all the dependencies installed:

yarn

Also make sure to install the dependencies in the lib directory.

cd lib
yarn
cd ..

Then run the following (from the top level directory) and answer all prompts:

yarn start:app:production

All prompts can be skipped, but certain demos rely on prompt answers to fully function. Notably, any demo that requries authentication will require you to put in a valid Google client ID.

This will set up a local hot-reloading instance of the app that can try out at http://localhost:5000

Testing

To run tests, first make sure you have all the dependencies installed:

yarn

Then run the following:

yarn test

Whats in this repo

./src

This is where the majority of the client-side code lives. All of our demo code can be found here.

./gatsby-browser.js

This file is useful to decorate our app with functionality that is needed at runtime.

Of note, we use:

Also see Gatsby browser APIs.

gatsby-config.js

This is the main configuration file for our Gatsby site. All of our gatsby plugins are configured here.

Also see Gatsby Config API.