다음과 같은 맞춤 네이티브 광고 형식과 함께 Open Measurement를 사용하려는 경우
동영상 애셋이 포함되지 않은 경우 공개
Measurement API를 직접 만들 수 있습니다. 디스플레이 유형 맞춤 네이티브 광고의 개방형 측정
형식은 버전 7.43.0 이상에서만 지원됩니다. 커스텀
동영상 애셋과 함께 네이티브 광고 형식을 사용하는 경우
Google 모바일 광고 SDK는
할 수 있습니다.
광고를 로드하는 것은 Open Measurement를 사용하든 사용하지 않든 동일합니다. 이
이 경우 간단한 ViewController를 사용하여
GADNativeCustomFormatAd:
@interfaceOpenMeasurementNativeCustomFormatAdViewController()<GADNativeCustomFormatAdLoaderDelegate>{IBOutletUIView*_parentView;GADAdLoader*_adLoader;GADNativeCustomFormatAd*_customTemplateAd;MySimpleNativeAdView*_simpleNativeAdView;}@end@implementationOpenMeasurementNativeCustomFormatAdViewController-(void)viewDidLoad{[superviewDidLoad];_adLoader=[[GADAdLoaderalloc]initWithAdUnitID:@"your ad unit ID"rootViewController:selfadTypes:@[kGADAdLoaderAdTypeNativeCustomFormat]options:nil];_adLoader.delegate=self;[selfloadAd];}-(void)loadAd{GAMRequest*request=[GAMRequestrequest];[_adLoaderloadRequest:request];}...@end
보기 등록 및 측정 시작
GADNativeCustomFormatAd를 표시하려면 맞춤 광고를 등록해야 합니다.
displayAdMeasurement.view를 사용하여 GADNativeTemplateAd로 뷰
속성
또한 광고 측정을 시작하도록 SDK에 명시적으로 지시해야 합니다. 이렇게 하려면
앱의 displayAdMeasurement 속성에서 startWithError: 메서드를 호출합니다.
GADNativeCustomFormatAd입니다. startWithError:는 기본
후속 호출이 효과가 없습니다.
@implementationOpenMeasurementNativeCustomFormatAdViewController...#pragma mark - GADNativeCustomFormatAdLoaderDelegate-(void)adLoader:(GADAdLoader*)adLoaderdidReceiveNativeCustomFormatAd:(GADNativeCustomFormatAd*)nativeCustomFormatAd{NSLog(@"Received custom native ad: %@",nativeCustomFormatAd);_customTemplateAd=nativeCustomFormatAd;// Put the custom native ad on screen._simpleNativeAdView=[[NSBundlemainBundle]loadNibNamed:@"SimpleCustomNativeAdView"owner:niloptions:nil].firstObject;[_parentViewaddSubview:_simpleNativeAdView];[_simpleNativeAdViewpopulateWithCustomNativeAd:_customTemplateAd];// Set the top-level native ad view on the GADNativeCustomFormatAd so the// Google Mobile Ads SDK can track viewability for that view._customTemplateAd.displayAdMeasurement.view=_simpleNativeAdView;// Begin measuring your impressions and clicks.NSError*error=nil;[_customTemplateAd.displayAdMeasurementstartWithError:&error];if(error){NSLog(@"Failed to start the display measurement.");}}...@end
그러면 끝입니다. 앱을 출시하면
인증 자격을 갖춰야 하지만
IAB 인증
절차에 따라 다릅니다.
[null,null,["최종 업데이트: 2025-08-21(UTC)"],[[["\u003cp\u003eOpen Measurement is required for custom native ad formats without video assets, utilizing the Open Measurement APIs in Google Mobile Ads SDK version 7.43.0 or later.\u003c/p\u003e\n"],["\u003cp\u003eFor display-type custom native ad formats, IAB certification as a Measurement Provider is necessary for certified measurement results.\u003c/p\u003e\n"],["\u003cp\u003eTo implement Open Measurement, you must use Google Mobile Ads SDK 7.44.0 or higher, integrate custom native ad formats, configure a viewability provider, and register your ad view for tracking.\u003c/p\u003e\n"],["\u003cp\u003eLoading an ad remains the same with Open Measurement, requiring you to register your custom ad view and initiate measurement using the \u003ccode\u003estartWithError\u003c/code\u003e method.\u003c/p\u003e\n"]]],["For display-type custom native ads without video assets, you must manually call Open Measurement APIs using Google Mobile Ads SDK version 7.43.0 or later. Key actions include: configuring a viewability provider, loading an ad via `GADAdLoader`, registering the custom ad view with `displayAdMeasurement.view`, and initiating measurement using `startWithError:`. Measurement data is generated, but IAB certification is required for official validation. Ensure the Measurement Provider is IAB certified for certified results.\n"],null,["# Display-type Custom Native Ad Formats and Open Measurement\n\nIf you plan to use open measurement with custom native ad formats that\ndon't contain a video asset, you'll be responsible for calling the Open\nMeasurement APIs yourself. Open measurement for display-type custom native ad\nformats is only supported by version 7.43.0 and later. If you're using custom\nnative ad formats with a video asset, you don't need to follow this\nguide---the Google Mobile Ads SDK tracks viewability of the video asset on\nyour behalf.\n| **Key Point:** In order for your display-type native custom ad measurement results to be certified by the IAB, you must be certified as a [Measurement\n| Provider](//iabtechlab.com/compliance-programs/faq-om-sdk-compliance/) with the IAB Tech Lab.\n\nPrerequisites\n-------------\n\n- Google Mobile Ads SDK version 7.44.0 or higher.\n- Read [Open Measurement with the Mobile Ads\n SDK](/ad-manager/mobile-ads-sdk/ios/open-measurement).\n- Integrate [custom native ad\n formats](/ad-manager/mobile-ads-sdk/ios/native/custom-formats).\n- [Configure a viewability\n provider](//support.google.com/admanager/answer/9025968#configure-a-viewability-provider) and assign it to your line item.\n- Enter your partner name when [creating a custom\n format](//support.google.com/admanager/answer/7661908) in the Ad Manager UI.\n\nLoad an ad\n----------\n\nLoading an ad is the same whether you're using open measurement or not. In this\ncase we'll use a simple `ViewController` to demonstrate loading a\n`GADNativeCustomFormatAd`: \n\n @interface OpenMeasurementNativeCustomFormatAdViewController ()\n \u003cGADNativeCustomFormatAdLoaderDelegate\u003e {\n IBOutlet UIView *_parentView;\n GADAdLoader *_adLoader;\n GADNativeCustomFormatAd *_customTemplateAd;\n MySimpleNativeAdView *_simpleNativeAdView;\n }\n\n @end\n\n @implementation OpenMeasurementNativeCustomFormatAdViewController\n\n - (void) viewDidLoad {\n [super viewDidLoad];\n\n _adLoader = [[GADAdLoader alloc] initWithAdUnitID:@\"\u003cvar translate=\"no\"\u003eyour ad unit ID\u003c/var\u003e\"\n rootViewController:self\n adTypes:@[ kGADAdLoaderAdTypeNativeCustomFormat ]\n options:nil];\n _adLoader.delegate = self;\n [self loadAd];\n }\n\n - (void) loadAd {\n GAMRequest *request = [GAMRequest request];\n [_adLoader loadRequest:request];\n }\n ...\n @end\n\nRegister your view and begin measuring\n--------------------------------------\n\nWhen you show a `GADNativeCustomFormatAd`, you need to register your custom ad\nview with the `GADNativeTemplateAd` using the `displayAdMeasurement.view`\nproperty.\n\nYou also need to explicitly tell the SDK to begin measuring your ad. To do this,\ncall the `startWithError:` method on the `displayAdMeasurement` property of your\n`GADNativeCustomFormatAd`. `startWithError:` must be called from the main\nthread, and subsequent calls have no effect. \n\n @implementation OpenMeasurementNativeCustomFormatAdViewController\n ...\n #pragma mark - GADNativeCustomFormatAdLoaderDelegate\n\n - (void) adLoader:(GADAdLoader *) adLoader\n didReceiveNativeCustomFormatAd:(GADNativeCustomFormatAd *)nativeCustomFormatAd {\n NSLog(@\"Received custom native ad: %@\", nativeCustomFormatAd);\n\n _customTemplateAd = nativeCustomFormatAd;\n\n // Put the custom native ad on screen.\n _simpleNativeAdView =\n [[NSBundle mainBundle] loadNibNamed:@\"SimpleCustomNativeAdView\"\n owner:nil\n options:nil]\n .firstObject;\n [_parentView addSubview:_simpleNativeAdView];\n [_simpleNativeAdView populateWithCustomNativeAd:_customTemplateAd];\n\n // Set the top-level native ad view on the GADNativeCustomFormatAd so the\n // Google Mobile Ads SDK can track viewability for that view.\n _customTemplateAd.displayAdMeasurement.view = _simpleNativeAdView;\n // Begin measuring your impressions and clicks.\n NSError *error = nil;\n [_customTemplateAd.displayAdMeasurement startWithError:&error];\n\n if (error) {\n NSLog(@\"Failed to start the display measurement.\");\n }\n }\n ...\n @end\n\nThat's all there is to it. Once you release your app you will begin receiving\nmeasurement data, however your data won't be certified until you go through the\n[IAB certification\nprocess](//iabtechlab.com/compliance-programs/faq-om-sdk-compliance/)."]]