Beispiel #1
0
 public void _sendSocial(SocialHitBuilder builder)
 {
     _buildCustomMetricsDictionary(builder);
     _buildCustomDimensionsDictionary(builder);
     _buildCampaignParametersDictionary(builder);
     sendSocial(builder.GetSocialNetwork(), builder.GetSocialAction(), builder.GetSocialTarget());
 }
Beispiel #2
0
    public void LogSocial(string socialNetwork, string socialAction, string socialTarget)
    {
        SocialHitBuilder builder = new SocialHitBuilder()
                                   .SetSocialNetwork(socialNetwork)
                                   .SetSocialAction(socialAction)
                                   .SetSocialTarget(socialTarget);

        LogSocial(builder);
    }
    public void LogSocial(SocialHitBuilder builder)
    {
        AndroidJavaObject socialBuilder = new AndroidJavaObject("com.google.android.gms.analytics.HitBuilders$SocialBuilder");

        socialBuilder.Call <AndroidJavaObject>("setAction", new object[] { builder.GetSocialAction() });
        socialBuilder.Call <AndroidJavaObject>("setNetwork", new object[] { builder.GetSocialNetwork() });
        socialBuilder.Call <AndroidJavaObject>("setTarget", new object[] { builder.GetSocialTarget() });

        object[] builtSocial = new object[] { socialBuilder.Call <AndroidJavaObject>("build") };
        tracker.Call("send", builtSocial);
    }
 public void LogSocial(SocialHitBuilder builder)
 {
     InitializeTracker();
     if (builder.Validate() != null)
     {
         if (belowThreshold(logLevel, DebugMode.VERBOSE))
         {
             UnityEngine.Debug.Log("Logging social.");
         }
         androidTracker.LogSocial(builder);
     }
 }
Beispiel #5
0
 public void LogSocial(SocialHitBuilder builder)
 {
     if (builder.Validate() == null)
     {
         return;
     }
     if (GoogleAnalyticsV4.belowThreshold(logLevel, GoogleAnalyticsV4.DebugMode.VERBOSE))
     {
         Debug.Log("Logging social.");
     }
     mpTracker.LogSocial(builder);
 }
    public void LogSocial(SocialHitBuilder builder)
    {
        trackerValues[Fields.SOCIAL_NETWORK] = null;
        trackerValues[Fields.SOCIAL_ACTION]  = null;
        trackerValues[Fields.SOCIAL_TARGET]  = null;

        SendGaHitWithMeasurementProtocol(url
                                         + AddRequiredMPParameter(Fields.HIT_TYPE, "social")
                                         + AddRequiredMPParameter(Fields.SOCIAL_NETWORK, builder.GetSocialNetwork())
                                         + AddRequiredMPParameter(Fields.SOCIAL_ACTION, builder.GetSocialAction())
                                         + AddRequiredMPParameter(Fields.SOCIAL_TARGET, builder.GetSocialTarget())
                                         + AddCustomVariables(builder)
                                         + AddCampaignParameters(builder)
                                         + AddTrackerVals());
    }
Beispiel #7
0
    public void LogSocial(SocialHitBuilder builder)
    {
        InitializeTracker();
        if (builder.Validate() == null)
        {
            return;
        }

        if (belowThreshold(logLevel, DebugMode.VERBOSE))
        {
            Debug.Log("Logging social.");
        }

        mpTracker.LogSocial(builder);
    }
    public void LogSocial(SocialHitBuilder builder)
    {
        InitializeTracker();
        if (builder.Validate() == null)
        {
            return;
        }
        if (GoogleAnalyticsV4.belowThreshold(logLevel, GoogleAnalyticsV4.DebugMode.VERBOSE))
        {
            Debug.Log("Logging social.");
        }
#if UNITY_ANDROID && !UNITY_EDITOR
        androidTracker.LogSocial(builder);
#elif UNITY_IPHONE && !UNITY_EDITOR
        iosTracker.LogSocial(builder);
#else
        mpTracker.LogSocial(builder);
#endif
    }
    public void LogSocial(SocialHitBuilder builder)
    {
        object[] args = new object[3];
        args[0] = builder.GetSocialNetwork();
        args[1] = builder.GetSocialAction();
        args[2] = builder.GetSocialTarget();

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

        if (parameters != null)
        {
            map = BuildMap(GoogleAnalyticsV3.SOCIAL_HIT, args, parameters);
        }
        else
        {
            map = BuildMap(GoogleAnalyticsV3.SOCIAL_HIT, args);
        }
        tracker.Call(GoogleAnalyticsV3.SEND, map);
    }
