Exemplo n.º 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");
    }