You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Note:** Analytics-CSharp is distributed through NuGet. Check out other installation options [here](https://www.nuget.org/packages/Segment.Analytics.CSharp/){:target="_blank"}.
37
+
<br>**Note:** Analytics-CSharp is distributed through NuGet. Check out other installation options [here](https://www.nuget.org/packages/Segment.Analytics.CSharp/){:target="_blank"}.
37
38
38
39
3. Initialize and configure the client.
39
40
@@ -51,13 +52,13 @@ To get started with the Analytics-CSharp library:
51
52
Option Name | Description
52
53
----------- | -----------
53
54
`writeKey` *required* | This is your Segment write key.
54
-
`apiHost` | Default set to `api.segment.io/v1`. <br> This sets a default API Host to which Segment sends events.
55
-
`autoAddSegmentDestination` | Default set to `true`. <br> This automatically adds the Segment Destination plugin. You can set this to `false` if you want to manually add the Segment Destination plugin.
56
-
`defaultSettings` | Default set to `{}`. <br> The settings object used as fallback in case of network failure.
57
-
`flushAt` | Default set to `20`. <br> The count of events at which Segment flushes events.
58
-
`flushInterval` | Default set to `30` (seconds). <br> The interval in seconds at which Segment flushes events.
59
-
`exceptionHandler` | Set a an exception handler to handle errors happened in async methods within the analytics scope
60
-
`storageProvider` | Set how you want your data to be stored. <br> `DefaultStorageProvider` is used by default which stores data to local storage. `InMemoryStorageProvider` is also provided in the library. You can also write your own storage solution by implementing `IStorageProvider` and `IStorage`
55
+
`apiHost` | The default is set to `api.segment.io/v1`. <br> This sets a default API Host to which Segment sends events.
56
+
`autoAddSegmentDestination` | The default is set to `true`. <br> This automatically adds the Segment Destination plugin. You can set this to `false` if you want to manually add the Segment Destination plugin.
57
+
`defaultSettings` | The default is set to `{}`. <br> The settings object used as fallback in case of network failure.
58
+
`flushAt` | The default is set to `20`. <br> The count of events at which Segment flushes events.
59
+
`flushInterval` | The default is set to `30` seconds. <br> The interval in seconds at which Segment flushes events.
60
+
`exceptionHandler` | Use to set an exception handler to handle errors happened in async methods within the analytics scope.
61
+
`storageProvider` | Use to set how you want your data to be stored. <br> `DefaultStorageProvider` is used by default which stores data to local storage. `InMemoryStorageProvider` is also provided in the library. You can also write your own storage solution by implementing `IStorageProvider` and `IStorage`.
61
62
62
63
## Tracking Methods
63
64
@@ -97,7 +98,7 @@ The [Screen](/docs/connections/spec/screen/) method lets you record whenever a u
97
98
98
99
You'll want to record a screen event whenever the user opens a screen in your app. This could be a view, fragment, dialog or activity depending on your app.
99
100
100
-
Not all integrations support screen, so when it's not supported explicitly, the screen method tracks as an event with the same parameters.
101
+
Not all integrations support screen. When it's not supported explicitly, the screen method tracks as an event with the same parameters.
101
102
102
103
```c#
103
104
analytics.Screen("ScreenName", newJsonObject {
@@ -106,11 +107,11 @@ analytics.Screen("ScreenName", new JsonObject {
106
107
```
107
108
108
109
### Page
109
-
The [Page](/docs/connections/spec/page/) method lets you record whenever a user sees a page in your web app, along with optional extra information about the page being viewed.
110
+
The [Page](/docs/connections/spec/page/) method lets you record whenever a user sees a page in your web app, along with optional extra information about the page.
110
111
111
112
You'll want to record a page event whenever the user opens a page in your app. This could be a webpage, view, fragment, dialog or activity depending on your app.
112
113
113
-
Not all integrations support page, so when it's not supported explicitly, the page method tracks as an event with the same parameters.
114
+
Not all integrations support page. When it's not supported explicitly, the page method tracks as an event with the same parameters.
114
115
115
116
```c#
116
117
analytics.Page("PageName", newJsonObject {
@@ -119,7 +120,7 @@ analytics.Page("PageName", new JsonObject {
119
120
```
120
121
121
122
### Group
122
-
The [Group](/docs/connections/spec/group/) method lets you associate an individual user with a group— whether it's a company, organization, account, project, or team. This includes a unique group identifier and any additional group traits you may have, like company name, industry, number of employees. You can include any information you want to associate with the group in the traits option. When using any of the reserved group traits, be sure the information reflects the name of the trait. For example, email should always be a string of the user's email address.
123
+
The [Group](/docs/connections/spec/group/) method lets you associate an individual user with a group— whether it's a company, organization, account, project, or team. This includes a unique group identifier and any additional group traits you may have, like company name, industry, number of employees. You can include any information you want to associate with the group in the traits option. When using any of the reserved group traits, be sure the information reflects the name of the trait. For example, email should always be a string of the user's email address.
123
124
124
125
```c#
125
126
analytics.Group("user-123", newJsonObject {
@@ -213,9 +214,9 @@ class AmplitudePlugin : DestinationPlugin
213
214
214
215
### Advanced concepts
215
216
216
-
-`configure(Analytics)`: Use this function to setup your plugin. This implicitly calls once the plugin registers.
217
+
-`configure(Analytics)`: Use this function to set up your plugin. This implicitly calls once the plugin registers.
217
218
-`update(Settings)`: Use this function to react to any settings updates. This implicitly calls when settings update. You can force a settings update by calling `analytics.checkSettings()`.
218
-
-`DestinationPlugin` timeline: The destination plugin contains an internal timeline that follows the same process as the analytics timeline, enabling you to modify/augment how events reach the particular destination. For example if you only wanted to add a context key when sending an event to `Amplitude`:
219
+
-`DestinationPlugin` timeline: The destination plugin contains an internal timeline that follows the same process as the analytics timeline, enabling you to modify/augment how events reach the particular destination. For example, if you only wanted to add a context key when sending an event to `Amplitude`:
0 commit comments