I am finding "getVideoViewRate" from "Metrics"

26 views
Skip to first unread message

vagh...@gmail.com

unread,
Aug 31, 2022, 8:13:46 AM8/31/22
to Google Ads API and AdWords API Forum
I am trying to get Video Data but some "Metrics" data I can't get.
So please help me with that?

$query = "SELECT campaign.id, ad_group.id, ad_group.name, metrics.impressions, metrics.video_views, metrics.clicks, metrics.video_view_rate, metrics.average_cpv, metrics.cost_micros, metrics.video_quartile_p25_rate, metrics.video_quartile_p50_rate, metrics.video_quartile_p75_rate, metrics.video_quartile_p100_rate, ad_group.status FROM ad_group WHERE ad_group.id IN (11111222233)";

        // Issues a search request by specifying page size.
        $response = $googleAdsServiceClient->search($customerId, $query, ['pageSize' => self::PAGE_SIZE]);

        // Iterates over all rows in all pages and prints the requested field values for each row.
        foreach ($response->iterateAllElements() as $googleAdsRow) {
            /** @var GoogleAdsRow $googleAdsRow */
            printf(
                "Ad group ID %d in campaign ID %d group Status %d Impressions %d clicks %d video_view %d video_view_rate %d average_cpv %d cost_micros %d video_quartile_p25_rate %d video_quartile_p50_rate %d video_quartile_p75_rate %d video_quartile_p100_rate %d ",
                $googleAdsRow->getAdGroup()->getId(),
                $googleAdsRow->getCampaign()->getId(),
                $googleAdsRow->getAdGroup()->getStatus(),
                $googleAdsRow->getMetrics()->getImpressions(),
                $googleAdsRow->getMetrics()->getClicks(),
                $googleAdsRow->getMetrics()->getVideoViews(),
                $googleAdsRow->getMetrics()->getVideoViewRate(),
                $googleAdsRow->getMetrics()->getAverageCpv(),
                $googleAdsRow->getMetrics()->getCostMicros(),
                $googleAdsRow->getMetrics()->getVideoQuartileP25Rate(),
                $googleAdsRow->getMetrics()->getVideoQuartileP50Rate(),
                $googleAdsRow->getMetrics()->getVideoQuartileP75Rate(),
                $googleAdsRow->getMetrics()->getVideoQuartileP100Rate(),
                PHP_EOL
            );


OUTPUT IS

Ad group ID  11111222233   in campaign ID  11111222233   group Status 3 Impressions 10552 clicks 2 video_view 6225 video_view_rate 0 average_cpv 20862 cost_micros 129871561 video_quartile_p25_rate 0 video_quartile_p50_rate 0 video_quartile_p75_rate 0 video_quartile_p100_rate 0

I need video_view_rate, video_quartile_p25_rate, video_quartile_p50_rate, video_quartile_p75_rate, video_quartile_p100_rate 

Google Ads API Forum Advisor

unread,
Aug 31, 2022, 8:59:31 AM8/31/22
to vagh...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to us.

For our team to further investigate this, could you provide us with the complete API logs (request and response with request-id) generated on your end and the whole UI screenshot of the Google Ads UI where you can see the fields you want to retrieve?

Note that logs can be requested or provided to the developer handling the Google Ads API transactions when logging of the API requests has been enabled. If it hasn't been enabled yet, then advise to refer to the specific guide below: You may then send the requested information via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

Best regards,
Google Logo
Heidi
Google Ads API Team
 


ref:_00D1U1174p._5004Q2dtksf:ref
Reply all
Reply to author
Forward
0 new messages