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
Display the source diff
Display the rich diff
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
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ If you’re currently using Analytics.NET or Analytics.Xamarin to send data to S
8
8
You can update to Analytics-CSharp in 3 easy steps
9
9
1. Bundle Analytics-CSharp into your app (and remove your previous SDK)
10
10
2. Change the namespaces
11
-
3.Advanced: Run Analytics in Synchronous Mode
11
+
3.(Optional) Use `Reset` to stay anonymous
12
12
13
13
14
14
## Start the Migration
@@ -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
50
-
51
-
1. Change your development settings if you would like to make analytics run synchronously for testing purposes.
49
+
3. (Optional) Update calls that resets anonymous ID.
50
+
51
+
The old SDK requires you to provide anouymous ID. In the newSDK, it generates an Anonymous IDfor you if you never call `analytics.Identify`. If you've called `Identify` and want to go back to anonymous, the new SDK provides a `Reset` function to acheive that.
52
52
53
53
<br> Before:
54
54
```c#
55
-
Analytics.Initialize("YOUR_WRITE_KEY", new Config().SetAsync(false));
55
+
Analytics.Client.Page(null, "Login", new Properties(), new Options()
56
+
.SetAnonymousId("some-id"));
56
57
```
57
58
58
59
<br> After:
59
60
```c#
60
-
var configuration = new Configuration("YOUR WRITE KEY",
61
-
useSynchronizeDispatcher: true);
62
-
var analytics = new Analytics(configuration);
61
+
analytics.Reset();
63
62
```
64
63
65
-
2. Review your anonymous ID settings.
64
+
## Optional Changes for Unit Tests
65
+
66
+
1. Change your development settings if you would like to make analytics run synchronously for testing purposes.
66
67
67
68
<br> Before:
68
69
```c#
69
-
Analytics.Client.Page(null, "Login", new Properties(), new Options()
70
-
.SetAnonymousId("some-id"));
70
+
Analytics.Initialize("YOUR_WRITE_KEY", new Config().SetAsync(false));
71
71
```
72
72
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:
74
-
75
73
<br> After:
76
74
```c#
77
-
analytics.Reset();
75
+
var configuration = new Configuration("YOUR WRITE KEY",
0 commit comments