javascript - Using Google analytics, Is it possible to create Custom dimension using API (programatically) -


i working on saas application, let user(s) use own google analytics account tracking site.

while tracking, wants take benefit of custom dimensions. not possible telling/educating each client(most of them non-technical) "how create custom dimension/metric using google analytic interface".

is there way, can create custom dimension using code.

ga('<command>','<dimension name>', '<index>', '<scope>')   

you can create custom dimensions in google analytics management api, see: https://developers.google.com/analytics/devguides/config/mgmt/v3/mgmtreference/management/customdimensions/insert

there example code working api here: https://github.com/google/google-api-java-client-samples/tree/master/analytics-cmdline-sample

good luck :)


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -