C# 클래스 GoogleAnalyticsUtils.AnalyticsReporter

Client for the the Google Analytics Measurement Protocol service, which makes HTTP requests to publish data to a Google Analytics account

상속: IAnalyticsReporter
파일 보기 프로젝트 열기: GoogleCloudPlatform/google-cloud-visualstudio 1 사용 예제들

공개 메소드들

메소드 설명
AnalyticsReporter ( string propertyId, string appName, string clientId = null, string appVersion = null, bool debug = false, string userAgent = null, IHitSender sender = null ) : System

Initializes the instance.

ReportEndSession ( ) : void

Reports that the session is ending.

ReportEvent ( string category, string action, string label = null, int value = null ) : void

Convenience method to report a single event to Google Analytics.

ReportPageView ( string page, string title, string host, string>.Dictionary customDimensions = null ) : void

Reports a page view hit to analytics.

ReportScreen ( string name ) : void

Reports a window view.

ReportStartSession ( ) : void

Reports that the session is starting.

비공개 메소드들

메소드 설명
GetCustomDimension ( int index ) : string
MakeBaseHitData ( ) : string>.Dictionary

Constructs the dictionary with the common parameters that all requests must have.

메소드 상세

AnalyticsReporter() 공개 메소드

Initializes the instance.
public AnalyticsReporter ( string propertyId, string appName, string clientId = null, string appVersion = null, bool debug = false, string userAgent = null, IHitSender sender = null ) : System
propertyId string The property ID to use, string with the format US-XXXX. Must not be null.
appName string The name of the app for which this reporter is reporting. Must not be null.
clientId string The client id to use when reporting, if null a new random Guid will be generated.
appVersion string Optional, the app version. Defaults to null.
debug bool Optional, whether this reporter is in debug mode. Defaults to false.
userAgent string Optiona, the user agent to use for all HTTP requests.
sender IHitSender The instance of to use to send the this.
리턴 System

ReportEndSession() 공개 메소드

Reports that the session is ending.
public ReportEndSession ( ) : void
리턴 void

ReportEvent() 공개 메소드

Convenience method to report a single event to Google Analytics.
public ReportEvent ( string category, string action, string label = null, int value = null ) : void
category string The category for the event.
action string The action that took place.
label string The label affected by the event.
value int The new value.
리턴 void

ReportPageView() 공개 메소드

Reports a page view hit to analytics.
public ReportPageView ( string page, string title, string host, string>.Dictionary customDimensions = null ) : void
page string The URL to the page.
title string The page title.
host string The page host name.
customDimensions string>.Dictionary Custom dimensions to add to the hit.
리턴 void

ReportScreen() 공개 메소드

Reports a window view.
public ReportScreen ( string name ) : void
name string The name of the window. Must not be null.
리턴 void

ReportStartSession() 공개 메소드

Reports that the session is starting.
public ReportStartSession ( ) : void
리턴 void