i am using this below code to get Adwards Campaign data reports in CSV.
I want to get " adwords campaign, adgroup ".
with this below code i am getting error Invalid field name in CampaignName
$user = new AdWordsUser();
$user->SetOAuth2Info($oauth2_info);
$user->SetClientCustomerId($client_id);
$user->LogAll();
$user->LoadService('ReportDefinitionService', ADWORDS_VERSION);
// Create selector.
$selector = new Selector();
$selector->fields = array(
'AdGroupId',
'CampaignId',
'CampaignName',
'GclId',
'CriteriaId',
'CriteriaParameters',
'Date'
);
// Create report definition.
$reportDefinition = new ReportDefinition();
$reportDefinition->selector = $selector;
$reportDefinition->reportName = 'Click Performance Report #' . uniqid();
$reportDefinition->dateRangeType = 'CUSTOM_DATE';
$dateRange = new DateRange();
$dateRange->min = $start_date;
//$dateRange->min = "20150626";
$dateRange->max = $end_date;
//$dateRange->max = "20150626";
$selector->dateRange = $dateRange;
//pr($dateRange); die;
$reportDefinition->reportType = 'CLICK_PERFORMANCE_REPORT';
$reportDefinition->downloadFormat = 'CSV';
// Exclude criteria that haven't recieved any impressions over the date range.
$reportDefinition->includeZeroImpressions = FALSE;
// Set additional options.
$options = array('version' => ADWORDS_VERSION);
$path = $this->path;
$file_name = 'click_performance_report_' . time() . ".csv";
$this->file_name = $file_name;
$filePath = $path . $file_name;
// Download report.
ReportUtils::DownloadReport($reportDefinition, $filePath, $user, $options);
$flag = true;
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@googlegroups.com
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 a topic in the Google Groups "AdWords API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-api/sc-13aJEgMw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-api...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/0715078b-4cb7-4851-a7ad-3ddca0c6cb69%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@googlegroups.com
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 a topic in the Google Groups "AdWords API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-api/sc-13aJEgMw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-api...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/dfc704c6-3d25-453e-9e4a-350d61be75fd%40googlegroups.com.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@googlegroups.com
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 a topic in the Google Groups "AdWords API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-api/sc-13aJEgMw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-api...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/432f826f-f7ac-4d3b-97e9-abe7ce3c56cb%40googlegroups.com.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@googlegroups.com
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 a topic in the Google Groups "AdWords API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-api/sc-13aJEgMw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-api...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/2a8a0ca1-0806-4d57-a07b-5a09c89a461f%40googlegroups.com.
Hi Anthony
If we want to find out which partner who inquired would we use the placement parameters in the urls? Is that going to be an issue after july 1st upgrade of adwprds urls? If you change to this will the old statistics be gone then? Is the placement parameters the best option if we want to find out which partners send traffic that convert to a lead which is wht we want to find out.
Could you let me know pls.
Best
Johan
Hello Mr. Anthony,
Thank you for your support.
but problem is same here.
Here is the random url of Google Display Partner URL where my ads are displaying by Google i.e whiteboardexplainers.com
http://awesomescreenshot.com/07d53ls86b
when user clicks on my ads i.e on thaivisa.com ( for example ) and lands on my site whiteboardexplainers.com index page.
i want to get URL from where user came to my website.
Currenlty i am getting gclid when user lands on my site whiteboardexplainers.com
Like this http://www.whiteboardexplainers.com/?gclid=CNykj6mO-8YCFUQJvAodJb4MSQ
I have fetched campaign id and adgroup id using Performance Reports using Google Adwords API.
I have also tried URL PERFORMANCE REPORT
using $reportQuery = "select CampaignId, AdGroupId ,Url, ConversionTrackerId from URL_PERFORMANCE_REPORT WHERE CampaignId = xxxxxxxxx ";
But i am getting so many URL'S that is related with campaign.
How could i get particular one URL (for example thaivisa.com). My ads was showing there when user clicks in it. It could be differ. I want to get this thaivisa.com on my end in Reports using Ads API.
Mr. Anthony, you have sugested me to do this below:
e.g. WHERE Url = 'YOUR_PARTNER_URL_HERE'
But problem is there i can't use this WHERE Url = 'YOUR_PARTNER_URL_HERE'.
Because i don't know from where user came.
I have also tried it with referrel URL using javascript on my end. but sometime i got URL parameter in that referrel url and sometime not. Why is this happening ..?
Please suggest me is it possible to get that particular URL from user came to my website if yes then how ?
Example:
If my Ad is showing on www.xyz.com and user clicks on it. Then it goes my webportal.
now how i can get using Report with Ads API that from where my user came i.e. www.xyz.com
I have only “ gclid “.
Hi Johan,The best AdWords API has to offer is to use the Url Performance Report to capture the URLs.However, if that is not what you want I suggest modifying your site to capture the referring address and to save it alongside the gclid. This would be a custom solution and is not a functionality on the AdWords API side.