Ejemplo n.º 1
0
 private void logAdjustSignupEvent()
 {
     #if USE_ANALYTICS
     var adjustEvent = ADJEvent.EventWithEventToken(adjustSignupEventToken);
     Adjust.TrackEvent(adjustEvent);
     #endif
 }
Ejemplo n.º 2
0
        private void btnCallbakEvent_Click(object sender, RoutedEventArgs e)
        {
            var callbackEvent = new AdjustEvent("{yourCallbackEventToken}");

            callbackEvent.AddPartnerParameter("key", "value");
            Adjust.TrackEvent(callbackEvent);
        }
Ejemplo n.º 3
0
        private void btnPartnerEvent_Click(object sender, RoutedEventArgs e)
        {
            var partnerEvent = new AdjustEvent("{yourPartnerEventToken}");

            partnerEvent.AddPartnerParameter("foo", "bar");
            Adjust.TrackEvent(partnerEvent);
        }
Ejemplo n.º 4
0
        public static void TrackEvent(string eventToken, double?revenue, string currency, List <string> callbackList, List <string> partnerList)
        {
            var adjustEvent = new AdjustEvent(eventToken);

            if (revenue.HasValue)
            {
                adjustEvent.SetRevenue(revenue.Value, currency);
            }

            if (callbackList != null)
            {
                for (int i = 0; i < callbackList.Count; i += 2)
                {
                    var key   = callbackList[i];
                    var value = callbackList[i + 1];

                    adjustEvent.AddCallbackParameter(key, value);
                }
            }

            if (partnerList != null)
            {
                for (int i = 0; i < partnerList.Count; i += 2)
                {
                    var key   = partnerList[i];
                    var value = partnerList[i + 1];

                    adjustEvent.AddPartnerParameter(key, value);
                }
            }

            Adjust.TrackEvent(adjustEvent);
        }
Ejemplo n.º 5
0
        private void btnRevenueEvent_Click(object sender, RoutedEventArgs e)
        {
            var revenueEvent = new AdjustEvent("{yourRevenueEventToken}");

            revenueEvent.SetRevenue(0.01, "EUR");
            Adjust.TrackEvent(revenueEvent);
        }
Ejemplo n.º 6
0
        partial void BtnTrackRevenueEvent_TouchUpInside(UIButton sender)
        {
            var adjustEvent = ADJEvent.EventWithEventToken("a4fd35");

            adjustEvent.SetRevenue(0.01, "EUR");

            Adjust.TrackEvent(adjustEvent);
        }
Ejemplo n.º 7
0
        private void btnSimpleEvent_Click(object sender, RoutedEventArgs e)
        {
            var simpleEvent = new AdjustEvent("g3mfiw");

            // Assign custom identifier to event which will be reported in success/failure callbacks.
            simpleEvent.CallbackId = "PrettyRandomIdentifier";
            Adjust.TrackEvent(simpleEvent);
        }
Ejemplo n.º 8
0
        partial void BtnTrackPartnerEvent_TouchUpInside(UIButton sender)
        {
            var adjustEvent = ADJEvent.EventWithEventToken("w788qs");

            adjustEvent.AddPartnerParameter("x", "y");
            adjustEvent.AddPartnerParameter("foo", "bar");
            adjustEvent.AddPartnerParameter("x", "z");

            Adjust.TrackEvent(adjustEvent);
        }
Ejemplo n.º 9
0
        partial void BtnTrackCallbackEvent_TouchUpInside(UIButton sender)
        {
            var adjustEvent = ADJEvent.EventWithEventToken("34vgg9");

            adjustEvent.AddCallbackParameter("a", "b");
            adjustEvent.AddCallbackParameter("key", "value");
            adjustEvent.AddCallbackParameter("a", "c");

            Adjust.TrackEvent(adjustEvent);
        }
Ejemplo n.º 10
0
        private void TrackEvent()
        {
            Event();

            var eventNumber = 0;

            if (Command.ContainsParameter("eventName"))
            {
                var eventName = Command.GetFirstParameterValue("eventName");
                eventNumber = int.Parse(eventName.Substring(eventName.Length - 1));
            }

            var adjustEvent = _savedEvents[eventNumber];

            Adjust.TrackEvent(adjustEvent);
            _savedEvents.Remove(0);
        }
