AbdFatah / analytics-issues

Automatically exported from code.google.com/p/analytics-issues
0 stars 0 forks source link

Support for precedence in advanced segments #119

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
--------------------------------------------------------------------------
NOTE: This issue tracking system is for developer products only.  If you
are not a developer/programmer and have a problem with a Google web site,
please report the problem to the appropriate group.  More information can
be found here: http://www.google.com/support/
--------------------------------------------------------------------------

Name of API affected:
Analytics Data Export API

Request summary:
Today, the advanced segments expressions use a very simple syntax of conditions 
limited to simple precedence model: OR always takes precedence over AND. 
It should be nice to build expressions using parenthesis to encapsulate 
conditions and precedence.

Use Cases:
So if you try to execute
ga:daysSinceLastVisit=~[0-7] AND ga:visitorType==Returning Visitor OR 
ga:pagePath==/specialpage
the real expression executed is like 
ga:daysSinceLastVisit=~[0-7] AND (ga:visitorType==Returning Visitor OR 
ga:pagePath==/specialpage)
it would be nice to specify the desired precedence:
(ga:daysSinceLastVisit=~[0-7] AND ga:visitorType==Returning Visitor) OR 
ga:pagePath==/specialpage

This support for precedence could allow us to build real advanced dynamic 
segments and could save a lot of time when analyzing special datasets or doing 
special deep-analysis

Original issue reported on code.google.com by leonardo...@gmail.com on 15 Mar 2011 at 7:38

GoogleCodeExporter commented 9 years ago
I think this would be a really powerful and important improvement.

Just as an example:

the daysSinceLastVisit dimension includes in its zero value both new and 
returning visitors.  If you're studying engaged behaviours, you don't want to 
include new visitors in your segment of recent visitors; so you need to qualify 
daysSinceLastVisit with AND visitorType==Returning Visitor.  This qualification 
gets scrambled when you then need to combine some other segment with an OR.

I guess there may be other dimensions (either now or in the future?) that prove 
problematic in the same way, without a more sophisticated ability to specify 
precedence.  Improving the ability to define segments like this might solve or 
prevent several different problem cases.

Original comment by ed%harve...@gtempaccount.com on 16 Mar 2011 at 9:52

GoogleCodeExporter commented 9 years ago
Removing an obsolete label that was used when these issues were in the 
gdata-issues project.

Original comment by jrobbins@google.com on 21 Jul 2011 at 10:04

GoogleCodeExporter commented 9 years ago
Changing the issue type to match the organization desired in this project.

Original comment by jrobbins@google.com on 21 Jul 2011 at 10:06