With this simple R script, you can update or create custom dimensions for a Google Analytics profile. The script uses the googleanalyticsR package to connect with Google Analytics via the API.
It provides you with several options:
- Create brand new GA custom dimensions in an empty GA profile, you define the variables in the script
- Create brand new GA custom dimensions in an empty GA profile, based on the settings in another GA profile
- Update GA custom dimensions in a GA profile where custom dimensions already exist, you define the variables in the script
- Update GA custom dimensions in a GA profile where custom dimensions already exist, based on the settings in another GA profile
This script has been helpful to me to copy custom dimension settings from a first GA profile to multiple other GA profiles, for multiple websites/ profiles with lots of custom dimensions.