statement: Build Adwords Query Language Statement

Description Usage Arguments Value Examples

Description

Generates and builds the Adwords Query Language Statement for querying the Adwords API.

Usage

1
2
3
4
statement(select = c("AccountDescriptiveName", "AccountId", "Impressions",
  "Clicks", "Cost", "Date"), report = "ACCOUNT_PERFORMANCE_REPORT", where,
  start = "2018-01-01", end = "2018-01-10", apiVersion = "201809",
  compress = TRUE)

Arguments

select

Attributes

report

Report type

where

Condition list, e.g. "CampaignName STARTS_WITH 'A' AND Clicks > 100", multiple conditions can be only combined with AND Operators: = | != | > | >= | < | <= | IN | NOT_IN | STARTS_WITH | STARTS_WITH_IGNORE_CASE | CONTAINS | CONTAINS_IGNORE_CASE | DOES_NOT_CONTAIN | DOES_NOT_CONTAIN_IGNORE_CASE

start

Beginning of date range. Format: 2018-01-01

end

End of date rage. Format: 2018-01-10

apiVersion

Adwords API Version, supports 201809, 201806, 201802 defaults to 201809.

compress

TRUE / FALSE, Gzipped data download if TRUE

Value

The statement neccessary for the getData function.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
body <- statement(select=c('CampaignName','Clicks','Cost','Ctr'),
                  report="CAMPAIGN_PERFORMANCE_REPORT",
                  where="CampaignName STARTS_WITH 'A' AND Clicks > 100",
                  start="2018-01-20",
                  end="2018-01-21")
body <- statement(select=c('Criteria','Clicks','Cost','Ctr'),
                  report="KEYWORDS_PERFORMANCE_REPORT",
                  where="Clicks > 100",
                  start="2018-01-20",
                  end="2018-01-21")    
body <- statement(select=c('Clicks','AveragePosition','Cost','Ctr'),
                  report="ACCOUNT_PERFORMANCE_REPORT",
                  start="2018-01-20",
                  end="2018-01-21") 

Example output



RAdwords documentation built on May 2, 2019, 6:12 a.m.