public void _sendTiming(TimingHitBuilder builder) { _buildCustomMetricsDictionary(builder); _buildCustomDimensionsDictionary(builder); _buildCampaignParametersDictionary(builder); sendTiming(builder.GetTimingCategory(), builder.GetTimingInterval(), builder.GetTimingName(), builder.GetTimingLabel()); }
public void LogTiming(TimingHitBuilder builder) { AndroidJavaObject timingBuilder = new AndroidJavaObject("com.google.android.gms.analytics.HitBuilders$TimingBuilder"); timingBuilder.Call <AndroidJavaObject>("setCategory", new object[] { builder.GetTimingCategory() }); timingBuilder.Call <AndroidJavaObject>("setLabel", new object[] { builder.GetTimingLabel() }); timingBuilder.Call <AndroidJavaObject>("setValue", new object[] { builder.GetTimingInterval() }); timingBuilder.Call <AndroidJavaObject>("setVariable", new object[] { builder.GetTimingName() }); object[] builtTiming = new object[] { timingBuilder.Call <AndroidJavaObject>("build") }; tracker.Call("send", builtTiming); }
public void LogTiming(TimingHitBuilder builder) { trackerValues[Fields.TIMING_CATEGORY] = null; trackerValues[Fields.TIMING_VALUE] = null; trackerValues[Fields.TIMING_LABEL] = null; trackerValues[Fields.TIMING_VAR] = null; SendGaHitWithMeasurementProtocol(url + AddRequiredMPParameter(Fields.HIT_TYPE, "timing") + AddOptionalMPParameter(Fields.TIMING_CATEGORY, builder.GetTimingCategory()) + AddOptionalMPParameter(Fields.TIMING_VALUE, builder.GetTimingInterval()) + AddOptionalMPParameter(Fields.TIMING_LABEL, builder.GetTimingLabel()) + AddOptionalMPParameter(Fields.TIMING_VAR, builder.GetTimingName()) + AddCustomVariables(builder) + AddCampaignParameters(builder) + AddTrackerVals()); }
public void LogTiming(TimingHitBuilder builder) { using (AndroidJavaObject valueObj = new AndroidJavaObject("java.lang.Long", builder.GetTimingInterval())) { object[] args = new object[4]; args[0] = builder.GetTimingCategory(); args[1] = valueObj; args[2] = builder.GetTimingName(); args[3] = builder.GetTimingLabel(); object map; Dictionary <AndroidJavaObject, string> parameters = AddCustomVariablesAndCampaignParameters(builder); if (parameters != null) { map = BuildMap(GoogleAnalyticsV3.TIMING_HIT, args, parameters); } else { map = BuildMap(GoogleAnalyticsV3.TIMING_HIT, args); } tracker.Call(GoogleAnalyticsV3.SEND, map); } }
public void LogTiming(TimingHitBuilder builder) { trackerValues[Fields.TIMING_CATEGORY] = null; trackerValues[Fields.TIMING_VALUE] = null; trackerValues[Fields.TIMING_LABEL] = null; trackerValues[Fields.TIMING_VAR] = null; SendGaHitWithMeasurementProtocol(url + AddRequiredMPParameter(Fields.HIT_TYPE,"timing") + AddOptionalMPParameter(Fields.TIMING_CATEGORY,builder.GetTimingCategory()) + AddOptionalMPParameter(Fields.TIMING_VALUE,builder.GetTimingInterval()) + AddOptionalMPParameter(Fields.TIMING_LABEL,builder.GetTimingLabel()) + AddOptionalMPParameter(Fields.TIMING_VAR,builder.GetTimingName()) + AddCustomVariables(builder) + AddCampaignParameters(builder) + AddTrackerVals()); }
public void LogTiming(TimingHitBuilder builder) { using (AndroidJavaObject valueObj = new AndroidJavaObject("java.lang.Long", builder.GetTimingInterval())) { object[] args = new object[4]; args[0] = builder.GetTimingCategory(); args[1] = valueObj; args[2] = builder.GetTimingName(); args[3] = builder.GetTimingLabel(); object map; Dictionary<AndroidJavaObject, string> parameters = AddCustomVariablesAndCampaignParameters(builder); if (parameters != null) { map = BuildMap(GoogleAnalyticsV3.TIMING_HIT, args, parameters); } else { map = BuildMap(GoogleAnalyticsV3.TIMING_HIT, args); } tracker.Call(GoogleAnalyticsV3.SEND, map); } }