googleapis / python-analytics-data

This library has moved to https://github.com/googleapis/google-cloud-python/tree/main/packages/google-analytics-data
Apache License 2.0
159 stars 36 forks source link

INVALID_ARGUMENT for average on custom metrics with accents #270

Closed GDev30 closed 1 year ago

GDev30 commented 2 years ago

Hello,

I want to get an average on a custom metric with accents (example : "durée" [= "Duration" in French] ).

I get this error:

{
"message": "Metric names must only contain letters, numbers, or _. Received a metric name = averageCustomEventdurée",
"code":3,
"status": "INVALID_ARGUMENT",
"details":[]
}

Do you have a solution to this problem ? Thanks you

Note :

brettsneed commented 1 year ago

To make this work today, you'll need to create "averageCustomEventduree" as a metric expression defined in the API request without the accent. For example,

{
 "name": "averageCustomEventduree",
 "expression": "customEvent:durée/countCustomEvent:durée"
 }

We'll look into supporting average custom metrics with accents in the future.

Thanks, Brett Sneed The Google Analytics Team

parthea commented 1 year ago

I'm going to close this issue as a response was provided but please feel free to open a new issue with more information.