erebusnz / gapi-google-analytics-php-interface

GA:PI() - Google Analytics PHP Interface
167 stars 86 forks source link

filter does not recognize some metrics( like goal6Completions) with digits #133

Closed tartasx closed 9 years ago

tartasx commented 9 years ago

It happens because of regexp in gapi library.

string 225 needs regexp correction: $filter = pregreplace('/(&&\s|||\s|^)([a-z]+)(\s' . $valid_operators . ')/i','$1ga:$2$3',$filter); //Prefix ga: to metrics and dimensions replace with $filter = pregreplace('/(&&\s|||\s|^)([a-z0-9]+)(\s' . $valid_operators . ')/i','$1ga:$2$3',$filter); //Prefix ga: to metrics and dimensions

Maybe i need to add this through commit, but i am new here and can't use it ;) thank you.