Skip to content

Commit 3f56e3e

Browse files
authored
chore: update adjust sdk (#128)
1 parent 1fb1570 commit 3f56e3e

File tree

3 files changed

+17
-20
lines changed

3 files changed

+17
-20
lines changed

packages/plugins/plugin_adjust/lib/plugin_adjust.dart

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -57,32 +57,19 @@ class AdjustDestination extends DestinationPlugin {
5757
hasRegisteredCallback = true;
5858
}
5959

60-
final bufferingEnabled = adjustSettings!.setEventBufferingEnabled;
61-
if (bufferingEnabled == true) {
62-
adjustConfig.eventBufferingEnabled = bufferingEnabled;
63-
}
64-
65-
final useDelay = adjustSettings!.setDelay;
66-
if (useDelay == true) {
67-
final delayTime = adjustSettings!.delayTime;
68-
if (delayTime != null) {
69-
adjustConfig.delayStart = delayTime.toDouble();
70-
}
71-
}
72-
73-
Adjust.start(adjustConfig);
60+
Adjust.initSdk(adjustConfig);
7461
}
7562

7663
@override
7764
identify(event) async {
7865
final userId = event.userId;
7966
if (userId != null && userId.isNotEmpty) {
80-
Adjust.addSessionPartnerParameter('user_id', userId);
67+
Adjust.addGlobalPartnerParameter('user_id', userId);
8168
}
8269

8370
final anonId = event.anonymousId;
8471
if (anonId != null && anonId.isNotEmpty) {
85-
Adjust.addSessionPartnerParameter('anonymous_id', anonId);
72+
Adjust.addGlobalPartnerParameter('anonymous_id', anonId);
8673
}
8774
return event;
8875
}
@@ -91,7 +78,7 @@ class AdjustDestination extends DestinationPlugin {
9178
track(event) async {
9279
final anonId = event.anonymousId;
9380
if (anonId != null && anonId.isNotEmpty) {
94-
Adjust.addSessionPartnerParameter('anonymous_id', anonId);
81+
Adjust.addGlobalPartnerParameter('anonymous_id', anonId);
9582
}
9683

9784
if (adjustSettings == null) {
@@ -129,6 +116,6 @@ class AdjustDestination extends DestinationPlugin {
129116

130117
@override
131118
reset() {
132-
Adjust.resetSessionPartnerParameters();
119+
Adjust.removeGlobalPartnerParameters();
133120
}
134121
}

packages/plugins/plugin_adjust/lib/types.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,18 @@ class AdjustSettings {
66
final bool disabled;
77
final String appToken;
88
final bool? setEnvironmentProduction;
9+
@Deprecated("""
10+
this setting has been removed in the adjust sdk
11+
it will be removed in the next version of the plugin
12+
and has currently no effect
13+
""")
914
final bool? setEventBufferingEnabled;
1015
final bool? trackAttributionData;
16+
@Deprecated("""
17+
this setting has been removed in the adjust sdk
18+
it will be removed in the next version of the plugin
19+
and has currently no effect
20+
""")
1121
final bool? setDelay;
1222
final Map<String, String>? customEvents;
1323
final int? delayTime;

packages/plugins/plugin_adjust/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: segment_analytics_plugin_adjust
22
description: The hassle-free way to add Segment analytics to your Flutter app.
3-
version: 1.0.1
3+
version: 1.0.2
44
homepage: https://github.com/segmentio/analytics_flutter#readme
55
repository: https://github.com/segmentio/analytics_flutter/tree/main/packages/plugins/plugin_adjust#readme
66
issue_tracker: https://github.com/segmentio/analytics_flutter/issues
@@ -14,7 +14,7 @@ dependencies:
1414
sdk: flutter
1515
segment_analytics: ^1.1.1
1616
json_annotation: ^4.9.0
17-
adjust_sdk: ^4.38.2
17+
adjust_sdk: ^5.0.2
1818

1919
dev_dependencies:
2020
build_runner: ^2.4.7

0 commit comments

Comments
 (0)