Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Adding Code reference user prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
soner-yuksel committed Oct 6, 2023
1 parent 81c9a81 commit 9dc5fa5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions App/iOS/Delegates/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -536,15 +536,17 @@ extension BrowserViewController {
// Case 2: User Referral on Brave side
if Preferences.URP.referralLookupOutstanding.value == true {
urp.adCampaignLookup() { [weak self] response, error in
var referralCode = UserReferralProgram.getReferralCode()
// Checking referral code from User Referral program exists If not send 001
// Prefix this code with BRV for organic iOS installs
var referralCode = "BRV\(UserReferralProgram.getReferralCode() ?? "001")"

if error == nil, response?.0 == true, let campaignId = response?.1 {
referralCode = String(campaignId)
// Adding ASA User refcode prefix to indicate
// Apple Ads Attribution is true
referralCode = "ASA\(String(campaignId))"
}

self?.performProgramReferralLookup(urp, refCode: referralCode)

// TODO: Add Referral sequence
}
} else {
urp.pingIfEnoughTimePassed()
Expand Down

0 comments on commit 9dc5fa5

Please sign in to comment.