问题描述
这里我尝试通过 searchConsoleR 库从特定页面获取查询搜索流量关键字数据。我想出了如何在一页上做到这一点,但坚持了 100 多页。绝对必须使用循环或函数
dimensionFilterExp = c("device==DESKTOP","country==TUR","page==https://www.templatemonster.com/tr/type/wordpress-temalar/"
如果您能告诉我如何将这 5 个页面添加到循环中并提取解决问题所需的数据,我将不胜感激:
https://www.templatemonster.com/tr/kategori/reklam-ajansi-web-sitesi-temalari/
https://www.templatemonster.com/tr/kategori/web-tasarim-web-sitesi-temalari/
https://www.templatemonster.com/tr/kategori/danismanlik-web-sitesi-temalari/
https://www.templatemonster.com/tr/kategori/toplum-insan-wordpress-temalari/
https://www.templatemonster.com/tr/kategori/kafe-web-sitesi-temalari/
这是我使用的代码示例:
library(searchConsoleR)
setwd("C:/work/r_scripts/Analytics")
#auth
scr_auth()
#If you authenticate ok,you should be able to see a list of your websites in the Search Console via:
sc_websites <- list_websites()
sc_websites
sc_websites$siteUrl[2]
gbr_desktop_queries <-
search_analytics("https://www.templatemonster.com/","2020-10-01","2020-12-31",c("query","page"),dimensionFilterExp = c("device==DESKTOP","page==https://www.templatemonster.com/tr/type/wordpress-temalar/"),searchType="web",rowLimit = 100)
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)