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

Anti sampling don't work #393

Closed
egkasatkin opened this issue Dec 9, 2021 · 2 comments
Closed

Anti sampling don't work #393

egkasatkin opened this issue Dec 9, 2021 · 2 comments
Assignees
Labels

Comments

@egkasatkin
Copy link

What goes wrong

Anti sampling don't work

Steps to reproduce the problem

my requst

GA_SEO_all <- google_analytics(
GAid,
date_range = c(date_start, date_start),
dimensions = c("clientId", "date", "sourceMedium", "campaign", "deviceCategory", "keyword", "userType"),
metrics = c("goal2completions", "goal8completions", "goal12completions", "goal15completions", "users", "pageviews", "sessions", "newUsers", "sessionDuration", "bounces"),
dim_filters = exp,
anti_sample = TRUE)

Expected output

2021-12-09 14:12:38 > anti_sample set to TRUE. Mitigating sampling via multiple API calls.
i 2021-12-09 14:12:38 > Finding how much sampling in data request...
i 2021-12-09 14:12:38 > Reading cache
i 2021-12-09 14:12:38 > Downloaded [ 9 ] rows from a total of [ 10001 ].
i 2021-12-09 14:12:38 > No sampling found, returning call
i 2021-12-09 14:12:41 > Downloaded [ 9999 ] rows from a total of [ 10001 ].
i 2021-12-09 14:12:43 > Downloaded [ 1 ] rows from a total of [ 10001 ].
i 2021-12-09 14:12:43 > All data downloaded, total of [ 10001 ] - download time: 4.678494 secs

all time same result 10k rows. antisampling didn't turn on

@MarkEdmondson1234
Copy link
Collaborator

Its not that anti_sampling isn't working, its that including clientId runs you into this issue https://github.com/MarkEdmondson1234/googleAnalyticsR/issues/283

See that thread for background and possible work arounds.

@egkasatkin
Copy link
Author

thank you so much!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants