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

Fix inaccurate segment GAID validation pattern #79

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

mattpolicastro
Copy link

Segments created in the native Google Analytics segment builder are automatically assigned GAIDs; these GAIDs are usually alphanumeric but I've noticed that underscores and dashes are beginning to be used as valid characters. However, these IDs will trigger a hard error:

Error in validObject(.Object) :
  invalid class "gaSegmentId" object: gaSegmentId must match the regular expression ^gaid::\-?[0-9A-Za-z]+$

I've amended the regex pattern used to validate the GAIDs to not fail on dashes or underscores.

Image 2021-09-28 at 1 01 31 PM

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.

1 participant