{"id":15722695,"url":"https://github.com/agulev/defold-extension-appsflyer","last_synced_at":"2025-07-27T03:33:36.635Z","repository":{"id":46979950,"uuid":"122758073","full_name":"AGulev/defold-extension-appsflyer","owner":"AGulev","description":"AppsFlyer native extension for Defold engine.","archived":false,"fork":false,"pushed_at":"2023-10-04T12:42:41.000Z","size":26878,"stargazers_count":6,"open_issues_count":1,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-25T10:49:13.672Z","etag":null,"topics":["appsflyer","defold","defold-game-engine","defold-library","defold-module"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AGulev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-24T16:33:11.000Z","updated_at":"2024-10-11T16:10:44.000Z","dependencies_parsed_at":"2023-10-04T17:58:09.199Z","dependency_job_id":null,"html_url":"https://github.com/AGulev/defold-extension-appsflyer","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/AGulev/defold-extension-appsflyer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AGulev%2Fdefold-extension-appsflyer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AGulev%2Fdefold-extension-appsflyer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AGulev%2Fdefold-extension-appsflyer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AGulev%2Fdefold-extension-appsflyer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AGulev","download_url":"https://codeload.github.com/AGulev/defold-extension-appsflyer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AGulev%2Fdefold-extension-appsflyer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267294180,"owners_count":24065343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appsflyer","defold","defold-game-engine","defold-library","defold-module"],"created_at":"2024-10-03T22:08:57.818Z","updated_at":"2025-07-27T03:33:36.615Z","avatar_url":"https://github.com/AGulev.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DefAppsFlyer\n\n[![Build Status](https://github.com/AGulev/defold-extension-appsflyer/workflows/Build%20with%20bob/badge.svg)](https://github.com/AGulev/defold-extension-appsflyer/actions)\n\n[AppsFlyer](https://appsflyer.com) [Native Extension](https://www.defold.com/manuals/extensions/) for the [Defold Game Engine](https://www.defold.com).\n\nAt the moment it is a very basic implementation of install tracking and custom event tracking. If you need some more functions feel free to contribute or [open an issue](https://github.com/AGulev/DefAppsFlyer/issues).\n\nSDK initialized automatically when the application starts assuming you complete the following setup steps.\n\n## Setup\n\nYou can use the DefAppsFlyer extension in your own project by adding this project as a [Defold library dependency](https://www.defold.com/manuals/libraries/). Open your game.project file and in the dependencies field under project add:\n\nhttps://github.com/AGulev/DefAppsFlyer/archive/master.zip\n\nOr point to the ZIP file of a [specific release](https://github.com/AGulev/DefAppsFlyer/releases).\n\nOpen your game.project in a text editor and paste next section:\n\n```lua\n[appsflyer]\nkey = your_appsflyer_key\napple_app_id = your_app_apple_id\nandroid_channel = amazon\nis_debug = 1\n```\n\n`key` is AppsFlyer dev key  \n`apple_app_id` is id of your application in App Store (not used now)  \n`android_channel` is custom channel (if needed)  \n`is_debug` 1 if you wanna use debug logs of the SDK and 0 for release mode  \n\n`Minimum SDK version` in `game.project-\u003eAndroid` should be **21** or above.\n\n`android.permission.READ_PHONE_STATE` is optional for AppsFlyer. Please add it into your `AndroidManifest.xml` if it's important for you.\n ```\n \u003c!-- Optional : --\u003e\n \u003cuses-permission android:name=\"android.permission.READ_PHONE_STATE\" /\u003e\n ```\n\n## API\n\n#### `appsflyer.start_sdk()`\n\nStarts the SDK.\n\nTypical usage of deferred SDK start is when an app would like to request consent from the user to collect data.\n\n#### `appsflyer.set_debug_log(is_enabled)`\n\n`is_enabled` boolean value\n\nEnables Debug logs for the AppsFlyer SDK. Should only be set to true in development environments.\n\n```lua\nappsflyer.set_debug_log(true)\nappsflyer.set_debug_log(false)\n```\n\n#### `appsflyer.set_callback(callback)`\n\nSets the callback function to receive conversion data events.\n\n```lua\nlocal function appsflyer_callback(self, message_id, message)\n    if message_id == appsflyer.CONVERSION_DATA_SUCCESS then\n        print(\"Conversion data loaded:\");\n        pprint(message);\n    elseif message_id == appsflyer.CONVERSION_DATA_FAIL then\n        print(\"Conversion data loading failed:\", message.error);\n    end\nend\n\nappsflyer.set_callback(appsflyer_callback)\n```\n\n#### `appsflyer.log_event(event, event_data)`\n\n`event` is an event name that maybe your custom or one of predefined by Appsflyer  \n`event_data` is a table with data for the `event`  \n\nLog an in-app event.\n\nMore information about predefined AppsFlyer methods [here](https://support.appsflyer.com/hc/en-us/articles/115005544169-Rich-In-App-Events-Android-and-iOS#Event-Types).\n\n```lua\nappsflyer.log_event(\"af_level_achieved\", {\n  af_level = 2,\n  af_score = 100\n})\n\nappsflyer.log_event(\"af_purchase\",{\n  af_currency = \"USD\",\n  af_content_id = \"item_id\",\n  af_revenue = 100\n})\n```\n\n#### `appsflyer.set_customer_user_id(user_id)`\n\nSetting your own Customer User ID in the AppsFlyer SDK enables you to cross-reference your own unique ID with the AppsFlyer ID and other identifiers.\n\nMore information about this method is available [here](https://support.appsflyer.com/hc/en-us/articles/207032126-Android-SDK-integration-guide-for-marketers#additional-apis-set-customer-user-id)\n\n```lua\nappsflyer.set_customer_user_id(\"your_customer_user_id\")\n```\n\n## Issues and suggestions\n\nIf you have any issues, questions or suggestions please [create an issue](https://github.com/AGulev/DefAppsFlyer/issues) or contact me: me@agulev.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagulev%2Fdefold-extension-appsflyer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagulev%2Fdefold-extension-appsflyer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagulev%2Fdefold-extension-appsflyer/lists"}