Пример #1
0
    void OnMouseDown()
    {
        if (!isLocked)
        {
            if (levelNumber == 1)
            {
                Game.tutorial = true;
            }
            else
            {
                Game.tutorial = false;
            }

            Game.levelNumber = levelNumber;
            Application.LoadLevel("level" + levelNumber);

#if UNITY_ANDROID
            FlurryAndroid.logEvent("Level " + levelNumber, false);
#endif
#if UNITY_IOS
            FlurryAnalytics.logEvent("Level " + levelNumber, false);
#endif
        }
        else
        {
            Debug.Log("Level " + levelNumber + " is locked!");
        }
    }
 public void TrackEvent(string eventName, Dictionary <string, string> flurryParameters = null, Dictionary <string, object> ymParameters = null)
 {
     if (_isInitialized)
     {
         FlurryAnalytics.logEventWithParameters(eventName, flurryParameters, false);
         AppMetrica.Instance.ReportEvent(eventName, ymParameters);
     }
 }
    private void initPlugins()
    {
        FlurryAnalytics.setSessionReportsOnPauseEnabled(true);
        FlurryAnalytics.setSessionReportsOnCloseEnabled(true);
        //FlurryAnalytics.startSession( "FY62XCCVWBJV3HTHDYYT" );
        FlurryAnalytics.startSession("ZQHX27PYFDWRNRKSWQN3");

        _isInitialized = true;
    }
Пример #4
0
    void Start()
    {
#if UNITY_ANDROID
        FlurryAndroid.onStartSession("JTR3SGZZ9C2439G956Q7", true, testAds);
#endif
#if UNITY_IOS
        FlurryAnalytics.startSession("H8QFPTXMM9NH2W3QVWX4");
#endif
    }
Пример #5
0
    // Use this for initialization
    void Start()
    {
        // Flurry Ads
        FlurryAnalytics.startSession(flurryAppId, true);
        FlurryAds.fetchAdsForSpace(adsSpaceBanner, FlurryAdPlacement.BannerBottom);
        FlurryAds.fetchAdsForSpace(adsSpaceFullScreen, FlurryAdPlacement.FullScreen);

        // AdColony Ads

        AdColony.OnVideoStarted         = this.OnVideoStarted;
        AdColony.OnVideoFinished        = this.OnVideoFinished;
        AdColony.OnAdAvailabilityChange = this.OnAdAvailabilityChange;
        AdColony.OnV4VCResult           = this.OnV4VCResult;

        AdColony.Configure
        (
            "version:1.0,store:google",
            AdColonyAppId,             // app id
            AdColonyZoneId             // zone id
        );
    }
        protected override void LogEventInternal(string eventID, params AnalyticsParameter[] parameters)
        {
            var parameterDictionary = ConvertParameters(parameters);

            FlurryAnalytics.logEventWithParameters(eventID, parameterDictionary, false);
        }
 protected override void LogEventInternal(string eventID)
 {
     FlurryAnalytics.logEvent(eventID, false);
 }
 protected override void InitializeOnAwake()
 {
     FlurryAnalytics.startSession(flurryKeyIOS);
 }
Пример #9
0
    void OnGUI()
    {
        beginColumn();

        if (GUILayout.Button("Start Flurry Session"))
        {
            // Optional information
            FlurryAnalytics.setAge(12);
            FlurryAnalytics.setGender("M");

            // replace with your Flurry Key!!!
            FlurryAnalytics.startSession("XJHB5EGMQ9NCC6XWH43W");
        }


        if (GUILayout.Button("Log Event"))
        {
            FlurryAnalytics.logEvent("Stuff Happened", false);
        }


        if (GUILayout.Button("Log Event with Params"))
        {
            var dict = new Dictionary <string, string>();
            dict.Add("akey1", "value1");
            dict.Add("bkey2", "value2");
            dict.Add("ckey3", "value3");
            dict.Add("dkey4", "value4");

            FlurryAnalytics.logEventWithParameters("EventWithParams", dict, false);
        }


        if (GUILayout.Button("Log Timed Event"))
        {
            FlurryAnalytics.logEvent("Timed Event", true);
        }


        if (GUILayout.Button("End Timed Event"))
        {
            FlurryAnalytics.endTimedEvent("Timed Event");
        }


        if (GUILayout.Button("Set Reports on Close"))
        {
            FlurryAnalytics.setSessionReportsOnCloseEnabled(true);
        }


        if (GUILayout.Button("Set Reports on Pause"))
        {
            FlurryAnalytics.setSessionReportsOnPauseEnabled(true);
        }


        endColumn(true);


        if (GUILayout.Button("Enable Ads"))
        {
            FlurryAds.enableAds(true);
        }


        if (GUILayout.Button("Fetch Ads"))
        {
            FlurryAds.fetchAdForSpace("adSpace", FlurryAdSize.Bottom);
            FlurryAds.fetchAdForSpace("splash", FlurryAdSize.Fullscreen);
        }


        if (GUILayout.Button("Check if Ad Available"))
        {
            var isAvailable = FlurryAds.isAdAvailableForSpace("adSpace", FlurryAdSize.Bottom);
            Debug.Log("is ad available: " + isAvailable);
        }


        if (GUILayout.Button("Show Ad on Bottom"))
        {
            FlurryAds.displayAdForSpace("adSpace", FlurryAdSize.Bottom);
        }


        if (GUILayout.Button("Fetch and Show Ad"))
        {
            FlurryAds.fetchAndDisplayAdForSpace("adSpace", FlurryAdSize.Top);
        }


        if (GUILayout.Button("Show Full Screen Ad"))
        {
            FlurryAds.fetchAndDisplayAdForSpace("splash", FlurryAdSize.Fullscreen);
        }


        if (GUILayout.Button("Remove Ad"))
        {
            FlurryAds.removeAdFromSpace("adSpace");
        }

        endColumn();
    }