Provide to get a list of advertisements from the advertising office 'Vkontakte'.
vkGetAds(
account_id = vkCurrentAdAccount(),
client_id = vkCurrentClientAccount(),
include_deleted = TRUE,
only_deleted = FALSE,
campaign_ids = "null",
ad_ids = "null",
status_names = TRUE,
username = getOption("rvkstat.username"),
api_version = getOption("rvkstat.api_version"),
token_path = vkTokenPath(),
access_token = getOption("rvkstat.access_token")
)
The ID of the advertising account, a list of all available advertising offices can be obtained using the function vkGetAdAccounts.
Client identifier from which advertisements are requested. Available and required for advertising agencies.
Boolean TRUE or FALSE, flag, specifying the need to display archived ads.
Boolean TRUE or FALSE, flag, get only deleted ads.
Numeric vector, filter by advertising campaigns.
Numeric vector, ad filter.
If TRUE you get status names, in FALSE status Ids.
Your vkontakte login.
Vkontakte API version.
Path to dir with credentials
API access tokens obtained using vkAuth or vkGetToken functions
Date frame with the following values:
ad id.
campaign id.
name of the announcement.
ad status.
ad format.
ad moderation status.
total ad limit in rubles. 0 - no limit is set.
date and time of ad creation.
the date and time of the last ad change.
label about ad age limit.
ID of the subject or subsection of the subject of the announcement, a list of topics can be obtained using the function vkGetAdCategories.
Subject ID or sub topic of the ad. Additional topics, a list of topics can be obtained using the function vkGetAdCategories.
type of payment.
price per switch in kopecks.
price per 1000 impressions in kopecks.
limit the number of times this ad is shown per user.
a sign that the number of ad impressions per user is limited.
advertising platforms where the ad will be displayed. (if ad_format is 1, 0 - VKontakte and partner sites, 1 - only VKontakte, (if ad_format is 9) all - all sites, desktop - full version of the site, mobile - mobile site and applications.)
1 - the ad is a video ad.
If campaign_ids and ad_ids filters are enabled at the same time, the following ads will be displayed: 1. If the ad id is specified in ad_ids, then it is displayed. 2. If the ad belongs to an advertising campaign whose id is specified in campaign_ids, then it is displayed. 3. If there is an ad with the id specified in ad_ids and it belongs to a campaign whose id is specified in campaign_ids, then this ad campaign is ignored, i.e. for her, rule 2 does not work.
No more than 2000 ads are output from no more than 2000 campaigns.
Documentation for API method ads.getAds: https://vk.com/dev/ads.getAds
# NOT RUN {
## auth
my_tok <- vkAuth(app_id = 1,app_secret = "H2Pk8htyFD8024mZaPHm")
# ads list
my_vk_ads <- vkGetAds(account_id = 11111111,
access_token = my_tok$access_token)
# }
Run the code above in your browser using DataLab