Skip to content

Commit

Permalink
AB Test control group and variant added for log purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
barbayrak committed Dec 8, 2020
1 parent 85c4799 commit 1755787
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion PapcornsAnalytics.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Pod::Spec.new do |spec|

spec.name = "PapcornsAnalytics"
spec.version = "1.0.2"
spec.version = "1.0.3"
spec.summary = "Papcorns Analytics Tool iOS SDK"

spec.description = "Internal Papcorns Analytics Tool iOS SDK"
Expand Down
Binary file not shown.
15 changes: 11 additions & 4 deletions PapcornsAnalytics/API/PapcornsAPISetUser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,19 @@ class PapcornsAPISetUser: PapcornsRequest<PapcornsAPISuccess> {
switch config {
case .Adjust(let adjustId):
if let adjustId = adjustId {
tool["adId"] = adjustId
}
tool["adId"] = adjustId
}
case .AppsFlyer(let uId):
if let uId = uId {
tool["uId"] = uId
}
tool["uId"] = uId
}
case .ABTest(let controlGroup,let variant):
if let cGroup = controlGroup {
tool["controlGroup"] = cGroup
}
if let v = variant {
tool["variant"] = v
}
}

toolsDict.append(tool)
Expand Down
5 changes: 4 additions & 1 deletion PapcornsAnalytics/Models/PapcornsConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ import AdSupport
public enum PapcornsToolsConfig {
case Adjust(adId:String?)
case AppsFlyer(uid:String?)

case ABTest(controlGroup:String?,variant: String?)

var key:String {
switch self {
case .Adjust(_):
return "adjust"
case .AppsFlyer(_):
return "appsflyer"
case .ABTest(_,_):
return "abtest"
}
}
}
Expand Down

0 comments on commit 1755787

Please sign in to comment.