addEventLabel() public method

public addEventLabel ( string text ) : void
text string
return void
示例#1
0
    // Customized event helper method for non-interactive system info events.
    // This is almost the same as GoogleUniversalAnalytics.sendEventHit,
    // but the events are flagged as "non-interactive".
    public void sendSystemInfoEvent(string eventCategory, string eventAction, string eventLabel = null, int eventValue = -1)
    {
        if (gua.analyticsDisabled)
        {
            return;
        }

        gua.beginHit(GoogleUniversalAnalytics.HitType.Event);
        gua.addEventCategory(eventCategory);
        gua.addEventAction(eventAction);
        if (eventLabel != null)
        {
            gua.addEventLabel(eventLabel);
        }
        if (eventValue >= 0)
        {
            gua.addEventValue(eventValue);
        }
        gua.addNonInteractionHit();
        gua.sendHit();
    }