[Cloud release date: 2023.08.01]
[On-prem release: 2023 August]
[On-prem build: 23.08.31502]
What has happened?
The latest version of Google Analytics is called Google Analytics version 4 (or simply GA4).
Prior to that, Google Analytics was also known as Universal Analytics. By July 1, 2023 Google has decided that Universal Analytics will stop processing data, and by that time, you should have switched to GA4 to continue using the services of Google Analytics.
Read more about Google's decision here: Universal Analytics is going away
What should you do?
For TARGIT users, processing data from Google Analytics via TARGIT's data providers in Data Discovery or in InMemory ETL, you should also, as soon as possible, make the switch to GA4.
From this version, TARGIT 2022 Winter, TARGIT can use GA4 as a data source. The new provider is one of our Online Data Providers, meaning that if Google should decide to change anything in their API that breaks the connection, TARGIT will quickly detect it and correct it. You won't need to install any new drivers to get it up and running again.
The old Google Analytics provider will be able to co-exist with the new provider, and keep providing data until July 1, 2023.
You will need to enable GA4 for your Google account. Google documentation: Make the switch to Google Analytics 4
License
Your TARGIT license needs to support the Google Analytics Online Data Provider. Contact your TARGIT Account Manager if it doesn't.
How to register Google OAuth App
Note: Registration of the Google OAuth App is optional. You can use the TARGIT Google Analytics data provider out-of-the-box.
Create a new project
- Go to https://console.cloud.google.com/projectcreate
- Give your project a name and select a location
- Click Create
Configure project
- Under APIs & Services, select OAuth consent screen
- Select External User Type and click Create
- On the next screen, fill out App Name, User support email and Developer contact information
- Click Save and continue
- Go to the Credentials tab
- Click Create credentials and select OAuth client ID
- Select Web application in the dropdown, and give it a name
- Click Add URI under Authorized Javascript origins and enter https://gaconnector.targit.com as URI
- Click Create
- Copy the Client ID and Client secret
Publish app
- Go to the OAuth consent screen and click Publish App. Confirm in the Dialog.
- After a while (5-15 minutes), the application will work.
Enable the Google Analytics Admin API
- Go to https://console.developers.google.com/apis/api/analyticsadmin.googleapis.com/overview
- Click Enable
Enable the Google Analytics Data API
- Go to https://console.cloud.google.com/apis/library/analyticsdata.googleapis.com
- Click Enable
Get Refresh Token
- Go to https://gaconnector.targit.com/ga4 and enter Client ID and Client secret
- Click Authenticate App
- Copy token
Set Up Connection
In ETL Studio or Data Discovery, set up your connection to Google Analytics 4.
ETL Studio
- Click Add Data Source
- Select Google Analytics 4
- Fill out Client ID, Client secret, and Refresh token
- Select dimensions and measures to include — use the validate button to make sure they have a relation
- Use Import to add data source to your project
Data Discovery
- Add a new data source
- Select Google Analytics 4
- Fill out Client ID, Client secret, and Refresh token
- Select dimensions and measures to include — use the validate button to make sure they have a relation
- Build a cube using the new data source
Google Analytics Snippet
https://developers.google.com/analytics/devguides/reporting/data/v1/basics
Google Analytics online data provider allows you to retrieve Google Analytics user data by using the new Google Analytics V4 API.
Firstly, you need to get the user Refresh Token using the https://gaconnector.targit.com/ga4
Please make sure that the Client ID and Client Secret are the same on the website and in the snippet. These parameters are hidden by the optional parameters.
When you type Refresh Token, snippet will fetch all available Google Analytics properties for user. For the selected property snippet will show all available dimensions and metrics.
After selecting the necessary dimensions and metrics, you can validate your query by clicking Validate button. This is to check if the selected dimensions and metrics are completely valid.
Comments
Please sign in to leave a comment.