ב-Display & Video 360 יש מגוון מגבלות על משאבים. הגבלות האלה כמעט אף פעם לא מגיעות למקסימום, אבל אם הן יגיעו למקסימום, יופיעו שגיאות.
משתמשים בשיטה audit כדי לקבל קבוצת משנה של ספירות ישויות בחשבון של מפרסם. כדי להימנע מהגעה למגבלות החשבון, מומלץ לבצע ביקורת על המפרסם באופן קבוע.
כך אפשר לראות את מספר המרות ברמת המפרסם:
Java
// Provide the ID of the advertiser. long advertiserId = advertiser-id; // Define the audit fields to retrieve in a comma-separated string. String readMask = "usedCampaignsCount,usedInsertionOrdersCount,usedLineItemsCount"; // Get the audit for the advertiser. AuditAdvertiserResponse auditResponse = service.advertisers().audit(advertiserId).setReadMask(readMask).execute(); // Display the audit results. System.out.printf("Audit for advertiser ID %s:%n", advertiserId); System.out.printf("Used campaigns: %s%n", auditResponse.getUsedCampaignsCount()); System.out.printf("Used insertion orders: %s%n", auditResponse.getUsedInsertionOrdersCount()); System.out.printf("Used line items: %s", auditResponse.getUsedLineItemsCount());
Python
# Provide the ID of the parent advertiser. advertiser_id = advertiser-id # Define the audit fields to retrieve in a comma-separated string. read_mask = "usedCampaignsCount,usedInsertionOrdersCount,usedLineItemsCount" # Generate audit. audit_response = ( service.advertisers() .audit(advertiserId=advertiser_id, readMask=read_mask) .execute() ) # Print audit results. print(f"Audit for advertiser ID {advertiser_id}:") print(f'Used campaigns: {audit_response["usedCampaignsCount"]}') print(f'Used insertion orders: {audit_response["usedInsertionOrdersCount"]}') print(f'Used line items: {audit_response["usedLineItemsCount"]}')
PHP
// Provide the ID of the advertiser. $advertiserId = advertiser-id; // Define the audit fields to retrieve in a comma-separated string. $readMask = "usedCampaignsCount,usedInsertionOrdersCount,usedLineItemsCount"; // Configure the API request. $auditOptParams = array( 'readMask' => $readMask ); // Call the API to retrieve account limit counts. try { $auditResponse = $this->service->advertisers->audit( $advertiserId, $auditOptParams ); } catch (\Exception $e) { $this->renderError($e); return; } // Print the audit responses. printf('<p>Audit for advertiser ID %s:</p>', $advertiserId); printf('<p>Used campaigns: %s</p>', $auditResponse['usedCampaignsCount']); printf('<p>Used insertion orders: %s</p>', $auditResponse['usedInsertionOrdersCount']); printf('<p>Used line items: %s</p>', $auditResponse['usedLineItemsCount']);