Wenn Sie sich mit anderen Nutzern über unsere Produkte austauschen und Feedback geben möchten, treten Sie dem offiziellen Ad Manager-Discord-Kanal auf dem Server der Google Advertising and Measurement Community bei.
Benutzerdefinierte native Anzeigenformate für Displayanzeigen und Open Measurement
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Wenn Sie Open Measurement mit benutzerdefinierten nativen Anzeigenformaten verwenden möchten,
kein Video-Asset enthält, müssen Sie die Methode
APIs zur Messung selbst hinzufügen. Open Measurement für benutzerdefinierte native Display-Anzeigen
Formate werden erst ab Version 7.43.0 unterstützt. Wenn Sie benutzerdefinierte
native Anzeigenformate mit einem Video-Asset verwenden, müssen Sie
Google Mobile Ads SDK die Sichtbarkeit des Video-Assets auf
in Ihrem Namen.
Unabhängig davon, ob Sie Open Measurement verwenden oder nicht, funktioniert das Laden der Anzeige immer gleich. In dieser
zeigen wir mit einem einfachen 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
Registrieren Sie Ihre Ansicht und beginnen Sie mit der Messung
Wenn Sie eine GADNativeCustomFormatAd einblenden, müssen Sie Ihre benutzerdefinierte Anzeige registrieren
Ansicht mit der GADNativeTemplateAd unter Verwendung der displayAdMeasurement.view
Property.
Außerdem müssen Sie das SDK ausdrücklich anweisen, mit der Messung Ihrer Anzeige zu beginnen. Gehen Sie dazu wie folgt vor:
Rufen Sie die Methode startWithError: für das Attribut displayAdMeasurement Ihrer
GADNativeCustomFormatAdstartWithError: muss über die Haupt-App aufgerufen werden
und nachfolgende Aufrufe haben keine Auswirkungen.
@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
Das war schon alles. Sobald du deine App veröffentlichst, erhältst du
Messdaten. Ihre Daten sind jedoch erst zertifiziert, wenn Sie die
IAB-Zertifizierung
[null,null,["Zuletzt aktualisiert: 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/)."]]