Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 8 commits into from
Nov 22, 2022

Conversation

bryantgray
Copy link
Contributor

@bryantgray bryantgray commented Nov 21, 2022

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