Integrations
Google Analytics
Learn how to set up the Google Analytics integration
The Google Analytics integration can be used once a new project is created and configured in Google Console.
Setup
- Create a new project here
- Click on APIs and Services in the side menu
- Click on Library in the side menu and type analytics in the search bar
- Click and enable both Google Analytics Reporting API, Google Analytics API, and Google Analytics Admin API
- Head back to the APIs and Services page and click on OAuth Consent Screen option in the side menu
- Select on either Internal or External depending on how you plan to use the integration
- You will have to fill in all the required details in the form (no need for domain yet) then continue without filling anything on the rest of the tabs
- Click on Credentials in the side menu, click on Create credentials, and select OAuth Client ID
- Select Web application from the dropdown list, enter any name, and in Authorized redirect URIs enter:
http://localhost:4018/google-auth
(for local use)https://example.com/google-auth
(for production use with your domain)
- You will get a Client ID and Client Secret which you will have to use for the CB_GOOGLE_CLIENT_ID and CB_GOOGLE_CLIENT_SECRET environmental variables
- Head back to the OAuth Consent Screen, scroll down the page, and add test users to enable certain google accounts to use the integration
- (Optional) If you want to publish the Google app, you will have to click on the “Publish app” at the top of the page.
Usage
To learn how to use the Google Analytics integration, you can read the tutorial on Chartbrew’s blog.