fb_stats: Import statistics from Facebook

Description Usage Arguments Examples

Description

This function will import the statistics for the chosen parameters.

Usage

1
2
fb_stats(account_id, fromDate, toDate, dimensions, metrics,
  breakdowns = "", level = "campaign", custom = "")

Arguments

account_id

The account id for which you want to import data fram (needs to start with "act_").

fromDate

The starting date for the time range you want.

toDate

The ending date for the time range you want.

dimensions

The dimensions to use in the API request.

metrics

The metrics to use in the API request.

breakdowns

What breakdowns should be used, e.g. age, gender etc.

level

The level in which you want the data returned c("account","campaign","adset","ad")

Examples

1
fb_stats(account_id, fromDate, toDate, dimensions, metrics, breakdowns = "", level="campaign")

lynuhs/fbAdsR documentation built on May 11, 2019, 7:29 p.m.