Description Usage Arguments Value Examples
Downloads an Adwords report. Wrapper function around the statement and getData functions. Allows for some additional feature with the dates.
1 2 3 | get.report(report, cid, auth, api.version = "latest",
fields = c("AccountDescriptiveName", "Impressions", "Clicks", "Cost",
"Date"), date = "LAST_14_DAYS", ...)
|
report |
Name of the report. The list of reports can be found at https://developers.google.com/adwords/api/docs/appendix/reports. |
cid |
Customer client ids (or vector of). If more than one CID is provided, the results will be concatenated. |
auth |
Google AdWords authentification token. |
api.version |
Version of the Adwords API to use, must be the same as in the request. If set to "latest" (the default), the latest version in the package is used. |
fields |
Metrics to select in the report. This can be a mix of attributes, segments and metrics. Default to "AccountDescriptiveName", "Impressions", "Clicks", "Cost", "Date". |
date |
Either a date range (see https://developers.google.com/adwords/api/docs/guides/reporting#date-ranges) or a vector of length two with the date interval (start date first, end date last). Default to last fourteen days ("LAST_14_DAYS"). If NULL the during clause will be omitted, getting data for the whole time. Note that this works only if no Date or Week columns are specified (see https://developers.google.com/adwords/api/docs/guides/awql). |
... |
Extra parameters for the RAdwords::statement function |
The report as a data.table with the selected columns.
1 2 3 4 5 6 7 | # Download the search query performance report for the last 14 days.
library(RAdwords)
report <- "SEARCH_QUERY_PERFORMANCE_REPORT"
cid <- c('XXX-XXX-XXXX', 'YYY-YYY-YYYY')
auth <- doAuth()
fields <- c("AccountDescriptiveName", "AdGroupId", "AdGroupName", "AdGroupStatus", "CampaignId", "CampaignName", "CampaignStatus", "KeywordId", "KeywordTextMatchingQuery", "QueryMatchTypeWithVariant", "Impressions", "Clicks", "Conversions", "Cost", "AveragePosition")
report <- get.report(report, cid, auth, fields, date = "LAST_14_DAYS")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.