コード例 #1
0
 public void _sendTiming(TimingHitBuilder builder)
 {
     _buildCustomMetricsDictionary(builder);
     _buildCustomDimensionsDictionary(builder);
     _buildCampaignParametersDictionary(builder);
     sendTiming(builder.GetTimingCategory(), builder.GetTimingInterval(), builder.GetTimingName(), builder.GetTimingLabel());
 }
コード例 #2
0
    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);
    }
コード例 #3
0
    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());
    }
コード例 #4
0
 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);
     }
 }
コード例 #5
0
    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());
    }
コード例 #6
0
 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)
 {
     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);
     }
 }