Learn R Programming

rvkstat (version 3.2.0)

vkGetAdsLayout: Appearance of Advertisements.

Description

Allows you to get a list of advertisements and a description of their appearance from the advertising office 'Vkontakte'.

Usage

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")
)

Arguments

account_id

Advertising account ID, a list of all available advertising accounts can be obtained using the function vkGetAdAccounts.

client_id

Client identifier from which advertisements are requested. Available and required for advertising agencies.

include_deleted

Boolean TRUE or FALSE, flag, specifying whether to display archived ads.

only_deleted

Boolean TRUE or FALSE, flag, get only deleted ads.

campaign_ids

Numeric vector, filter by advertising campaigns.

ad_ids

Numeric vector, ad filter.

status_names

Numeric vector, filter by advertising campaigns.

username

Your vkontakte login.

api_version

Vkontakte API version.

token_path

Path to dir with credentials

access_token

API access tokens obtained using vkAuth or vkGetToken functions

Value

Data frame with next values:

1. id

ad id.

2. campaign_id

campaign id.

3. ad_format

ad format.

4. cost_type

type of payment.

5. video

1 - the ad is a video ad.

6. title

ad title.

7. description

description of the advertisement.

8. link_url

link to the advertised object.

9. link_domain

domain of the advertised site..

10. preview_link

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.

11. image_src

ad image url.

Details

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.

References

Documentation for API method ads.getAdsLayout: https://vk.com/dev/ads.getAdsLayout

Examples

Run this code
# NOT RUN {
# get Ads Layouts
my_vk_ads <- vkGetAdsLayout(account_id = 11111111)
# }

Run the code above in your browser using DataLab