Skip to content

Commit

Permalink
add IDFA to segment userProperties and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
scottkicks committed Mar 9, 2023
1 parent 7b8d66d commit a96c6bf
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions Library/Tracking/KSRAnalytics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1614,6 +1614,7 @@ private func userProperties(for user: User?, _ prefix: String = "user_") -> [Str
props["uid"] = "\(user.id)"
props["watched_projects_count"] = user.stats.starredProjectsCount
props["facebook_connected"] = user.facebookConnected
props["advertising_identifier"] = AppEnvironment.current.appTrackingTransparency.advertisingIdentifier

return props.prefixedKeys(prefix)
}
Expand Down
3 changes: 2 additions & 1 deletion Library/ViewModels/PledgePaymentMethodsViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,8 @@ public final class PledgePaymentMethodsViewModel: PledgePaymentMethodsViewModelT
let (project, _) = projectSignal

guard featureFacebookConversionsAPIEnabled(), project.sendMetaCapiEvents == true,
let externalId = AppEnvironment.current.appTrackingTransparency.advertisingIdentifier() else { return }
let externalId = AppEnvironment.current.appTrackingTransparency.advertisingIdentifier()
else { return }

_ = AppEnvironment
.current
Expand Down
3 changes: 2 additions & 1 deletion Library/ViewModels/ProjectPageViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ public final class ProjectPageViewModel: ProjectPageViewModelType, ProjectPageVi
let (project, _) = projectAndRefTag

guard featureFacebookConversionsAPIEnabled(), project.sendMetaCapiEvents,
let externalId = AppEnvironment.current.appTrackingTransparency.advertisingIdentifier() else { return }
let externalId = AppEnvironment.current.appTrackingTransparency.advertisingIdentifier()
else { return }

_ = AppEnvironment
.current
Expand Down
3 changes: 2 additions & 1 deletion Library/ViewModels/RewardsCollectionViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ public final class RewardsCollectionViewModel: RewardsCollectionViewModelType,
let (project, _) = projectAndRefTag

guard featureFacebookConversionsAPIEnabled(), project.sendMetaCapiEvents,
let externalId = AppEnvironment.current.appTrackingTransparency.advertisingIdentifier() else { return }
let externalId = AppEnvironment.current.appTrackingTransparency.advertisingIdentifier()
else { return }

_ = AppEnvironment
.current
Expand Down
3 changes: 2 additions & 1 deletion Library/ViewModels/ThanksViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ public final class ThanksViewModel: ThanksViewModelType, ThanksViewModelInputs,
}

guard featureFacebookConversionsAPIEnabled(), project.sendMetaCapiEvents,
let externalId = AppEnvironment.current.appTrackingTransparency.advertisingIdentifier() else { return }
let externalId = AppEnvironment.current.appTrackingTransparency.advertisingIdentifier()
else { return }

_ = AppEnvironment
.current
Expand Down

0 comments on commit a96c6bf

Please sign in to comment.