andeedee / gapi-google-analytics-php-interface

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

How to use customVarValue1 in the filters/segment condition in Google Analytics Data API? #61

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi

I am using GAPI version 1.3

I have added a custom variable in GA code like this:

_gaq.push(['_setCustomVar', 1,  'Member', '<?php echo $member_id; ?>, 3]);

And its working fine..

Now I need to fetch the data from GA: so my requst to GA is like this:

https://www.google.com/analytics/feeds/data?
ids=XXXXXXXXXXX&
dimensions=ga:customVarValue1,ga:pagePath&
metrics=ga:pageviews,ga:uniquePageviews,ga:bounces,ga:exits&
filters=ga:pagePath=@event_details.php;ga:customVarValue1=2004036442&
start-date=2011-04-20&
end-date=2011-05-04&
max-results=50

I need to fetch data from GA where pagePath=@event_details.php AND 
ga:customVarValue1=2004036442

But this is not resulting anything...

When I changed the filters in the following why its resulting all the pagePath 
= event_details.php and its working fine..
filters=ga:pagePath=@event_details.php

but I need get the page path with the perticular member ID that is why I used 
the condition as below:
filters=ga:pagePath=@event_details.php;ga:customVarValue1=2004036442&

So any one have idea about this?? Please help.. 

Original issue reported on code.google.com by contactv...@gmail.com on 27 Jul 2011 at 3:59