C# Class Dinheiro.GoogleAnalytics.GoogleAnalytics

Inheritance: IGoogleAnalytics
ファイルを表示 Open project: davidduffett/Dinheiro

Public Properties

Property Type Description
Account string
EnableDisplayFeatures bool
StateStorage IStateStorage
TrackingType GoogleAnalyticsTrackingType

Private Properties

Property Type Description

Public Methods

Method Description
AddItem ( string sku, string name, decimal price, int quantity, object orderId = null, string category = null ) : void
AddTransaction ( object orderId, decimal total, decimal tax = null, decimal shipping = null, string affiliation = null, string city = null, string state = null, string country = null ) : void
Render ( ) : IHtmlString

Renders the required JavaScript onto the page for Google Analytics tracking. Recommended to include this within the head element of the page.

Reset ( ) : void

Clears the current GoogleAnalytics state.

SetCurrency ( string currencyCode ) : void
TrackEvent ( string category, string action, string label = null, int value = null, bool nonInteraction = false ) : void
TrackSocial ( string network, string socialAction, string target = null, string pagePath = null ) : void

Method Details

AddItem() public method

public AddItem ( string sku, string name, decimal price, int quantity, object orderId = null, string category = null ) : void
sku string
name string
price decimal
quantity int
orderId object
category string
return void

AddTransaction() public method

public AddTransaction ( object orderId, decimal total, decimal tax = null, decimal shipping = null, string affiliation = null, string city = null, string state = null, string country = null ) : void
orderId object
total decimal
tax decimal
shipping decimal
affiliation string
city string
state string
country string
return void

Render() public static method

Renders the required JavaScript onto the page for Google Analytics tracking. Recommended to include this within the head element of the page.
public static Render ( ) : IHtmlString
return IHtmlString

Reset() public static method

Clears the current GoogleAnalytics state.
public static Reset ( ) : void
return void

SetCurrency() public method

public SetCurrency ( string currencyCode ) : void
currencyCode string
return void

TrackEvent() public method

public TrackEvent ( string category, string action, string label = null, int value = null, bool nonInteraction = false ) : void
category string
action string
label string
value int
nonInteraction bool
return void

TrackSocial() public method

public TrackSocial ( string network, string socialAction, string target = null, string pagePath = null ) : void
network string
socialAction string
target string
pagePath string
return void

Property Details

Account public_oe static_oe property

Your Google Analytics account, or web property ID.
public static string Account
return string

EnableDisplayFeatures public_oe static_oe property

Enable/disable the Google Analytics Display Features plugin. See https://developers.google.com/analytics/devguides/collection/analyticsjs/display-features for more information.
public static bool EnableDisplayFeatures
return bool

StateStorage public_oe static_oe property

public static IStateStorage StateStorage
return IStateStorage

TrackingType public_oe static_oe property

Set to whichever type of Google Analytics your profile is setup as. This determines how the scripts for web tracking are rendered.
public static GoogleAnalyticsTrackingType TrackingType
return GoogleAnalyticsTrackingType