Segment is not supported in the API

492 views
Skip to first unread message

Kyle Crocker

unread,
Mar 16, 2016, 4:29:17 PM3/16/16
to Supermetrics
I setup a new query using SessionDate is on or after 20160301. The segment is available in the segment list, but when I try to apply the change I get the following error:
Query failed: 400 badRequest Segment NnA0lI52TEKj3l_cvBnANA is not supported in the API.

Based on this [fairly old] post: Advance Segmet are not appearing in Data Grabber I think it may be that this type of query isn't supported by the API, but seeing as how it is available in the list I am hoping I'm wrong.

My goal with this segment is to isolate traffic since a site launch (on March 1) while allowing a lastxmonths query to be used indefinitely into the future to update the report each month without having to manually adjust the date range each time. If this type of segment isn't supported, is there another way I could handle this situation?

Supermetrics Support

unread,
Mar 21, 2016, 8:37:05 AM3/21/16
to Supermetrics
If you get that error, then Google doesn't support the segment. You could type a custom segment like 

"custom::firstSession<>20160301_today". This will return data for new users that have been seen on March 1 or after.

Kyle Crocker

unread,
Apr 4, 2016, 1:44:40 PM4/4/16
to Supermetrics
I finally got a chance to test this and got the following error:
Error: 400 badRequest Date range must not exceed 31 days for the BETWEEN (i.e., '<>') operator.

I did a little investigation to verify and found:
Date of Session Conditions
Segments support a type of analysis that makes use of the dateOfSession syntax; In combination with the between <> operator, you can restrict a segment to a group of users who have initiated a session within a certain date range. The maximum date range for dateOfSession is 31 days. Please see the date of session example below for details on its use.


Unfortunately, this won't work in my situation, but I wanted to document in case it was helpful to others.
Reply all
Reply to author
Forward
0 new messages