Managing Google Analytics
Note: This manual is for osCommerce v4.
Create a project if necessary in https://console.developers.google.com.
In https://console.developers.google.com in the section IAM/service accounts create a new account with the rights of the Owner and a set of private keys for this account. Save the private keys in JSON format. They will be required afterwards.
Switch on Analytics API with the quotas /Google Analytics Reporting API.
In the admin area of your website switch on Google client if necessary.
In the setting editor under the tab Analytics download the file with the keys that were previously saved. Also indicate ID of representing the website in the field Google Analytics View ID (take it from the administration section of Google Analytics) of Google client settings in the admin area of your website.
Add the user profile in Google Analytics – in our case it is the service account profile that was previously created. It is enough to have Reading and Analysing rights.