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

python - Best design pattern for collection of objects -

go - serving up pdfs using golang -

python - django admin: changing the way a field (w/ relationship to another model) is submitted on a form so that it can be submitted multiple times -