Skip to content

Google Analytics Segments are now strings #5365

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

Closed
sk8asd123 opened this issue Oct 28, 2013 · 2 comments
Closed

Google Analytics Segments are now strings #5365

sk8asd123 opened this issue Oct 28, 2013 · 2 comments

Comments

@sk8asd123
Copy link

Since the advanced segment changes Google has rolled out, Google Analytics segments are now alphanumeric instead of integers. https://developers.google.com/analytics/devguides/config/mgmt/v3/mgmtReference/management/segments

When I run:

from pandas.io.ga import GAnalytics
gAnalytics = GAnalytics()
gAnalytics.create_query(‘web_id’, ‘pageviews’, ’2013-08-12′,’2013-08-14′, ‘date’,             segment='A1B234').execute().get(‘containsSampledData’)

I get the following error:
returned "Invalid value 'ga:A1B234' for segment parameter.">, invalidating data!

I believe that if the segment is not dynamic, Pandas is expecting an integer only.

@jtratner
Copy link
Contributor

I believe we've now resolved this on current master thanks to @jcbozonier and #5271. We're almost at a release candidate for 0.13 (just one small feature request to wrap up), so if you want to work off of pandas' master, it should be completely or entirely stable.

The other option is to manually edit pandas/io/ga.py in site-packages and add in the changes from #5271.

Thanks for the bug report - we always appreciate them! Please close this issue if your problem is resolved.

@sk8asd123
Copy link
Author

thanks!

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

No branches or pull requests

2 participants