Hi,
To better assist you, could you further elaborate the issue that you are
facing regarding the PAID_ORGANIC_QUERY_REPORT? Also, could you clarify
what is the result you are expecting from the report?
Regards,
Dave Paurillo
Google Ads API Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
https://ads-developers.googleblog.com/search/label/google_ads_api
https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
On 04/08/19 20:20:09 [email protected] wrote:
Hi!
Thank you about clearly explanation.
I try to get report "PAID_ORGANIC_QUERY_REPORT"
class GetReportFields
{
const PAGE_LIMIT = 500;
public static function runExample(
AdWordsServices $adWordsServices,
AdWordsSession $session
) {
$reportDefinitionService = $adWordsServices->get($session,
ReportDefinitionService::class);
// The type of the report to get fields for.
$reportType = ReportDefinitionReportType::PAID_ORGANIC_QUERY_REPORT;
// Get report fields of the report type.
$reportDefinitionFields = $reportDefinitionService->getReportFields(
$reportType);
printf(
"The report type '%s' contains the following fields:\n",
$reportType
);
foreach ($reportDefinitionFields as $reportDefinitionField) {
printf(
' %s (%s)',
$reportDefinitionField->getFieldName(),
$reportDefinitionField->getFieldType()
);
if ($reportDefinitionField->getEnumValues() !== null) {
printf(
' := [%s]',
implode(', ', $reportDefinitionField->getEnumValues())
);
}
print "\n";
}
}
public static function main()
{
// Generate a refreshable OAuth2 credential for authentication.
$oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build();
// Construct an API session configured from a properties file and
the
// OAuth2 credentials above.
$session = (new AdWordsSessionBuilder())->fromFile()->
withOAuth2Credential($oAuth2Credential)->build();
self::runExample(new AdWordsServices(), $session);
}
}
GetReportFields::main();
But get only fields:
[2019-04-08 14:39:31] AW_SOAP.INFO: clientCustomerId=XXX-XXX-XXX
operations=1 service=ReportDefinitionService method=getReportFields
responseTime=170 requestId=XXXXXXXXXXXXXXXXXXXXX server=adwords.google.com
isFault=0 faultMessage=
The report type 'PAID_ORGANIC_QUERY_REPORT' contains the following fields:
KeywordId (long)
AccountCurrencyCode (String)
AccountDescriptiveName (String)
AccountTimeZone (String)
AdGroupId (Long)
AdGroupName (String)
AdGroupStatus (AdGroupStatus) := [UNKNOWN, ENABLED, PAUSED, REMOVED]
AverageCpc (Money)
AveragePosition (Double)
CampaignId (Long)
CampaignName (String)
CampaignStatus (CampaignStatus) := [UNKNOWN, ENABLED, PAUSED, REMOVED]
Clicks (Long)
CombinedAdsOrganicClicks (Long)
CombinedAdsOrganicClicksPerQuery (Double)
CombinedAdsOrganicQueries (Long)
Ctr (Double)
CustomerDescriptiveName (String)
Date (Date)
DayOfWeek (DayOfWeek) := [MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY,
SATURDAY, SUNDAY]
ExternalCustomerId (Long)
Impressions (Long)
KeywordTextMatchingQuery (String)
Month (String)
MonthOfYear (MonthOfYear) := [JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE,
JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER]
OrganicAveragePosition (Double)
OrganicClicks (Long)
OrganicClicksPerQuery (Double)
OrganicImpressions (Long)
OrganicImpressionsPerQuery (Double)
OrganicQueries (Long)
Quarter (String)
QueryMatchType (QueryMatchType) := [AUTO, BROAD, EXACT, EXPANDED, PHRASE]
SearchQuery (String)
SerpType (SerpType) := [UNKNOWN, ADS_ONLY, ORGANIC_ONLY, ADS_AND_ORGANIC]
Week (String)
Year (Integer)
I read this
<https://developers.google.com/adwords/api/docs/appendix/reports#paid-organic>
and
thought that I will get full report.
понеділок, 1 квітня 2019 р. 10:44:21 UTC+3 користувач
googleadsapi-forumadvisor написав:
Hi,
Could you confirm if the following accounts are in the same hierarchy with
your production manager account? If it is not of the same hierarchy with
the production manager account, the production manager account must be
granted access first before you could use the OAuth2 credentials (created
using an email address with access to the MCC) of the said MCC to retrieve
data from these client accounts. To achieve this, you can invite the other
account into your existing hierarchy and you may check this guide
<https://developers.google.com/adwords/api/docs/guides/accounts-overview> to
know more about managing accounts.
Take note that in AdWords API you could only retrieve reports from a single
client account
<https://developers.google.com/adwords/api/docs/guides/reporting#reports_for_multiple_accounts>
for
each API call. In this case, you would need to change the value of
api.adwords.clientCustomerId from adsapi_php.ini every time you wish to
retrieve data from another client. Say the current value of
api.adwords.clientCustomerId is 000-000-0000 and you run the code
GetCampaigns
<https://developers.google.com/adwords/api/docs/samples/php/basic-operations#get-all-campaigns>(),
you should get all the campaigns from client 000-000-0000. Say you want to
retrieve the campaigns from another client 111-111-1111, you need to change
the value of api.adwords.clientCustomerId to 111-111-1111 before running
the code again and you should get all the campaigns from that client.
Let me know if this helps.
Regards,
Dave Paurillo
Google Ads API Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
https://ads-developers.googleblog.com/search/label/google_ads_api
https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Was your question answered? Please rate your experience with us by taking a
short survey.
If not -- reply to this email and tell us what else we can do to help.
Take Survey
<https://support.google.com/google-ads/contact/survey_transactional?caseid=8-5077000025924&hl=en&ctx=1>
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/
On 03/29/19 18:24:39 [email protected] wrote:
Thank you. Okey, I'm understand that refresh_token we will generate once,
but how to say Adwords by API call that in request #1 give me data of
campaign from account 000-000-0000, in request #2 give me data of campaign
from account 111-111-1111?
If I right understand process of linking accounts. Client want to link self
adwords account with my MCC -> client click and redirect to google page
where allow access -> then will redirect to redirect_url (my page) -> I
will get "code" -> and then I thought that I have to generate
refresh_token save this refresh_token and in API call to account
000-000-0000 use his refresh_token but ... no
пʼятниця, 29 березня 2019 р. 10:07:18 UTC+3 користувач
googleadsapi-forumadvisor написав:
Hi,
I could see that you already generated a refresh token. Refresh token is
only generated once and doesn't have to be different for each of your
client accounts. If this does not answer your concern, feel free to write
back.
Regards,
Dave Paurillo
Google Ads API Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Was your question answered? Please rate your experience with us by taking a
short survey.
If not -- reply to this email and tell us what else we can do to help.
Take Survey
<https://support.google.com/google-ads/contact/survey_transactional?caseid=8-5077000025924&hl=en&ctx=1>
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/
On 03/28/19 23:49:22 [email protected] wrote:
Hi.
Please, help me to understand.
1. I had to register my aplication in console.developers.google.com
2. I got *client_id *and *client_secret*
3. using GetRefreshToken.php I got the *link*
4. went to link
5. applied permission
6. got *code*
7. with *code *I got a *refresh_token*
8. I written data to adsapi_php.ini
each of my clients will go to my link, apply permission, I will
get refresh_token for each of my client, save refresh_token.
question: all data (like: client_id, client_secret, developerToken,
clientCustomerId) have to be permanent but refresh_token have to be
different to each of my client for each getting data from google adwords by
api?
четвер, 28 березня 2019 р. 03:47:36 UTC+2 користувач
googleadsapi-forumadvisor написав:
Hi,
Apologies for the conf
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/12f0g8mkj000000101qcf8001fl0csz6smjee1o6ko30c1g68qjidhh%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.