Type: | Package |
Title: | Work with AppsFlyer API |
Version: | 0.2.0 |
Date: | 2021-03-19 |
Maintainer: | Alexey Seleznev <selesnow@gmail.com> |
Description: | Loading data from AppsFlyer Pull API https://support.appsflyer.com/hc/en-us/articles/207034346-Using-Pull-API-aggregate-data. |
License: | MIT + file LICENSE |
Imports: | httr, stringr, retry, dplyr, tidyr, lgr |
Suggests: | knitr, rmarkdown |
VignetteBuilder: | knitr |
Encoding: | UTF-8 |
Language: | ru |
LazyData: | true |
NeedsCompilation: | no |
Packaged: | 2021-03-19 07:17:02 UTC; Alsey |
Author: | Alexey Seleznev |
Repository: | CRAN |
Date/Publication: | 2021-03-22 15:50:02 UTC |
Work with AppsFlyer API
Description
Loading data from AppsFlyer Pull API <https://support.appsflyer.com/hc/en-us/articles/207034346-Using-Pull-API-aggregate-data>.
Details
The DESCRIPTION file:
Package: | rappsflyer |
Type: | Package |
Title: | Work with AppsFlyer API |
Version: | 0.2.0 |
Date: | 2021-03-19 |
Authors@R: | c(person(given = "Alexey", family = "Seleznev", role = c("aut", "cre"), email = "selesnow@gmail.com", comment = c(ORCID = "0000-0003-0410-7385")), person(given = "Netpeak", role = c("cph", "fnd"))) |
Maintainer: | Alexey Seleznev <selesnow@gmail.com> |
Description: | Loading data from AppsFlyer Pull API <https://support.appsflyer.com/hc/en-us/articles/207034346-Using-Pull-API-aggregate-data>. |
License: | MIT + file LICENSE |
Imports: | httr, stringr, retry, dplyr, tidyr, lgr |
Suggests: | knitr, rmarkdown |
VignetteBuilder: | knitr |
Encoding: | UTF-8 |
Language: | ru |
LazyData: | true |
Author: | Alexey Seleznev [aut, cre] (<https://orcid.org/0000-0003-0410-7385>), Netpeak [cph, fnd] |
Index of help topics:
af_get_ad_revenue_raw_data Get Ad Revenue Raw Data af_get_aggregate_data Get 'AppsFlyer' Aggregate Data Reports af_get_data Get Data From 'AppsFlyer Master API' af_get_raw_data Get 'AppsFlyer' Raw Data Reports af_get_targeting_validation_rules Get Targeting Validation Rules af_set_api_token Set 'AppsFlyer' API Token rappsflyer-package Work with AppsFlyer API
Author(s)
NA Maintainer: Alexey Seleznev <selesnow@gmail.com>
Get Ad Revenue Raw Data
Description
Get ad revenue raw data from 'AppsFlyer Pull API'
Usage
af_get_ad_revenue_raw_data(
date_from = Sys.Date() - 8,
date_to = Sys.Date() - 1,
report_type = c("ad_revenue_raw"),
is_organic = FALSE,
additional_fields = c("device_model",
"keyword_id",
"store_reinstall",
"deeplink_url",
"oaid",
"ad_unit",
"segment",
"placement",
"monetization_network",
"impressions",
"mediation_network",
"is_lat"),
timezone = "Europe/Moscow",
retargeting = NULL,
maximum_rows = 1000000,
app_id = getOption("apps_flyer_app_id"),
api_token = getOption("apps_flyer_api_key"))
Arguments
date_from |
Reporting start date. |
date_to |
Reporting finish date. |
report_type |
Report type. now it's only ad_revenue_raw. |
is_organic |
If TRUE you get only organic data. |
additional_fields |
Character vector of report's additional fields. |
timezone |
Your timezone, for example Europe/Moscow. |
retargeting |
If TRUE you get retargeting data. |
maximum_rows |
Report rows limit. |
app_id |
Your app id from apps flyer. |
api_token |
Your AppsFlyer API token V1.0 for more details go link. |
Value
data.frame.
Author(s)
Alexey Seleznev
See Also
AppsFlyer Pull API documentation
Examples
## Not run:
af_set_api_token("Your API token")
ad_data <- af_get_ad_revenue_raw_data(
date_from = "2021-03-01",
date_to = "2021-03-15",
app_id = "id0001111"
)
## End(Not run)
Get 'AppsFlyer' Aggregate Data Reports
Description
Get AppsFlyer Aggregate (user acquisition and retargeting) data
Usage
af_get_aggregate_data(
date_from = Sys.Date() - 8,
date_to = Sys.Date() - 1,
report_type = c("daily_report",
"partners_report",
"partners_by_date_report",
"geo_report",
"geo_by_date_report"),
additional_fields = c("keyword_id",
"store_reinstall",
"deeplink_url",
"oaid",
"install_app_store",
"contributor1_match_type",
"contributor2_match_type",
"contributor3_match_type",
"match_type"),
media_source = NULL,
attribution_touch_type = NULL,
currency = NULL,
timezone = "Europe/Moscow",
retargeting = NULL,
app_id = getOption("apps_flyer_app_id"),
api_token = getOption("apps_flyer_api_key"))
Arguments
date_from |
Reporting start date. |
date_to |
Reporting finish date. |
report_type |
Report type. One of: daily_report, partners_report, partners_by_date_report, geo_report, geo_by_date_report. For more details go to Integration > API access in AppsFlyer Web UI. |
additional_fields |
Character vector of report's additional fields. |
media_source |
Use to limit (filter) to a specific media source.for example, if you need inly facebook data in your report use media_source="facebook". |
attribution_touch_type |
Set this parameter as shown in the example to get view-through attribution (VTA) KPIs. For example attribution_touch_type="impression". |
currency |
Currency of revenue and cost. Aggregate Pull API reports always use the app-specific currency. |
timezone |
Your timezone, for example Europe/Moscow. |
retargeting |
If TRUE you get retargeting data. |
app_id |
Your app id from apps flyer. |
api_token |
Your AppsFlyer API token V1.0 for more details go link. |
Value
data.frame.
Author(s)
Alexey Seleznev
See Also
AppsFlyer Pull API documentation
Examples
## Not run:
af_set_api_token("Your API token")
geo_data <- af_get_aggregate_data(
date_from = "2021-03-01",
date_to = "2021-03-15",
report_type = "geo_by_date_report",
app_id = "id0001111"
)
## End(Not run)
Get Data From 'AppsFlyer Master API'
Description
Get statistic data from 'AppsFlyer Master API'
Usage
af_get_data(
date_from = Sys.Date() - 8,
date_to = Sys.Date() - 1,
dimensions = c("app_id",
"pid",
"af_channel",
"c",
"af_c_id",
"geo"),
metrics = c("impressions",
"clicks",
"installs",
"sessions",
"loyal_users",
"cost",
"revenue",
"uninstalls"),
filters = NULL,
currency = NULL,
timezone = "Europe/Moscow",
app_id = getOption("apps_flyer_app_id"),
api_token = getOption("apps_flyer_api_key")
)
Arguments
date_from |
Reporting start date. |
date_to |
Reporting finish date. |
dimensions |
Character vector. These dimensions are used for collecting the data into groups to allow easier and more accurate examination of the information.. For more details see docs. |
metrics |
KPIs are the metrics used for gaining an insight into the behavior of your app. For more details see docs. |
filters |
Data filter expression, for example |
currency |
Monetary values are in the app-specific currency. Example: |
timezone |
Time zone used is according to the app-specific timezone. Example: |
app_id |
Your app id from apps flyer. |
api_token |
Your AppsFlyer API token V1.0 for more details go link. |
Value
data.frame.
Author(s)
Alexey Seleznev
See Also
Master API documentation Field dictionary
Examples
## Not run:
af_set_api_token("Your API token")
ad_data <- af_get_data(
date_from = "2021-03-01",
date_to = "2021-03-15",
app_id = "id0001111"
)
## End(Not run)
Get 'AppsFlyer' Raw Data Reports
Description
Get 'AppsFlyer' organic and non-organic raw data reports
Usage
af_get_raw_data(
date_from = Sys.Date() - 8,
date_to = Sys.Date() - 1,
report_type = c("installs_report",
"in_app_events_report",
"uninstall_events_report"),
media_source = NULL,
category = NULL,
event_name = NULL,
currency = NULL,
is_organic = FALSE,
additional_fields = c("device_model",
"keyword_id",
"store_reinstall",
"deeplink_url",
"oaid",
"install_app_store",
"contributor1_match_type",
"contributor2_match_type",
"contributor3_match_type",
"match_type",
"device_category",
"gp_referrer",
"gp_click_time",
"gp_install_begin",
"amazon_aid",
"keyword_match_type",
"att",
"conversion_type",
"campaign_type",
"is_lat"),
timezone = "Europe/Moscow",
retargeting = NULL,
maximum_rows = 1000000,
app_id = getOption("apps_flyer_app_id"),
api_token = getOption("apps_flyer_api_key"))
Arguments
date_from |
Reporting start date. |
date_to |
Reporting finish date. |
report_type |
Report type. One of: installs_report, in_app_events_report, uninstall_events_report. For more details go to Integration > API access in AppsFlyer Web UI. |
media_source |
Use to limit (filter) to a specific media source.for example, if you need inly facebook data in your report use media_source="facebook". |
category |
Traffic source category filter, for examplr category="standard". |
event_name |
Filter in-app events by specified events. Select multiple events by using a character vector. For example: event_name = c( "af_purchase", "ftd" ). |
currency |
Currency of the revenue and cost. |
is_organic |
If TRUE you get only organic data. |
additional_fields |
Character vector of report's additional fields. |
timezone |
Your timezone, for example Europe/Moscow. |
retargeting |
If TRUE you get retargeting data. |
maximum_rows |
Report rows limit. |
app_id |
Your app id from apps flyer. |
api_token |
Your AppsFlyer API token V1.0 for more details go link. |
Value
data.frame.
Author(s)
Alexey Seleznev
See Also
AppsFlyer Pull API documentation
Examples
## Not run:
af_set_api_token("Your API token")
raw_data <- af_get_raw_data(
date_from = "2021-03-01",
date_to = "2021-03-15",
report_type = "installs_report",
app_id = "id0001111"
)
## End(Not run)
Get Targeting Validation Rules
Description
Get targeting validation rules from 'AppsFlyer'
Usage
af_get_targeting_validation_rules(
date_from = Sys.Date() - 8,
date_to = Sys.Date() - 1,
report_type = c("invalid_installs_report",
"invalid_in_app_events_report"),
additional_fields = c("device_model",
"keyword_id",
"store_reinstall",
"deeplink_url",
"oaid",
"rejected_reason",
"rejected_reason_value",
"contributor1_match_type",
"contributor2_match_type",
"contributor3_match_type",
"match_type",
"device_category",
"gp_referrer",
"gp_click_time",
"gp_install_begin",
"amazon_aid",
"keyword_match_type",
"att",
"conversion_type",
"campaign_type",
"is_lat"),
timezone = "Europe/Moscow",
maximum_rows = 1000000,
app_id = getOption("apps_flyer_app_id"),
api_token = getOption("apps_flyer_api_key")
)
Arguments
date_from |
Reporting start date. |
date_to |
Reporting finish date. |
report_type |
Report type. One of: invalid_installs_report, invalid_in_app_events_report. For more details go to Integration > API access in AppsFlyer Web UI. |
additional_fields |
Character vector of report's additional fields. |
timezone |
Your timezone, for example Europe/Moscow. |
maximum_rows |
Report rows limit. |
app_id |
Your app id from apps flyer. |
api_token |
Your AppsFlyer API token V1.0 for more details go link |
Value
data.frame.
Author(s)
Alexey Seleznev
See Also
AppsFlyer Pull API documentation
Examples
## Not run:
af_set_api_token("Your API token")
inv_data <- af_get_targeting_validation_rules(
date_from = "2021-03-01",
date_to = "2021-03-15",
report_type = "invalid_installs_report",
app_id = "example.app.com"
)
## End(Not run)
Set 'AppsFlyer' API Token
Description
Set AppsFlyer API token in current R session
Usage
af_set_api_token(api_token)
Arguments
api_token |
Your AppsFlyer API token. |
Value
No return value, called for set api token in current R session.
Author(s)
Alexey Seleznev
See Also
For more details go link
Examples
## Not run:
af_set_api_token("Your API token")
## End(Not run)