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

No need to split dimension/metic values on a colon #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jasonfox
Copy link

I tracked down an issue I was having where URLs which contained a colon character were not being properly included in the Gattica results. For example, this crazy URL from our Google Analytics account:

/stories/Rida-Asim-Wins-Scholastic-Regional-Art-and-Writing-Award/209582?fb_action_ids=10151390356368347&fb_action_types=og.likes&fb_source=other_multiline&action_object_map={"10151390356368347":524248140960991}&action_type_map={"10151390356368347":"og.likes"}&action_ref_map=[]

...was being returned as: "og.likes"}&action_ref_map=[]

This was due to the following line in the DataPoint model's initializer:

{ dimension.attributes['name'].split(':').last.to_sym => dimension.attributes['value'].split(':').last }

I understand why you are splitting the dimension/metic names on a colon but I do not believe that you have to split the values. For example you would want to split the name ga:pagePath to get pagePath but not the value: /foo/bar?baz=123. Let me know if I'm wrong about this.

…er. This was causing a bug whenever a value contained a colon.
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