Beispiel #10
0
 public void LogSocial(SocialHitBuilder builder)
 {
     //AndroidJavaObject androidJavaObject = new AndroidJavaObject("com.google.android.gms.analytics.HitBuilders$SocialBuilder");
     //androidJavaObject.Call<AndroidJavaObject>("setAction", new object[1]
     //{
     //	builder.GetSocialAction()
     //});
     //androidJavaObject.Call<AndroidJavaObject>("setNetwork", new object[1]
     //{
     //	builder.GetSocialNetwork()
     //});
     //androidJavaObject.Call<AndroidJavaObject>("setTarget", new object[1]
     //{
     //	builder.GetSocialTarget()
     //});
     //object[] args = new object[1]
     //{
     //	androidJavaObject.Call<AndroidJavaObject>("build", new object[0])
     //};
     //tracker.Call("send", args);
 }
Beispiel #11
0
    private void LogSocial()
    {
        // Build the event
        SocialHitBuilder socialHitBuilder = new SocialHitBuilder();

        if (!string.IsNullOrEmpty(this.SocialNetwork))
        {
            socialHitBuilder.SetSocialNetwork(this.SocialNetwork);
        }

        if (!string.IsNullOrEmpty(this.SocialAction))
        {
            socialHitBuilder.SetSocialAction(this.SocialAction);
        }

        if (!string.IsNullOrEmpty(this.SocialTarget))
        {
            socialHitBuilder.SetSocialTarget(this.SocialTarget);
        }

        // Now log it
        GoogleAnalyticsV3.instance.LogSocial(socialHitBuilder);
    }
 public void LogSocial(SocialHitBuilder builder)
 {
     InitializeTracker();
     if (builder.Validate() == null) {
       return;
     }
     if (GoogleAnalyticsV3.belowThreshold(logLevel, GoogleAnalyticsV3.DebugMode.VERBOSE)) {
       Debug.Log("Logging social.");
     }
     #if UNITY_ANDROID && !UNITY_EDITOR
     androidTracker.LogSocial(builder);
     #elif UNITY_IPHONE && !UNITY_EDITOR
     iosTracker.LogSocial(builder);
     #else
     mpTracker.LogSocial(builder);
     #endif
 }
    public void LogSocial(string socialNetwork, string socialAction,
      string socialTarget)
    {
        SocialHitBuilder builder = new SocialHitBuilder()
        .SetSocialNetwork(socialNetwork)
        .SetSocialAction(socialAction)
        .SetSocialTarget(socialTarget);

        LogSocial(builder);
    }
    public void LogSocial(SocialHitBuilder builder)
    {
        object[] args = new object[3];
        args[0] = builder.GetSocialNetwork();
        args[1] = builder.GetSocialAction();
        args[2] = builder.GetSocialTarget();

        object map;
        Dictionary<AndroidJavaObject, string> parameters = AddCustomVariablesAndCampaignParameters(builder);
        if (parameters != null) {
          map = BuildMap(GoogleAnalyticsV3.SOCIAL_HIT, args, parameters);
        } else {
          map = BuildMap(GoogleAnalyticsV3.SOCIAL_HIT, args);
        }
        tracker.Call(GoogleAnalyticsV3.SEND, map);
    }
 public void _sendSocial(SocialHitBuilder builder)
 {
     _buildCustomMetricsDictionary(builder);
     _buildCustomDimensionsDictionary(builder);
     _buildCampaignParametersDictionary(builder);
     sendSocial(builder.GetSocialNetwork(), builder.GetSocialAction(), builder.GetSocialTarget());
 }
 public void LogSocial(SocialHitBuilder builder)
 {
 }
 public void LogSocial(SocialHitBuilder builder)
 {
     handler._sendSocial(builder);
 }
 public void LogSocial(SocialHitBuilder builder)
 {
 }
 public void LogSocial(SocialHitBuilder builder)
 {
     handler._sendSocial(builder);
 }
    public void LogSocial(SocialHitBuilder builder)
    {
        trackerValues[Fields.SOCIAL_NETWORK] = null;
        trackerValues[Fields.SOCIAL_ACTION] = null;
        trackerValues[Fields.SOCIAL_TARGET] = null;

        SendGaHitWithMeasurementProtocol(url
        + AddRequiredMPParameter(Fields.HIT_TYPE,"social")
        + AddRequiredMPParameter(Fields.SOCIAL_NETWORK,builder.GetSocialNetwork())
        + AddRequiredMPParameter(Fields.SOCIAL_ACTION,builder.GetSocialAction())
        + AddRequiredMPParameter(Fields.SOCIAL_TARGET,builder.GetSocialTarget())
        + AddCustomVariables(builder)
        + AddCampaignParameters(builder)
        + AddTrackerVals());
    }