Skip to content

Commit 8e73b9a

Browse files
niallzatoNiall Brennan
andauthored
fix campaign data (#13)
Co-authored-by: Niall Brennan <[email protected]>
1 parent f52b073 commit 8e73b9a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Sources/SegmentAppsFlyer/AppsFlyerDestination.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,10 @@ extension AppsFlyerDestination: AppsFlyerLibDelegate {
213213
"name": campaign,
214214
"ad_group": adgroup
215215
]
216-
let campaignStr = (campaign.compactMap({ (key, value) -> String in
217-
return "\(key)=\(value)"
218-
}) as Array).joined(separator: ";")
216+
219217
let properties: [String: Codable] = [
220218
"provider": "AppsFlyer",
221-
"campaign": campaignStr
219+
"campaign": try? JSON(campaign)
222220
]
223221
analytics?.track(name: "Install Attributed", properties: properties)
224222

0 commit comments

Comments
 (0)