MarkEdmondson1234 / searchConsoleR

R interface with Google Search Console API v3, including Search Analytics.
http://code.markedmondson.me/searchConsoleR/
Other
114 stars 41 forks source link

Difference between device and query clicks #63

Closed JanPuzio closed 3 years ago

JanPuzio commented 3 years ago

I am not sure if it is right place for this question but I could not find answer for my problem anywhere else.

While using

data <- search_analytics(siteURL = "https://www.xyz.xx",
                              startDate = "2020-01-01",
                              endDate = "2020-01-01",
                             dimensions = c("device"),
                             rowLimit = 49999,
                             walk_data = "byBatch")

sum(data$clicks)

it returns 5410 clicks but when I change dimension to "query" it returns 3201 clicks while most of queries have 0 clicks.

Is dimension query not choosing all important queries or just dimension device returns too many clicks? I would like to collect every query with clicks in this date.

Thank you for your time

Session Info

R version 4.0.2 (2020-06-22) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 18362)

Matrix products: default

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] searchConsoleR_0.4.0

loaded via a namespace (and not attached): [1] fansi_0.4.1 withr_2.2.0 digest_0.6.25 crayon_1.3.4 assertthat_0.2.1 R6_2.4.1 jsonlite_1.7.0 httr_1.4.2
[9] rlang_0.4.7 cli_2.0.2 curl_4.3 fs_1.5.0 googleAuthR_1.3.0 tools_4.0.2 glue_1.4.1 compiler_4.0.2
[17] askpass_1.1 gargle_0.5.0 memoise_1.1.0 openssl_1.4.2

MarkEdmondson1234 commented 3 years ago

This is whats returned by the API, they don't give much explanation but you can see it here: https://developers.google.com/webmaster-tools/search-console-api-original/v3/how-tos/all-your-data#lose_data

Why do I lose data when asking for more detail? When you group by page and/or query, our system may drop some data in order to be able to calculate results in a reasonable time using a reasonable amount of computing resources.