I am using Google Ads API V10 PHP Libray. I'm trying to get the 
"ad_group_criterion.position_estimates.first_page_cpc_micros," metric. But 
I am getting null error. Where am I doing wrong?

Sample Query:
SELECT campaign.id, campaign.name, ad_group_criterion.keyword.text, 
ad_group_criterion.position_estimates.first_page_cpc_micros FROM 
keyword_view

PHP Sample:
$campaign_id = $googleAdsRow->getCampaign()->getId();
$campaign_name = $googleAdsRow->getCampaign()->getName();
$keyword = $googleAdsRow->getAdGroupCriterion()->getKeyword()->getText();
$first_page_cpc 
= 
$googleAdsRow->getAdGroupCriterion()->getPositionEstimates()->getFirstPageCpcMicros();

Error:
*Fatal error*: Uncaught Error: Call to a member function 
getFirstPageCpcMicros() on null in...

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/716255c6-bf09-4660-9a45-1dc3dee975f6n%40googlegroups.com.
  • PH... [email protected]
    • ... Shobha Solanki
      • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
        • ... Anil
          • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to