This script is original idea based from (Simo Ahava)[https://github.com/sahava/ga-custom-dimension-manager]
Open new spreadsheet from Google Drive and create a new GApps script. In the same project folder you must to create the main Code Code.gs and add new html pages (scripts, css and html).
Before to publish as web app, remember to switch on Google Analytics API in
Resources > Advanced Google Services > Google Analytics API
and enable on Google Cloud console your API project the authotization