Create a service account
Start by going to this page and select the project you’d like to connect to. Once you select the project, enable the Google Analytics API by clicking Next and then Enable. Then you’ll need to create a service account. To do so, you’ll need to click on the menu in the left hand corner and navigate to APIs and Services > Credentials. On this screen, select Manage Service Accounts in the bottom left hand corner. Then select Create Service Account. Here you can give your account a name and click Create and Continue. You can continue through the two optional fields.

Add the key to a secret group
Open the JSON file from the step above in any text editor and copy the entire key to your clipboard. Then create a new secret group and paste the entire JSON object in a key namedGA_KEY.
Example code
Once you’ve completed the prior steps, create a new workbook, add a new import script to a sheet and copy + paste the script below. Once pasted select your secret group in the toolbar (make sure the key in the secret group is calledGA_KEY) and update your PROPERTY_ID.
Google Analytics V4
Your Property ID can be found in Google Analytics: Settings > Select your property > Property settings. You will see the Property ID in the top right.Github Intercom

