Skip to content

Commit 79b69bc

Browse files
committed
updatePeople
1 parent 37acbbe commit 79b69bc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Sources/MixpanelInstance.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ open class MixpanelInstance: CustomDebugStringConvertible, FlushDelegate, AEDele
160160
Logger.disableLevel(.error)
161161
}
162162
#if DEBUG
163-
Network.sendHttpEvent(eventName: "Toggle SDK Logging", apiToken: "metrics-1", distinctId: apiToken, properties: ["Logging Enabled": loggingEnabled])
163+
Network.sendHttpEvent(eventName: "Toggle SDK Logging", apiToken: "metrics-1", distinctId: apiToken, properties: ["Logging Enabled": loggingEnabled], updatePeople: false)
164164
#endif
165165
}
166166
}

Sources/Network.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ class Network {
130130

131131
class func sendHttpEvent(eventName: String, apiToken: String, distinctId: String,
132132
properties: Properties = [:],
133+
updatePeople: Bool = true,
133134
completion: ((Bool) -> Void)? = nil) {
134135
let trackProperties = properties.merging(["token": apiToken,
135136
"mp_lib": "swift",
@@ -173,7 +174,7 @@ class Network {
173174
}
174175
)
175176
}
176-
if !(eventName == "Integration") {
177+
if updatePeople {
177178
let engageData = JSONHandler.encodeAPIData([["$token": apiToken, "$distinct_id": distinctId, "$add": [eventName: 1]]])
178179
if let engageData = engageData {
179180
let engageBody = "ip=1&data=\(engageData)".data(using: String.Encoding.utf8)

0 commit comments

Comments
 (0)