How to get Landing Page in Adwords API PHP

374 views
Skip to first unread message

vananpp...@gmail.com

unread,
Nov 24, 2017, 1:06:26 AM11/24/17
to AdWords API Forum
i dont know how to get landing page details in the adwords api report.

Someone help me with this with sample code

Vincent Racaza (AdWords API Team)

unread,
Nov 24, 2017, 3:06:10 AM11/24/17
to AdWords API Forum
Hi,

Are you referring to the CreativeDestinationUrl or to the CreativeFinalUrls of an Ad Performance Report? If you are not referring to these, then kindly provide a UI screenshot or any document that shows this landing page so I can map it accordingly to its API equivalent. You may use the Reply privately to author option.

For generating reports, you can refer to this guide as to how. You can also check the PHP reporting examples here.

Thanks,
Vincent
AdWords API Team

vananpp...@gmail.com

unread,
Nov 24, 2017, 6:05:01 AM11/24/17
to AdWords API Forum
i want landing report with criteria performance report or keyword performance report or in custom report. here i have attached the screenshot of landing page report.

Vincent Racaza (AdWords API Team)

unread,
Nov 24, 2017, 6:14:10 AM11/24/17
to AdWords API Forum
Hi,

Thanks for providing these details.

The landing page is equivalent to the FinalUrls attribute. You can see on the link for the supported report types for this attribute. If you want the FinalUrls in the keyword level, then use the Keywords Performance Report. You can also use the Criteria Performance Report if you want to retrieve it on the criteria level.

Also, kindly refer to my previous reply on how to generate reports in the AdWords API.

vananpp...@gmail.com

unread,
Nov 24, 2017, 6:55:03 AM11/24/17
to AdWords API Forum
i have given the attribute FinalUrls from CRITERIA_PERFORMANCE_REPORT  from but i am getting only empty values.

this is my code.

        $selector         = new Selector();
        $FromDate = ($fromdate) ? $fromdate : date('Ymd');
        $ToDate   = ($todate) ? $todate : date('Ymd');
        $selector->setDateRange(new DateRange($FromDate, $ToDate));
        $selector->setFields(['FinalUrls','CampaignName', 'AdGroupName', 'Criteria', 'QualityScore', 'IsNegative', 'Impressions', 'Clicks', 'Ctr', 'AverageCpc', 'Cost', 'AveragePosition', 'Conversions', 'CostPerConversion', 'ConversionRate', 'AllConversions', 'ViewThroughConversions']);
        $reportDefinition = new ReportDefinition();
        $reportDefinition->setSelector($selector);
        $reportDefinition->setReportName('Criteria performance report #' . uniqid());
        $reportDefinition->setDateRangeType(ReportDefinitionDateRangeType::CUSTOM_DATE);
        $reportDefinition->setReportType(ReportDefinitionReportType:: CRITERIA_PERFORMANCE_REPORT);
        $reportDefinition->setDownloadFormat(DownloadFormat::CSV);

        // Download report.
        $reportDownloader       = new ReportDownloader($session);
        $reportSettingsOverride = (new ReportSettingsBuilder())
                ->includeZeroImpressions(false)
                ->build();
        $reportDownloadResult   = $reportDownloader->downloadReport(
                $reportDefinition, $reportSettingsOverride);
        $reportDownloadResult->saveToFile($filePath);

Vincent Racaza (AdWords API Team)

unread,
Nov 26, 2017, 10:49:29 PM11/26/17
to AdWords API Forum
Hi,

For the Criteria Performance Report, if the Status of a criteria is already removed, then its FinalUrls will be empty in the report. Also, take note that this report type is a single attribution report, meaning, only one of the triggering criteria (keyword, age, placement, etc.) is recorded on which AdWords deems most relevant.

For your issue, can you check if the triggering criteria is not REMOVED? If it is not removed, and still, the FinalUrls attribute is empty on your end, then kindly provide your report definition (include the actual date range since in your code, this is not visible) with your clientCustomerId so I can further check. Please use the Reply privately to author option.

dripti...@gmail.com

unread,
Oct 29, 2018, 7:45:33 AM10/29/18
to AdWords API and Google Ads API Forum
Hi, 

I am trying to do the same thing. Here is my script: 
import sys
from googleads import adwords


def main(client):
  report_downloader = client.GetReportDownloader(version='v201809')
  
  report = {
      'reportName': 'Last 30 days CRITERIA_PERFORMANCE_REPORT',
      'dateRangeType': 'LAST_30_DAYS',
      'reportType': 'CRITERIA_PERFORMANCE_REPORT',
      'downloadFormat': 'CSV',
      'selector': {
          'fields': ['CampaignId', 'AdGroupId','CampaignName','AdGroupId','CriteriaType',
                      'Criteria', 'Clicks', 'Cost','VideoQuartile100Rate',
                     'VideoQuartile25Rate', 'VideoQuartile50Rate', 'VideoQuartile75Rate', 'VideoViewRate','FinalUrls','Status','Impressions','Date']
      }
  }
  
  with open('CRITERIA_PERFORMANCE_REPORT.csv', 'wb') as handler:
    report_downloader.DownloadReport(
        report, handler, skip_report_header=False, skip_column_header=False,
        skip_report_summary=False)


However, in my criteria Type i only get age and household income and final url is blank even when status is enabled. 

Can you tell me why and how can i have the landing page in criteria performance report along with gender as well?

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Oct 29, 2018, 3:11:19 PM10/29/18
to AdWords API and Google Ads API Forum
Hello, 

The Criteria Performance Report will give the stats aggregated at the criteria level. In your case, age and house hold income. If there is no final url set for these criteria, you may not get that via the report. To take a closer look at your case, could you please share your client customer id? You could use reply privately to author option while replying. 

Thanks,
Sreelakshmi, AdWords API Team
Reply all
Reply to author
Forward
0 new messages