Location>code7788 >text

iOS Development Foundation 142 - Ad Attribution

Popularity:999 ℃/2024-07-25 18:06:39

IDFA

IDFA is a unique identifier provided by Apple for iOS devices, specifically for ad tracking and related marketing purposes. The counterpart, on the Android platform, is the Google Advertising ID (Google Advertising ID).

How IDFA works:

IDFA is a unique identifier assigned to each device, and advertisers and developers can use IDFA to track users' clicks on ads, evaluate ad efficiency, and more. Starting with iOS 10, users have the option to reset their IDFA or limit ad tracking altogether, which improves user privacy protection.

When the user agrees to tracking, the developer can obtain the IDFA through a specific API to enable targeting of ads to the user. If the user refuses to be tracked, the IDFA obtained will be an all-zero value.

How to get IDFA in Objective-C:

  1. First, introduce the required framework:In your iOS project, you need to introduce theThe framework can be added in the project settings in Xcode under "Build Phases" -> "Link Binary with Libraries". You can add this framework to your project settings in Xcode under "Build Phases" -> "Link Binary with Libraries".

  2. Add App Tracking Transparency (ATT) permission request:existAddNSUserTrackingUsageDescriptionkey, whose value is a string used to explain to the user why the application needs this permission when requesting tracking permissions.

  3. Request permission and get IDFA:In your application, you need to get the IDFA based on the authorization status of the user.Here is the code example in Objective-C:

#import <AdSupport/>
#import <AppTrackingTransparency/>

- (void)requestIDFA {
    if (@available(iOS 14, *)) {
        [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
            // Checking the authorization status of a user
            if (status == ATTrackingManagerAuthorizationStatusAuthorized) {
                // User-authorized accessIDFA
                NSString *idfaString = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
                NSLog(@"IDFA: %@", idfaString);
            } else {
                // Handling unauthorized status
                NSLog(@"Unauthorized user accessIDFA");
            }
        }];
    } else {
        // be directed againstiOS 14following version,Direct accessIDFA(It does not take into account whether the user has restricted ad tracking)
        if ([[ASIdentifierManager sharedManager] isAdvertisingTrackingEnabled]) {
            NSString *idfaString = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
            NSLog(@"IDFA: %@", idfaString);
        } else {
            NSLog(@"Restricted ad tracking");
        }
    }
}

In practice, the privacy of the user should be taken into account by requesting permissions only when they are really needed and by transparently informing the user about the purpose for which the data will be used.

Principle:

In principle, IDFA is generated and managed by the Apple operating system. From the developer's point of view, the system provides an APIASIdentifierManager(used form a nominal expression)advertisingIdentifiermethod is used to access this identifier. The system maintains the generation of this unique identifier, its update (when the user chooses to reset the IDFA), and the status of the user's privacy settings (whether or not to allow ad tracking).

Apple hasn't disclosed too many details about how exactly IDFA is generated, but it's safe to assume that it's designed to protect user privacy and ensure that its use for ad tracking purposes doesn't infringe on users' privacy rights.

Note: Because Apple's privacy policy and technical implementations are subject to updates, the specifics of obtaining and using IDFA may change as well, and developers should follow Apple's official documentation for the latest updates.

How can I distinguish which ad is bringing the currently downloaded app?

On the iOS platform, distinguishing which ads brought about the current app download relies primarily on Apple's ad attribution platform, Apple Search Ads, and third-party attribution platforms (e.g., Adjust, Appsflyer, Branch, etc.). These services help developers track and analyze app installs brought by their ads through specific technical means. I'll describe the basic approach of each of these two types of programs below.

1. Apple Search Ads

Apple Search Ads is Apple's own advertising platform that allows developers to promote their apps within the App Store. To track whether users have downloaded your app through Apple Search Ads ads, you can use the Apple-providedSearch Ads Attribution (SAR) API

The steps are as follows:

  • First, the Search Ad Attribution API needs to be integrated in your app.This can be done by adding Apple'siAdframework and call the attribution API to do so.

  • When a user clicks on an ad and downloads the app through Apple Search Ads, the system records this click event.

  • By calling the attribution API, your app can access attribution information for this click event. This information includes ad-related metadata such as campaign ID, keyword ID, etc., thus letting you know which ad the user downloaded the app through.

2. Third-party attribution platforms

In addition to using Apple Search Ads, developers often use third-party attribution services to track and analyze the effectiveness of ad campaigns. These third-party platforms can provide more comprehensive attribution solutions, including multi-channel attribution, ad effectiveness analysis, ROI tracking and other features.

The realization is roughly as follows:

  • First, you need to integrate the SDK provided by your chosen third-party attribution provider in your app.

  • When a user clicks on an ad and is directed to the App Store to download your app, this third-party platform records the event through a specific tracking link.

  • When a user installs and opens the app for the first time, the integrated SDK communicates with the third-party service's server to pass on relevant installation event information.

  • Based on the data provided, the third-party service analyzes and confirms which ad or ad campaign brought this install, and then provides this information back to the developer.

