GithubHelp home page GithubHelp logo

isabella232 / appsflyerunitysampleapp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from appsflyersdk/appsflyerunitysampleapp

0.0 0.0 0.0 11.85 MB

This is a sampe app for integrating AppsFlyer Unity plugin.

C# 1.69% Objective-C 1.34% Objective-C++ 1.04% C++ 95.93%

appsflyerunitysampleapp's Introduction

AppsFlyer Unity Sample App

Instructions for AppsFlyer's Unity Sample App project:

Open the Sample App Project using Unity.

Inside "Sample" folder, open "StartUp.cs".

In "StartUp.cs", enter your AppsFlyer Dev Key inside the "init"/"setAppsFlyerKey" function, and your Package Name / AppID inside "setAppID" function" -


using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class AppsFlyerObject : MonoBehaviour {
   void Start () {
   
   /* Mandatory - set your AppsFlyer’s Developer key. */
   AppsFlyer.setAppsFlyerKey ("YOUR_APPSFLYER_DEV_KEY");
   /* For detailed logging */
   /* AppsFlyer.setIsDebug (true); */
   
   #if UNITY_IOS
   
      /* Mandatory - set your apple app ID
      NOTE: You should enter the number only and not the "ID" prefix */
      AppsFlyer.setAppID ("YOUR_APP_ID_HERE");
      AppsFlyer.getConversionData();
      AppsFlyer.trackAppLaunch ();
      
   #elif UNITY_ANDROID
   
     /* For getting the conversion data in Android, you need to add the "AppsFlyerTrackerCallbacks" listener.*/
     AppsFlyer.init ("YOUR_APPSFLYER_DEV_KEY","AppsFlyerTrackerCallbacks");
     
  #endif
   }
}

Android: Change the project's package name in Player Setting.

iOS: Make sure to that Security.framework is added to XCode

Go to your AppsFlyer dashboard and add the app using the Package Name / App ID you configured in the code.

Create a custom tracking link from your AppsFlyer dashboard - More Information

Click the link on your device (Make sure to add &advertising_id="Your_Device_Google_Advertising_Id" for Android or &IDFA="Your_Device_IDFA" for iOS at the end of your tracking link). More Information

Install the App on your device. You should be seeing the Attribution result on the screen.

If you received the "Install Type: Non Organic" message on the app, you can go to your AppsFlyer dashboard and see the non-organic install there.

For a Non-Organic install - click the "Track Event" to track a custom purchase event. You can then see the revenue and event on your AppsFlyer dashboard.

iOS Integration Guide.

Android Integration Guide.

Screen Shots

appsflyerunitysampleapp's People

Contributors

af-dan avatar af-fess avatar sokoloff06 avatar wesfieldj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.