Type: | Package |
Title: | Access to 'Google Ads' via the 'Windsor.ai' API |
Version: | 1.0.0 |
Description: | Collect marketing data from 'Google Ads' using the 'Windsor.ai' API https://windsor.ai/api-fields/. |
License: | MIT + file LICENSE |
Depends: | R (≥ 3.5.0) |
Imports: | jsonlite (≥ 1.7.2) |
VignetteBuilder: | knitr |
Encoding: | UTF-8 |
Language: | en-US |
RoxygenNote: | 7.2.1 |
Suggests: | knitr, rmarkdown, dplyr, ggplot2, tidyr, curl |
LazyData: | true |
NeedsCompilation: | no |
Packaged: | 2022-11-14 17:49:59 UTC; pablo |
Author: | Pablo Sanchez [aut, cre], Windsor.ai [cph] |
Maintainer: | Pablo Sanchez <pablosama@outlook.es> |
Repository: | CRAN |
Date/Publication: | 2022-11-15 23:50:02 UTC |
Fetch Google Ads Fetch data from 'Google Ads' via 'windsor.ai' API
Description
Fetch Google Ads Fetch data from 'Google Ads' via 'windsor.ai' API
Usage
fetch_googleads(
api_key,
date_from = NULL,
date_to = NULL,
fields = c("source", "campaign", "clicks", "medium", "sessions", "spend")
)
Arguments
api_key |
Your api key to access Windsor.ai API |
date_from |
The date from which to start getting data in format YYYY-MM-DD |
date_to |
The date until which to start getting data in format YYYY-MM-DD |
fields |
he fields fetched from the API for a given connector See https://www.windsor.ai/api-fields/ for details. |
Value
A data frame with the desired data
Examples
## Not run:
# api_key needs to be provided by the user.
my_googleads_data <- fetch_googleads(api_key = "your api key",
date_from = "2022-10-01",
date_to = "2022-10-02",
fields = c("campaign", "clicks",
"spend", "impressions", "date"))
## End(Not run)
Sample data from the Windsor API.
Description
A dataset containing sample gooole ads data fetched from windsor.ai API. See more at: https://windsor.ai/api-fields/
Usage
my_data_googleads
Format
A data frame with 1677 rows and 6 variables:
- campaign
name of the campaign
- clicks
number of clicks
- spend
spend data
- medium
the type of referals
- source
source of the data (google, facebook, etc.)
- googlesheets
googlesheets id