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. |
Authors: | Johannes Burkhardt <[email protected]> |
Maintainer: | Johannes Burkhardt <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.3 |
Built: | 2025-03-11 04:30:28 UTC |
Source: | https://github.com/banboo-data/rsmartlyio |
getSmartlyData posts the query and downloads the data. The data are retrieved from the API as a dataframe.
getSmartlyData(start, end, date = "date", accountID, accountInfo = F, campaignStructure = NULL, billing = NULL, targeting = NULL, creative = NULL, facebook = NULL, attribution = "28d", apiToken, metrics)
getSmartlyData(start, end, date = "date", accountID, accountInfo = F, campaignStructure = NULL, billing = NULL, targeting = NULL, creative = NULL, facebook = NULL, attribution = "28d", apiToken, metrics)
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 |
Dataframe
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.
Johannes Burkhardt <[email protected]> https://github.com/rstats-lab/RSmartlyIO
## 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)
## 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)