-
Notifications
You must be signed in to change notification settings - Fork 18
Google Analytics
-
Create Analytics account:
- Your first step is to set up an Analytics account.
-
Create a new Google Analytics 4 property.
- In Admin, look at the Account column to make sure that you've selected the right account. Then, in the Property column, click Create Property then populate information of project
If you are developing in a dev environment, you must populate "www.localhost:4000" for the first field - Website Url and "https://localhost:4000" for the second field - Stream name.
Click Measurement Protocol API secrets to create API Secret Key.
In file clarin-dspace.cfg we need config 5 properties:
- rest.properties.exposed
- google.analytics.key
- google.analytics.buffer.limit
- google.analytics.cron
- google.analytics.api-secret
-
Property rest.properties.exposed
Declare property with value "google.analytics.key" so that Front end can get value of property from Back end. Example: rest.properties.exposed= google.analytics.key
-
Property google.analytics.key
We can get value of property from field MEASUREMENT ID Example: google.analytics.key=redacted
-
Property google.analytics.cron
Define cron for how frequently events tracked in the DSpace backend will be sent to Google Analytics. Keep in mind, changing the schedule requires rebooting your servlet container, e.g. Tomcat. Example: The below example will run this task daily, every 1 minutes google.analytics.cron = 0 0/1 * * * ?
-
Property google.analytics.buffer.limit
The max number of events held in the GA buffer (default: 256) Example: google.analytics.buffer.limit=256
-
Property google.analytics.api-secret
Defines a Measurement Protocol API Secret to be used to track interactions which occur outside of the user's browser. We can get value of property from Secret value Example: google.analytics.api-secret redacted