Create a page or navigate to an existing page which has a link length (exluding domain) of minumum 78 characters.
Navigate to page edit and open the analytics widget.
Expected:
Google analytics data is shown.
Actual:
Widget shows the text 'no data' instead of the graph.
Analysis:
A request is sent to the https://www.googleapis.com/analytics/v3 domain and the following response is returned by Google which causes an exception. According to the message the max length of the regular expression must not exceed 128 characters but the regex expression ^((([a-zA-Z0-9\\-]*\\.){1\\,}){1\\,}[a-zA-Z0-9]*)? leaves only 78 characters to the path.
{
"error": {
"code": 400,
"message": "Regular expression too long: '^((([a-zA-Z0-9\\-]*\\.){1\\,}){1\\,}[a-zA-Z0-9]*)?{REDACTED_STRING_109_CHARS_LONG}$'. Regular expression must be less than or equal to 128 characters.",
"errors": [
{
"message": "Regular expression too long: '^((([a-zA-Z0-9\\-]*\\.){1\\,}){1\\,}[a-zA-Z0-9]*)?{REDACTED_STRING_109_CHARS_LONG}$'. Regular expression must be less than or equal to 128 characters.",
"domain": "global",
"reason": "badRequest"
}
]
}
}
Reproduction steps:
Create a page or navigate to an existing page which has a link length (exluding domain) of minumum 78 characters.
Navigate to page edit and open the analytics widget.
Expected:
Google analytics data is shown.
Actual:
Widget shows the text 'no data' instead of the graph.
Analysis:
A request is sent to the https://www.googleapis.com/analytics/v3 domain and the following response is returned by Google which causes an exception. According to the message the max length of the regular expression must not exceed 128 characters but the regex expression ^((([a-zA-Z0-9\\-]*\\.){1\\,}){1\\,}[a-zA-Z0-9]*)? leaves only 78 characters to the path.