elgoog Posted April 30, 2009 Share Posted April 30, 2009 In the filtering section you have to pass through !=, >, < etc in the encoded formats http://code.google.com/apis/analytics/docs/gdata/gdataReference.html#filtering However in PHP <? echo urlencode("!="); ?> This generates %21%3D as the endoded format, however in the google docs it needs to be !%3D Are there any functions available to encode an URL in the format google requires? Thanks in Advance Link to comment https://forums.phpfreaks.com/topic/156235-solved-google-analytics-api-and-urlencode/ Share on other sites More sharing options...
ignace Posted April 30, 2009 Share Posted April 30, 2009 However i don't think it should be a problem, but you can do this: <?php $urlencode = urlencode('!='); $urlencode = str_replace('%21', '!', $urlencode); // counter ?> Link to comment https://forums.phpfreaks.com/topic/156235-solved-google-analytics-api-and-urlencode/#findComment-822498 Share on other sites More sharing options...
elgoog Posted April 30, 2009 Author Share Posted April 30, 2009 Thanks - It still did not work doing this. Turned out i forgot to put what metric i wanted to filter before the expression.... It does work with normal URL encode and i think it is time for a coffee!!. Thanks for the help. Link to comment https://forums.phpfreaks.com/topic/156235-solved-google-analytics-api-and-urlencode/#findComment-822502 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.