Example #1
0
    // Use this for initialization
    void Awake()
    {
        Debug.Log("awake");
        Amplitude amplitude = Amplitude.getInstance();

        amplitude.setServerUrl("https://api2.amplitude.com");
        amplitude.logging = true;
        amplitude.trackSessionEvents(true);
        amplitude.useAdvertisingIdForDeviceId();
        amplitude.init("e7177d872ff62c0356c973848c7bffba");
        Debug.Log(amplitude.getDeviceId());

        Dictionary <string, bool> trackingOptions = new Dictionary <string, bool>();

        trackingOptions.Add("disableCity", true);
        trackingOptions.Add("disableIPAddress", true);
        trackingOptions.Add("disableIDFV", true);
        trackingOptions.Add("disableIDFA", true);
        trackingOptions.Add("disableCountry", true);

        Amplitude app2 = Amplitude.getInstance("app2");

        app2.logging = true;
        app2.trackSessionEvents(true);
        app2.setTrackingOptions(trackingOptions);
        app2.setDeviceId("111111bca");
        app2.init("3653adbf32717221cacbf722f4671052");
        Debug.Log(app2.getDeviceId());
        app2.logEvent("logging to unity demo 2");
        app2.logEvent("keep logging events");
    }
Example #2
0
    // Use this for initialization
    void Awake()
    {
        Debug.Log("awake");
        // Amplitude amplitude = Amplitude.Instance;
        Amplitude amplitude = Amplitude.getInstance();

        amplitude.logging = true;
        amplitude.trackSessionEvents(true);
        amplitude.init("a2dbce0e18dfe5f8e74493843ff5c053");
        Debug.Log(amplitude.getDeviceId());

        Dictionary <string, bool> trackingOptions = new Dictionary <string, bool>();

        trackingOptions.Add("disableCity", true);
        trackingOptions.Add("disableIPAddress", true);
        trackingOptions.Add("disableIDFV", true);
        trackingOptions.Add("disableIDFA", true);
        trackingOptions.Add("disableCountry", true);

        Amplitude app2 = Amplitude.getInstance("app2");

        app2.logging = true;
        app2.trackSessionEvents(true);
        app2.setTrackingOptions(trackingOptions);
        app2.init("3653adbf32717221cacbf722f4671052");
        Debug.Log(app2.getDeviceId());
        app2.logEvent("logging to unity demo 2");
        app2.logEvent("keep logging events");
    }
Example #3
0
    public AnaliticsCore()
    {
        FirebaseApp.CheckAndFixDependenciesAsync().ContinueWithOnMainThread(task => {
            _dependencyStatus = task.Result;
            if (_dependencyStatus == DependencyStatus.Available)
            {
                InitializeFirebase();
            }
            else
            {
                /*
                 * Debug.LogError("Could not resolve all Firebase dependencies: " + _dependencyStatus);
                 */
            }
        });

        _amplitude = Amplitude.getInstance();
        _amplitude.trackSessionEvents(true);
        _amplitude.init("94a37eb01d2b2e09b2e836dcd7b44ad0");
    }