Title: | 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>. |
Authors: | Alexey Seleznev [aut, cre]
|
Maintainer: | Alexey Seleznev <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.2.0 |
Built: | 2025-02-02 02:55:05 UTC |
Source: | https://github.com/selesnow/rappsflyer |
Loading data from AppsFlyer Pull API <https://support.appsflyer.com/hc/en-us/articles/207034346-Using-Pull-API-aggregate-data>.
The DESCRIPTION file:
Package: | rappsflyer |
Type: | Package |
Title: | Work with AppsFlyer API |
Version: | 0.2.0 |
Date: | 2021-03-18 |
Authors@R: | c(person(given = "Alexey", family = "Seleznev", role = c("aut", "cre"), email = "[email protected]", comment = c(ORCID = "0000-0003-0410-7385"))) |
Author: | Alexey Seleznev [aut, cre] (<https://orcid.org/0000-0003-0410-7385>) |
Maintainer: | Alexey Seleznev <[email protected]> |
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 |
Config/pak/sysreqs: | libicu-dev libssl-dev |
Repository: | https://selesnow.r-universe.dev |
RemoteUrl: | https://github.com/selesnow/rappsflyer |
RemoteRef: | HEAD |
RemoteSha: | b21ec42e1b564d1358186b6d35b1c1788d7ff573 |
Index of help topics:
af_get_ad_revenue_raw_data Get ad revenue raw data af_get_aggregate_data Get AppsFlyer aggregate data 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
Further information is available in the following vignettes:
rappsflyer-intro |
Работа с API AppsFlyer на R (source, pdf) |
Alexey Seleznev [aut, cre] (<https://orcid.org/0000-0003-0410-7385>) Maintainer: Alexey Seleznev <[email protected]>
Get ad revenue raw data from AppsFlyer Pull API
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"))
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"))
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. |
Alexey Seleznev
AppsFlyer Pull API documentation
## 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)
## 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 (user acquisition and retargeting) data
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"))
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"))
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. |
Alexey Seleznev
AppsFlyer Pull API documentation
## 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)
## 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 statistic data from AppsFlyer Master API
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") )
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") )
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. |
Alexey Seleznev
Master API documentation Field dictionary
## 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)
## 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 organic and non-organic raw data reports
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"))
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"))
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. |
Alexey Seleznev
AppsFlyer Pull API documentation
## 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)
## 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 from AppsFlyer
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") )
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") )
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 |
Alexey Seleznev
AppsFlyer Pull API documentation
## 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)
## 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 in current R session
af_set_api_token(api_token)
af_set_api_token(api_token)
api_token |
Your AppsFlyer API token. |
Alexey Seleznev
For more details go link
## Not run: af_set_api_token("Your API token") ## End(Not run)
## Not run: af_set_api_token("Your API token") ## End(Not run)