Пример #1
0
 private void logAdjustSignupEvent()
 {
     #if USE_ANALYTICS
     var adjustEvent = ADJEvent.EventWithEventToken(adjustSignupEventToken);
     Adjust.TrackEvent(adjustEvent);
     #endif
 }
Пример #2
0
        partial void BtnTrackRevenueEvent_TouchUpInside(UIButton sender)
        {
            var adjustEvent = ADJEvent.EventWithEventToken("a4fd35");

            adjustEvent.SetRevenue(0.01, "EUR");

            Adjust.TrackEvent(adjustEvent);
        }
Пример #3
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);
        }
Пример #4
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);
        }
Пример #5
0
        partial void BtnTrackSimpleEvent_TouchUpInside(UIButton sender)
        {
            var adjustEvent = ADJEvent.EventWithEventToken("g3mfiw");

            Adjust.TrackEvent(adjustEvent);
        }
Пример #6
0
        private void Event()
        {
            var eventNumber = 0;

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

            ADJEvent adjustEvent = null;

            if (_savedEvents.ContainsKey(eventNumber))
            {
                adjustEvent = _savedEvents[eventNumber];
            }
            else
            {
                var eventToken = Command.GetFirstParameterValue("eventToken");
                adjustEvent = ADJEvent.EventWithEventToken(eventToken);
                _savedEvents.Add(eventNumber, adjustEvent);
            }

            if (Command.ContainsParameter("revenue"))
            {
                var revenueParams = Command.Parameters["revenue"];
                var currency      = revenueParams[0];
                var revenue       = double.Parse(revenueParams[1]);
                adjustEvent.SetRevenue(revenue, currency);
            }

            if (Command.ContainsParameter("callbackParams"))
            {
                var callbackParams = Command.Parameters["callbackParams"];
                for (var i = 0; i < callbackParams.Count; i = i + 2)
                {
                    var key   = callbackParams[i];
                    var value = callbackParams[i + 1];
                    adjustEvent.AddCallbackParameter(key, value);
                }
            }

            if (Command.ContainsParameter("partnerParams"))
            {
                var partnerParams = Command.Parameters["partnerParams"];
                for (var i = 0; i < partnerParams.Count; i = i + 2)
                {
                    var key   = partnerParams[i];
                    var value = partnerParams[i + 1];
                    adjustEvent.AddPartnerParameter(key, value);
                }
            }

            if (Command.ContainsParameter("orderId"))
            {
                var purchaseId = Command.GetFirstParameterValue("orderId");
                adjustEvent.SetTransactionId(purchaseId);
            }

            if (Command.ContainsParameter("callbackId"))
            {
                var callbackId = Command.GetFirstParameterValue("callbackId");
                adjustEvent.SetCallbackId(callbackId);
            }
        }