Skip to content

Google Analytics Segments are now strings #5365

Closed
@sk8asd123

Description

@sk8asd123

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions