Skip to content

TDL-21347 Filter non-ascii non-alphanumeric metric names - #28

Merged
bryantgray merged 8 commits into
mainfrom
fix-non-alphanumeric-api-names
Nov 22, 2022
Merged

TDL-21347 Filter non-ascii non-alphanumeric metric names#28
bryantgray merged 8 commits into
mainfrom
fix-non-alphanumeric-api-names

Conversation

@bryantgray

@bryantgray bryantgray commented Nov 21, 2022

Copy link
Copy Markdown
Contributor

Description of change

Custom event-scoped metrics with non-ascii non-alphanumeric names can be created in the GA4 console. These characters are currently incompatible with Google's Data API.

example:
The parentheses in a metric named conversion:(other) causes this response:

CRITICAL 400 Metric names must only contain letters, numbers, or _. Received a metric name = conversions[(other)]

See: https://support.google.com/analytics/thread/176551995/conversion-event-api-calls-should-use-event-id-not-name-sessionconversionrate-conversion-event-name

This change filters the bad metric names so a connection can successfully complete the check. The bad metrics will be marked unsupported in field selection.

Manual QA steps

  • Verified discovery can complete with the bad metrics filtered.

Risks

  • May cause confusion due to custom metrics that include the incompatible characters showing as unsupported.

Rollback steps

  • revert this branch

@bryantgray
bryantgray merged commit 89a5558 into main Nov 22, 2022
@bryantgray
bryantgray deleted the fix-non-alphanumeric-api-names branch November 22, 2022 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants