C# Class Segment.Model.Options

Datei anzeigen Open project: segmentio/Analytics.NET Class Usage Examples

Public Methods

Method Description
Options ( ) : System

Options object that allows the specification of a timestamp, an anonymousId, a context, or target integrations.

SetAnonymousId ( string anonymousId ) : Options

Sets the anonymousId of the user. This is typically a cookie session id that identifies a visitor before they have logged in.

SetContext ( Segment.Model.Context context ) : Options

Sets the context of this analytics call. Context contains information about the environment such as the app, the user agent, ip, etc ..

SetIntegration ( string integration, bool enabled ) : Options

Determines which integrations this messages goes to. new Options() .Integration("All", false) .Integration("Mixpanel", true) will send a message to only Mixpanel.

SetTimestamp ( System.DateTime timestamp ) : Options

Sets the timestamp of when an analytics call occurred. The timestamp is primarily used for historical imports or if this event happened in the past. The timestamp is not required, and if it's not provided, our servers will timestamp the call as if it just happened.

Method Details

Options() public method

Options object that allows the specification of a timestamp, an anonymousId, a context, or target integrations.
public Options ( ) : System
return System

SetAnonymousId() public method

Sets the anonymousId of the user. This is typically a cookie session id that identifies a visitor before they have logged in.
public SetAnonymousId ( string anonymousId ) : Options
anonymousId string The visitor's anonymousId.
return Options

SetContext() public method

Sets the context of this analytics call. Context contains information about the environment such as the app, the user agent, ip, etc ..
public SetContext ( Segment.Model.Context context ) : Options
context Segment.Model.Context The visitor's context.
return Options

SetIntegration() public method

Determines which integrations this messages goes to. new Options() .Integration("All", false) .Integration("Mixpanel", true) will send a message to only Mixpanel.
public SetIntegration ( string integration, bool enabled ) : Options
integration string The integration name.
enabled bool If set to true, then the integration is enabled.
return Options

SetTimestamp() public method

Sets the timestamp of when an analytics call occurred. The timestamp is primarily used for historical imports or if this event happened in the past. The timestamp is not required, and if it's not provided, our servers will timestamp the call as if it just happened.
public SetTimestamp ( System.DateTime timestamp ) : Options
timestamp System.DateTime The call's timestamp.
return Options