Ejemplo n.º 11
0
        public static void TrackEvent(string eventToken, double?revenue, string currency,
                                      string purchaseId, string callbackId, List <string> callbackList, List <string> partnerList)
        {
#if NETFX_CORE
            var adjustEvent = new AdjustEvent(eventToken)
            {
                PurchaseId = purchaseId
            };

            if (revenue.HasValue)
            {
                adjustEvent.SetRevenue(revenue.Value, currency);
            }

            if (!string.IsNullOrEmpty(callbackId))
            {
                adjustEvent.CallbackId = callbackId;
            }

            if (callbackList != null)
            {
                for (int i = 0; i < callbackList.Count; i += 2)
                {
                    var key   = callbackList[i];
                    var value = callbackList[i + 1];

                    adjustEvent.AddCallbackParameter(key, value);
                }
            }

            if (partnerList != null)
            {
                for (int i = 0; i < partnerList.Count; i += 2)
                {
                    var key   = partnerList[i];
                    var value = partnerList[i + 1];

                    adjustEvent.AddPartnerParameter(key, value);
                }
            }

            Adjust.TrackEvent(adjustEvent);
#endif
        }
Ejemplo n.º 12
0
        private void btnSimpleEvent_Click(object sender, RoutedEventArgs e)
        {
            var simpleEvent = new AdjustEvent("{yourSimpleEventToken}");

            Adjust.TrackEvent(simpleEvent);
        }
Ejemplo n.º 13
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set our view from the "main" layout resource.
            SetContentView(Resource.Layout.Main);

            Intent intent = this.Intent;
            var    data   = intent.Data;

            Adjust.AppWillOpenUrl(data);

            // Get our button from the layout resource,
            // and attach an event to it.
            Button btnTrackSimpleEvent   = FindViewById <Button>(Resource.Id.btnTrackSimpleEvent);
            Button btnTrackRevenueEvent  = FindViewById <Button>(Resource.Id.btnTrackRevenueEvent);
            Button btnTrackCallbackEvent = FindViewById <Button>(Resource.Id.btnTrackCallbackEvent);
            Button btnTrackPartnerEvent  = FindViewById <Button>(Resource.Id.btnTrackPartnerEvent);
            Button btnEnableOfflineMode  = FindViewById <Button>(Resource.Id.btnEnableOfflineMode);
            Button btnDisableOfflineMode = FindViewById <Button>(Resource.Id.btnDisableOfflineMode);
            Button btnEnableSDK          = FindViewById <Button>(Resource.Id.btnEnableSDK);
            Button btnDisableSDK         = FindViewById <Button>(Resource.Id.btnDisableSDK);
            Button btnIsSDKEnabled       = FindViewById <Button>(Resource.Id.btnIsSDKEnabled);

            btnTrackSimpleEvent.Click += delegate
            {
                AdjustEvent adjustEvent = new AdjustEvent("g3mfiw");
                Adjust.TrackEvent(adjustEvent);
            };

            btnTrackRevenueEvent.Click += delegate
            {
                AdjustEvent adjustEvent = new AdjustEvent("a4fd35");

                // Add revenue 1 cent of an euro.
                adjustEvent.SetRevenue(0.01, "EUR");
                adjustEvent.SetOrderId("dummy_id");

                Adjust.TrackEvent(adjustEvent);
            };

            btnTrackCallbackEvent.Click += delegate
            {
                AdjustEvent adjustEvent = new AdjustEvent("34vgg9");

                // Add callback parameters to this parameter.
                adjustEvent.AddCallbackParameter("a", "b");
                adjustEvent.AddCallbackParameter("key", "value");
                adjustEvent.AddCallbackParameter("a", "c");

                Adjust.TrackEvent(adjustEvent);
            };

            btnTrackPartnerEvent.Click += delegate
            {
                AdjustEvent adjustEvent = new AdjustEvent("w788qs");

                // Add partner parameters to this parameter.
                adjustEvent.AddPartnerParameter("x", "y");
                adjustEvent.AddPartnerParameter("foo", "bar");
                adjustEvent.AddPartnerParameter("x", "z");

                Adjust.TrackEvent(adjustEvent);
            };

            btnEnableOfflineMode.Click += delegate
            {
                Adjust.SetOfflineMode(true);
            };

            btnDisableOfflineMode.Click += delegate
            {
                Adjust.SetOfflineMode(false);
            };

            btnEnableSDK.Click += delegate
            {
                Adjust.Enabled = true;
            };

            btnDisableSDK.Click += delegate
            {
                Adjust.Enabled = false;
            };

            btnIsSDKEnabled.Click += delegate
            {
                string message = Adjust.Enabled ? "SDK is ENABLED" : "SDK is DISABLED";
                Toast.MakeText(this, message, ToastLength.Short).Show();
            };
        }
Ejemplo n.º 14
0
        partial void BtnTrackSimpleEvent_TouchUpInside(UIButton sender)
        {
            var adjustEvent = ADJEvent.EventWithEventToken("g3mfiw");

            Adjust.TrackEvent(adjustEvent);
        }
