Allows you to get a list of advertisements and a description of their appearance from the advertising office 'Vkontakte'.
vkGetAdsLayout(
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")
)
Advertising account ID, a list of all available advertising accounts 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 whether to display archived ads.
Boolean TRUE or FALSE, flag, get only deleted ads.
Numeric vector, filter by advertising campaigns.
Numeric vector, ad filter.
Numeric vector, filter by advertising campaigns.
Your vkontakte login.
Vkontakte API version.
Path to dir with credentials
API access tokens obtained using vkAuth or vkGetToken functions
Data frame with next values:
ad id.
campaign id.
ad format.
type of payment.
1 - the ad is a video ad.
ad title.
description of the advertisement.
link to the advertised object.
domain of the advertised site..
link by clicking on which you can view the advertisement as it looks on the site. The link is available for 30 minutes after the vkGetAdsLayout function.
ad image url.
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.
The function is based on the API method ads.getAdsLayout, you can find out all the details of its work at https://vk.com/dev/ads.getAdsLayout.
Documentation for API method ads.getAdsLayout: https://vk.com/dev/ads.getAdsLayout
# NOT RUN {
# get Ads Layouts
my_vk_ads <- vkGetAdsLayout(account_id = 11111111)
# }
Run the code above in your browser using DataLab