Type: | Package |
Title: | Loading Facebook and Instagram Advertising Data from 'Smartly.io' |
Description: | Aims at loading Facebook and Instagram advertising data from 'Smartly.io' into R. 'Smartly.io' is an online advertising service that enables advertisers to display commercial ads on social media networks (see http://www.smartly.io/ for more information). The package offers an interface to query the 'Smartly.io' API and loads data directly into R for further data processing and data analysis. |
Version: | 0.1.3 |
Author: | Johannes Burkhardt <johannes.burkhardt@gmail.com> |
Maintainer: | Johannes Burkhardt <johannes.burkhardt@gmail.com> |
Depends: | R (≥ 3.0.0) |
Imports: | RCurl |
License: | MIT + file LICENSE |
URL: | https://github.com/rstats-lab/RSmartlyIO, https://app.smartly.io |
BugReports: | https://github.com/rstats-lab/RSmartlyIO/issues |
Date: | 2019-01-21 |
RoxygenNote: | 6.0.1 |
NeedsCompilation: | no |
Packaged: | 2019-01-21 10:13:56 UTC; jburkhardt |
Repository: | CRAN |
Date/Publication: | 2019-01-21 10:30:02 UTC |
Loading Facebook and Instagram Advertising Data from Smartly.io
Description
Aims at loading Facebook and Instagram advertising data from Smartly.io into R. Smartly.io is an online advertising service that enables advertisers to display commercial ads on social media networks. The package offers an interface to query the Smartly.io API and loads data directly into R for further data processing and data analysis.
Author(s)
Johannes Burkhardt <johannes.burkhardt@gmail.com> https://github.com/rstats-lab/RSmartlyIO
Examples
## Not run:
data <- getSmartlyData(start = "2016-03-01",
end = "2016-03-02",
date = "date",
accountID="*****************",
accountInfo = F,
campaignStructure = c("campaign_name", "campaign_fb_id"),
billing = c("bid.optimization_goal", "bid.billing_event"),
targeting = c("targeting.geo_locations.countries"),
creative = c("creative_meta.call_to_action"),
#facebook = "age",
apiToken="************************************",
metrics = c("impressions","clicks"))
## End(Not run)
Get Smartly.io Data
Description
getSmartlyData posts the query and downloads the data. The data are retrieved from the API as a dataframe.
Usage
getSmartlyData(start, end, date = "date", accountID, accountInfo = F,
campaignStructure = NULL, billing = NULL, targeting = NULL,
creative = NULL, facebook = NULL, attribution = "28d", apiToken,
metrics)
Arguments
start |
Beginning of date range. Format: "2019-01-01" |
end |
End of date range. Format: "2019-01-10" |
date |
Date aggregation level. One out of date, year, month, weekofyear, weekday |
accountID |
Smartly.io Account ID. Input as character: "1234abcdefg5678" |
accountInfo |
Account Information. TRUE/FALSE |
campaignStructure |
Campaign Information Selection. Vector with multiple arguments out of: campaign_name, campaign_fb_id, adgroup_name, adgroup_fb_id, name, id, fb_objective, campaign_start_date |
billing |
Billing Information Selection. Vector with multiple arguments out of: bid.optimization_goal, bid.billing_event |
targeting |
Targeting Settings of Campaigns. Vector with multiple arguments out of: targeting.geo_locations.countries, targeting.geo_locations.cities, targeting.genders, targeting.age_min, targeting.age_max, targeting.interests, targeting.behaviors, targeting.custom_audiences, targeting.excluded_custom_audiences, targeting.connections, targeting.user_os, targeting.user_device, targeting.page_types |
creative |
Creative/Ad Characteristics. Vector with multiple arguments out of: creative_meta.call_to_action, creative_meta, creative_meta.type, creative_meta.post_type, creative_meta.name, creative_meta.picture, creative_meta.post_fb_id, creative_meta.post_fb_link, creative_meta.text, creative_meta.title, creative_meta.link, creative_meta.url_tags |
facebook |
Facebook Settings. One argument out of: age, country, gender, age_gender, placement, cross_device, region, hourly_stats_aggregated_by_advertiser_time_zone, hourly_stats_aggregated_by_audience_time_zone |
attribution |
Attribtuion Time Window, defaults to 28 days. One of: "1d","7d" or "28d". |
apiToken |
API Token. Character. Usually the API token is provided within the Smartly.io web interface or by the account manager. |
metrics |
Metrics. Note: There are more metrics available. See the reporting section in the smartly.io interface. Vector with multiple argumets out of: impressions, ctr, cpm, cpc, spent, conversions, inline_link_clicks, clicks, cpa, reach, frequency, roi, revenue, social_impressions, social_clicks, website_clicks, newsfeed_clicks, deeplink_clicks, app_store_clicks, call_to_action_clicks, inline_post_engagement |
Value
Dataframe