Advanced Segments on Google Service Accounts

902 views
Skip to first unread message

Julian Tiemann

unread,
Apr 18, 2013, 11:04:15 AM4/18/13
to google-analytics...@googlegroups.com
Hey,

I have my general google account for google analytics etc. With this account i created some advanced segments for my dashboard.
Now I wanted to build my own dashboard with the help off the analytics core api. I activated the api in the google api console and created an oauth2 service account, which should connect to the api, as i dont want to login with my normal account to view the dashboard.
The google service account has it's own special mail address like 12...@developer.gserviceaccount.com + a private key file, which i uploaded to the server.

Now everything works fine except for queries containing the advanced segments from my main google account, as they are bind to the account.
I would recreate or share them, but I have no Idea how i should login with the google service account.

How can I add the advanced segments to a service account?

Thanks in advance
Julian

Trent Hauck

unread,
Apr 28, 2013, 7:14:49 PM4/28/13
to google-analytics...@googlegroups.com
I am having this issue as well... the specific response is: "User does not have sufficient permissions for this advanced segment."

ivar.pru...@cognovi.ie

unread,
Jun 6, 2013, 8:13:40 AM6/6/13
to google-analytics...@googlegroups.com
Same problem here. Its not possible to access custom dimensions, not possible to access custom segments for every user, then you have to somehow create a segment for api user, and with a service api account you cannot login, cannot even add custom dimensions with management api!

Should be solved by API people ASAP.

Pete

unread,
Jun 6, 2013, 11:15:26 AM6/6/13
to google-analytics...@googlegroups.com
Right now it's not possible to create advanced segments for a service account, so the behavior described in the original post is expected. However, you can use dynamic segments when you query the API. https://developers.google.com/analytics/devguides/reporting/core/v3/reference#segment

You can open an issue for this at https://code.google.com/p/analytics-issues/issues/list. If you do open an issue can you please post the link back here so that others can follow.

ivar.pru...@cognovi.ie

unread,
Jun 6, 2013, 11:49:22 AM6/6/13
to google-analytics...@googlegroups.com
I did open an issue: https://code.google.com/p/analytics-issues/issues/detail?can=2&start=0&num=100&q=segments&colspec=ID%20Component%20Type%20Status%20Priority%20Stars%20Summary&groupby=&sort=&id=302
But when using dynamic segments I am not able to query Custom Dimension, and this is why I was using segments in the first place.

Azucena Coronel

unread,
Jun 19, 2015, 3:03:22 AM6/19/15
to google-analytics...@googlegroups.com, ivar.pru...@cognovi.ie
Hello,

I am wondering if you got to solve somehow this issue?
I've checked the open issue, but seem any response. And now I'm facing exactly the same problem.

Thank in advance, cheers!

Azucena

Di J

unread,
Oct 8, 2015, 9:57:35 AM10/8/15
to Google Analytics Reporting API, ivar.pru...@cognovi.ie
Hi Azucena

Checkout this blog
http://www.periscopix.co.uk/blog/google-analytics-new-feature-shared-segments/

It helped me share segments with the API user.

DJ
Reply all
Reply to author
Forward
0 new messages