Something to keep in mind:

  • In the case of using Apple Search Ads, attribution can be done directly using the scheme provided by Apple.

  • If attribution analysis is required across platforms and advertising channels, third-party attribution platforms are a more flexible and comprehensive option.

  • Due to new requirements for user privacy and data tracking in iOS 14 and later, the use of attribution services requires adherence to Apple's App Tracking Transparency (ATT) framework for requesting and obtaining tracking authorization from users.

Third-party attribution platforms

Further inquiry about how third-party attribution platforms work

Basic concepts of third-party attribution platforms

Third-party attribution platforms, also known as mobile app attribution or ad attribution services, are services specifically designed to track, measure, and optimize the effectiveness of digital advertising campaigns. They can tell developers exactly which ads, marketing channels, or promotions resulted in actual app installs, user behavior, and even revenue.

Working Principle

  1. Tracking Link: Developers use unique tracking links generated by the attribution platform when they publish ads on different advertising channels. Each link contains identifying information, such as ad affiliate, campaign name, creative ID, etc.

  2. click event: When a user clicks on this tracking link, the attribution platform records the click event and generates a unique identifier (click ID or some other form of token). The user is then directed to the app store.

  3. Installation and first startup: When a user downloads and launches an app for the first time, the attribution platform SDK integrated within the app sends an installation-related signal to the attribution service, which also contains a unique identifier for the device.

  4. attribution matching: The service platform matches previously recorded click events with actual application installation events through a series of matching techniques (e.g., click timestamps, device identifiers, etc.).

  5. Reporting and analysis: Once a successful match is made, the platform is able to determine which ad click led to an install, which in turn generates detailed attribution reports that provide developers with ad performance data such as installs, user activity, ROI, and other key metrics.

Challenges and responses

  • user privacy: In particular, in iOS 14 and later, Apple introduced the App Tracking Transparency (ATT) framework, which requires apps to obtain user permission before tracking users or accessing device advertising identifiers (IDFAs). Attribution platforms have responded to this challenge, in part, by leveraging privacy-friendly attribution solutions such as Apple's SKAdNetwork for attribution, although this sacrifices some data precision and depth.

  • attributional accuracy:: Differences in platforms and technological tools may affect the accuracy of attribution. Attribution platforms are constantly improving their algorithms and technologies (e.g., anti-fraud technologies) to ensure data accuracy.

reach a verdict

Third-party attribution platforms provide a critical service to help mobile app developers deeply understand and optimize their advertising ROI. Through professional attribution technology and data analytics, developers can make smarter decisions about their advertising strategies, improve user acquisition efficiency, and maximize advertising revenue. However, with increasingly stringent requirements for user privacy protection, these platforms are adapting to new rules and finding a balance.

Questions?

If I integrate two third-party SDKs within my app, won't there be a download that both third parties think they brought in? Such a concern is valid. When the SDKs of multiple third-party attribution platforms are integrated within an app, there is a real theoretical risk that both (or more) third-party platforms may both attempt to attribute the same installation event, and both may believe it was caused by their respective tracking links. This situation, if not properly handled, could indeed lead to overlapping or conflicting attributions, which could confuse the determination of actual advertising effectiveness.

How do you resolve attribution conflicts?

  1. Use of a single attribution platform: In practice, to avoid attribution conflicts, app developers and advertisers tend to choose and stick to a single attribution provider. This has the advantage of harmonizing attribution standards and methods, thus avoiding data redundancy and conflicts.

  2. Attributional deep linking techniques: Attribution platforms often use deep linking technology to accurately track user behavior paths and ensure accurate attribution from click to install. With unique URLs generated by deep linking, even if there are multiple attribution SDKs, you can more accurately match to the correct click event and installation.

  3. Attribution platform coordination: In some complex marketing scenarios where multiple attribution platforms must be used at the same time, some coordination mechanism between these platforms is often required, such as the use of a third-party neutral data management platform (DMP) to integrate and coordinate data from different sources. This way, even if there are multiple sources, you can accurately determine which action actually led to the installation.

  4. Prioritization and the Law of Last Click Attribution: In scenarios where multiple attribution platforms are running at the same time, there is usually a recognized set of prioritization rules or adherence to the principle of Last-Click Attribution. This means that although a user may be exposed to advertisements from multiple promotional channels, the final attribution will be given to the source that the user clicked on last.

reach a verdict

While theoretically problematic, overlap or conflict in attribution can be effectively avoided in most cases through the implementation of the methods and strategies described above. The best practice is to choose an attribution platform with a high level of trust and technical support as the sole attribution partner in order to ensure data accuracy and actionability. This not only ensures data consistency, but also avoids the complexity and increased costs associated with multiple administrations. Meanwhile, the attribution platform itself is constantly optimizing their algorithms and technologies to improve the accuracy and efficiency of attribution.