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
Copy file name to clipboardExpand all lines: src/connections/sources/catalog/libraries/server/csharp/index.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ These platforms support Analytics-CSharp:
27
27
## Getting started
28
28
29
29
> info ""
30
-
> If you'd like to migrate to Analytics-CSharp from a different library, follow the steps in the [Analytics-CSharp migration guide](/docs/connections/sources/catalog/libraries/server/csharp/migration-guide/).
30
+
> If you'd like to migrate to Analytics-CSharp from Analytics.NET or Analytics.Xamarin, follow the steps in the [Analytics-CSharp migration guide](/docs/connections/sources/catalog/libraries/server/csharp/migration-guide/).
Copy file name to clipboardExpand all lines: src/connections/sources/catalog/libraries/server/csharp/migration-guide.md
+29-29Lines changed: 29 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -5,13 +5,13 @@ strat: csharp
5
5
6
6
If you’re currently using Analytics.NET or Analytics.Xamarin to send data to Segment, please follow the steps below to migrate to the [Analytics-CSharp library](/docs/connections/sources/catalog/libraries/server/csharp/).
7
7
8
-
You can update to Analytics-CSharp in 3 easy steps
9
-
1. Bundle Analytics-CSharp into your app (and remove your previous SDK)
10
-
2. Change the namespaces
11
-
3.Advanced: Run Analytics in Synchronous Mode
8
+
You can update to Analytics-CSharp in 3 steps:
9
+
1. Bundle Analytics-CSharp into your app and remove your previous SDK.
10
+
2. Change the namespaces.
11
+
3.*(Optional)* Use `Reset` to stay anonymous.
12
12
13
13
14
-
## Start the Migration
14
+
## Migration steps
15
15
16
16
1. Add the Analytics-CSharp dependency to your project.
17
17
@@ -46,33 +46,33 @@ You can update to Analytics-CSharp in 3 easy steps
46
46
using Segment.Analytics.Compat;
47
47
```
48
48
49
-
## Optional Changes
49
+
3.*(Optional)* Update calls that resets the anonymous ID.
50
+
51
+
The old SDK requires you to provide the anonymous ID. ThenewSDK generates an Anonymous IDfor you if you never call `analytics.Identify`. If you call `Identify` and want to go back to anonymous, the newSDK provides a `Reset`function to achieve that.
50
52
51
-
1. Change your development settings if you would like to make analytics run synchronously for testing purposes.
52
-
53
-
<br> Before:
54
-
```c#
55
-
Analytics.Initialize("YOUR_WRITE_KEY", new Config().SetAsync(false));
var configuration = new Configuration("YOUR WRITE KEY",
61
-
useSynchronizeDispatcher: true);
62
-
var analytics = new Analytics(configuration);
63
-
```
59
+
<br> After:
60
+
```c#
61
+
analytics.Reset();
62
+
```
64
63
65
-
2. Review your anonymous ID settings.
64
+
## Optional changes for unit tests
66
65
67
-
<br> Before:
68
-
```c#
69
-
Analytics.Client.Page(null, "Login", new Properties(), new Options()
70
-
.SetAnonymousId("some-id"));
71
-
```
66
+
Change your development settings if you would like to make analytics run synchronously for testing purposes.
72
67
73
-
The newSDK by default, generates an Anonymous IDfor you if you never call `analytics.Identify`. If you've called `Identify` and want to go back to anonymous, try:
68
+
<br> Before:
69
+
```c#
70
+
Analytics.Initialize("YOUR_WRITE_KEY", new Config().SetAsync(false));
71
+
```
74
72
75
-
<br> After:
76
-
```c#
77
-
analytics.Reset();
78
-
```
73
+
<br> After:
74
+
```c#
75
+
var configuration = new Configuration("YOUR WRITE KEY",
0 commit comments