Esempio n. 1
0
 public void _sendAppView(AppViewHitBuilder builder)
 {
     _buildCustomMetricsDictionary(builder);
     _buildCustomDimensionsDictionary(builder);
     _buildCampaignParametersDictionary(builder);
     sendAppView(builder.GetScreenName());
 }
    internal void LogScreen(AppViewHitBuilder builder)
    {
        tracker.Call("setScreenName", builder.GetScreenName());

        AndroidJavaObject eventBuilder = new AndroidJavaObject("com.google.android.gms.analytics.HitBuilders$ScreenViewBuilder");

        object[] builtScreenView = new object[] { eventBuilder.Call <AndroidJavaObject>("build") };
        tracker.Call("send", builtScreenView);
    }
    internal void LogScreen(AppViewHitBuilder builder)
    {
        tracker.Call("setScreenName", builder.GetScreenName());

        AndroidJavaObject eventBuilder = new AndroidJavaObject("com.google.android.gms.analytics.HitBuilders$ScreenViewBuilder");

        foreach (KeyValuePair <int, string> kvp in builder.GetCustomDimensions())
        {
            eventBuilder.Call <AndroidJavaObject>("setCustomDimension", kvp.Key, kvp.Value);
        }
        foreach (KeyValuePair <int, string> kvp in builder.GetCustomMetrics())
        {
            eventBuilder.Call <AndroidJavaObject>("setCustomMetric", kvp.Key, float.Parse(kvp.Value));
        }

        object[] builtScreenView = new object[] { eventBuilder.Call <AndroidJavaObject>("build") };
        tracker.Call("send", builtScreenView);
    }
    public void LogScreen(AppViewHitBuilder builder)
    {
        trackerValues[Fields.SCREEN_NAME] = null;

        SendGaHitWithMeasurementProtocol(url
                                         + AddRequiredMPParameter(Fields.HIT_TYPE, "appview")
                                         + AddRequiredMPParameter(Fields.SCREEN_NAME, builder.GetScreenName())
                                         + AddCustomVariables(builder)
                                         + AddCampaignParameters(builder)
                                         + AddTrackerVals());

        //we are just gonna track this as a page as well for ease because GA is stupid
        SendGaHitWithMeasurementProtocol(url
                                         + AddRequiredMPParameter(Fields.HIT_TYPE, "pageview")
                                         + AddRequiredMPParameter(Fields.PAGE, builder.GetScreenName())
                                         + AddCustomVariables(builder)
                                         + AddCampaignParameters(builder)
                                         + AddTrackerVals());
    }
    internal void LogScreen(AppViewHitBuilder builder)
    {
        using (AndroidJavaObject screenName = analyticsTrackingFields.
                                              GetStatic <AndroidJavaObject>("SCREEN_NAME")) {
            object[] args = new object[] { screenName, builder.GetScreenName() };
            tracker.Call(GoogleAnalyticsV3.SET, args);
        }

        Dictionary <AndroidJavaObject, string> parameters =
            AddCustomVariablesAndCampaignParameters(builder);

        if (parameters != null)
        {
            object map = BuildMap(GoogleAnalyticsV3.APP_VIEW, parameters);
            tracker.Call(GoogleAnalyticsV3.SEND, map);
        }
        else
        {
            object[] args = new object[] { BuildMap(GoogleAnalyticsV3.APP_VIEW) };
            tracker.Call(GoogleAnalyticsV3.SEND, args);
        }
    }
    public void LogScreen(AppViewHitBuilder builder)
    {
        trackerValues[Fields.SCREEN_NAME] = null;

        SendGaHitWithMeasurementProtocol(url
                                         + AddRequiredMPParameter(Fields.HIT_TYPE, "appview")
                                         + AddRequiredMPParameter(Fields.SCREEN_NAME, builder.GetScreenName())
                                         + AddCustomVariables(builder)
                                         + AddCampaignParameters(builder)
                                         + AddTrackerVals());
    }
    public void LogScreen(AppViewHitBuilder builder)
    {
        trackerValues[Fields.SCREEN_NAME] = null;

        SendGaHitWithMeasurementProtocol(url
        + AddRequiredMPParameter(Fields.HIT_TYPE,"appview")
        + AddRequiredMPParameter(Fields.SCREEN_NAME,builder.GetScreenName())
        + AddCustomVariables(builder)
        + AddCampaignParameters(builder)
        + AddTrackerVals());
    }
 public void _sendAppView(AppViewHitBuilder builder)
 {
     _buildCustomMetricsDictionary(builder);
     _buildCustomDimensionsDictionary(builder);
     _buildCampaignParametersDictionary(builder);
     sendAppView(builder.GetScreenName());
 }
    internal void LogScreen(AppViewHitBuilder builder)
    {
        using (AndroidJavaObject screenName = analyticsTrackingFields.
        GetStatic<AndroidJavaObject>("SCREEN_NAME")) {
          object[] args = new object[] { screenName, builder.GetScreenName() };
          tracker.Call (GoogleAnalyticsV3.SET, args);
        }

        Dictionary<AndroidJavaObject, string> parameters = AddCustomVariablesAndCampaignParameters(builder);
        if (parameters != null) {
          object map = BuildMap(GoogleAnalyticsV3.APP_VIEW, parameters);
          tracker.Call(GoogleAnalyticsV3.SEND, map);
        } else {
          object[] args = new object[] { BuildMap(GoogleAnalyticsV3.APP_VIEW) };
          tracker.Call(GoogleAnalyticsV3.SEND, args);
        }
    }
    internal void LogScreen(AppViewHitBuilder builder)
    {
        tracker.Call("setScreenName", builder.GetScreenName());

        AndroidJavaObject eventBuilder = new AndroidJavaObject("com.google.android.gms.analytics.HitBuilders$ScreenViewBuilder");
        object[] builtScreenView = new object[] { eventBuilder.Call<AndroidJavaObject>("build") };
        tracker.Call("send", builtScreenView);
    }