Ejemplo n.º 15
0
 public static void TrackEvent(WRTAdjustEvent adjustEvent)
 {
     Adjust.TrackEvent((AdjustEvent)adjustEvent.GetNativeEvent());
 }
Ejemplo n.º 16
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set our view from the "main" layout resource.
            SetContentView(Resource.Layout.Main);

            Intent intent = this.Intent;
            var    data   = intent.Data;

            Adjust.AppWillOpenUrl(data, this);

            // Get our button from the layout resource,
            // and attach an event to it.
            Button btnTrackSimpleEvent   = FindViewById <Button>(Resource.Id.btnTrackSimpleEvent);
            Button btnTrackRevenueEvent  = FindViewById <Button>(Resource.Id.btnTrackRevenueEvent);
            Button btnTrackCallbackEvent = FindViewById <Button>(Resource.Id.btnTrackCallbackEvent);
            Button btnTrackPartnerEvent  = FindViewById <Button>(Resource.Id.btnTrackPartnerEvent);
            Button btnEnableOfflineMode  = FindViewById <Button>(Resource.Id.btnEnableOfflineMode);
            Button btnDisableOfflineMode = FindViewById <Button>(Resource.Id.btnDisableOfflineMode);
            Button btnEnableSDK          = FindViewById <Button>(Resource.Id.btnEnableSDK);
            Button btnDisableSDK         = FindViewById <Button>(Resource.Id.btnDisableSDK);
            Button btnIsSDKEnabled       = FindViewById <Button>(Resource.Id.btnIsSDKEnabled);
            Button btnGetIds             = FindViewById <Button>(Resource.Id.btnGetIds);

            btnTrackSimpleEvent.Click += delegate
            {
                AdjustEvent adjustEvent = new AdjustEvent("g3mfiw");
                Adjust.TrackEvent(adjustEvent);
            };

            btnTrackRevenueEvent.Click += delegate
            {
                AdjustEvent adjustEvent = new AdjustEvent("a4fd35");

                // Add revenue 1 cent of an euro.
                adjustEvent.SetRevenue(0.01, "EUR");
                adjustEvent.SetOrderId("dummy_id");

                Adjust.TrackEvent(adjustEvent);
            };

            btnTrackCallbackEvent.Click += delegate
            {
                AdjustEvent adjustEvent = new AdjustEvent("34vgg9");

                // Add callback parameters to this parameter.
                adjustEvent.AddCallbackParameter("a", "b");
                adjustEvent.AddCallbackParameter("key", "value");
                adjustEvent.AddCallbackParameter("a", "c");

                Adjust.TrackEvent(adjustEvent);
            };

            btnTrackPartnerEvent.Click += delegate
            {
                AdjustEvent adjustEvent = new AdjustEvent("w788qs");

                // Add partner parameters to this parameter.
                adjustEvent.AddPartnerParameter("x", "y");
                adjustEvent.AddPartnerParameter("foo", "bar");
                adjustEvent.AddPartnerParameter("x", "z");

                Adjust.TrackEvent(adjustEvent);
            };

            btnEnableOfflineMode.Click += delegate
            {
                Adjust.SetOfflineMode(true);
            };

            btnDisableOfflineMode.Click += delegate
            {
                Adjust.SetOfflineMode(false);
            };

            btnEnableSDK.Click += delegate
            {
                Adjust.Enabled = true;
            };

            btnDisableSDK.Click += delegate
            {
                Adjust.Enabled = false;
            };

            btnIsSDKEnabled.Click += delegate
            {
                string message = Adjust.Enabled ? "SDK is ENABLED" : "SDK is DISABLED";
                Toast.MakeText(this, message, ToastLength.Short).Show();
            };

            btnGetIds.Click += delegate
            {
                Adjust.GetGoogleAdId(this, this);
                Console.WriteLine("Amazon Ad Id: " + Adjust.GetAmazonAdId(this));
                Console.WriteLine("Adid: " + Adjust.Adid);

                if (Adjust.Attribution != null)
                {
                    Console.WriteLine("Attribution Traker Token: " + Adjust.Attribution.TrackerToken);
                    Console.WriteLine("Attribution Traker Name: " + Adjust.Attribution.TrackerName);
                    Console.WriteLine("Attribution Network: " + Adjust.Attribution.Network);
                    Console.WriteLine("Attribution Campaign: " + Adjust.Attribution.Campaign);
                    Console.WriteLine("Attribution AdGroup: " + Adjust.Attribution.Adgroup);
                    Console.WriteLine("Attribution Creative: " + Adjust.Attribution.Creative);
                    Console.WriteLine("Attribution Click Label: " + Adjust.Attribution.ClickLabel);
                    Console.WriteLine("Attribution Adid: " + Adjust.Attribution.Adid);
                }
            };
        }