Hello Google Analytics API users: here’s a nice list for you: all of the built-in segments with their segmentIds. See below!
Ok, so you’ve read the documentation bit that says:
Use the segmentId field to request segments. You cannot use both a segmentId and a dynamicSegment to request segments.
And you see a code block with this in it:
But what does the
gaid::-3 mean? Well.. that means Returning users. How do you know that? It’s very hard to find out. And I could not find a list anywhere with these built-in segments, so I created one for you.
Here you go:
#Segment list. gaid::-1 -> All Users, gaid::-5 -> Organic traffic, etc ID -1 : All Users ID -2 : New Users ID -3 : Returning Users ID -4 : Paid Traffic ID -5 : Organic Traffic ID -6 : Search Traffic ID -7 : Direct Traffic ID -8 : Referral Traffic ID -9 : Sessions with Conversions ID -10 : Sessions with Transactions ID -11 : Mobile and Tablet Traffic ID -12 : Non-bounce Sessions ID -13 : Tablet Traffic ID -14 : Mobile Traffic ID -15 : Tablet and Desktop Traffic ID -16 : Android Traffic ID -17 : iOS Traffic ID -18 : Other Traffic (Neither iOS nor Android) ID -19 : Bounced Sessions ID -100 : Single Session Users ID -101 : Multi-session Users ID -102 : Converters ID -103 : Non-Converters ID -104 : Made a Purchase ID -105 : Performed Site Search
Hope this helps – share the loveFor your collection: A list of all 25 Google Analytics built-in segments (with their API segmentId). #measure Click To Tweet
Happy API hacking.
May i know the segment ID for Social Traffic and LinkedIn Traffic please
Those are not built-in segments, you will have to create a custom segment for those, and then find the ID.
More on that here: https://developers.google.com/analytics/devguides/reporting/core/v3/segments#byid