Floodlight report issue

109 views
Skip to first unread message

web...@adaptiveaudience.com

unread,
Jun 28, 2013, 4:32:38 PM6/28/13
to google-doubleclick-...@googlegroups.com
Hello,

I'm trying to run and download a floodlight report via PHP API.  But I'm getting the error:

(400) The combination of dimensions, metrics, and filters in your report is invalid.

Here is my code:
// Create DFA report
$report = new Google_Report();
$report->setName('DFA Floodlight Report');
$report->setFileName('api_report_file');
$report->setType('FLOODLIGHT');
// Start and end dates of report
$start_date = date("Y-m-d", strtotime("-3 days"));
$end_date = date("Y-m-d", strtotime("yesterday"));

$dateRange = new Google_DateRange();
$dateRange->setStartDate($start_date);
$dateRange->setEndDate($end_date);

// Add dimensions of report
$date = new Google_SortedDimension();
$date->setName('dfa:date');
$advertiser = new Google_SortedDimension();
$advertiser->setName('dfa:advertiser');
$advertiserId = new Google_SortedDimension();
$advertiserId->setName('dfa:advertiserId');
$floodlight = new Google_SortedDimension();
$floodlight->setName('dfa:floodlightConfigId');
$campaign = new Google_SortedDimension();
$campaign->setName('dfa:campaign');
$campaignId = new Google_SortedDimension();
$campaignId->setName('dfa:campaignId');
$site = new Google_SortedDimension();
$site->setName('dfa:siteDirectory');
$siteK = new Google_SortedDimension();
$siteK->setName('dfa:siteKeyname');
$package = new Google_SortedDimension();
$package->setName('dfa:packageRoadblock');
$placementSize = new Google_SortedDimension();
$placementSize->setName('dfa:placementSize');
$placement = new Google_SortedDimension();
$placement->setName('dfa:placement');
$placementId = new Google_SortedDimension();
$placementId->setName('dfa:placementId');
$creative = new Google_SortedDimension();
$creative->setName('dfa:creative');
$creativeId = new Google_SortedDimension();
$creativeId->setName('dfa:creativeId');
$clickUrl = new Google_SortedDimension();
$clickUrl->setName('dfa:clickThroughUrl');
$activityGroup = new Google_SortedDimension();
$activityGroup->setName('dfa:activityGroup');
$activity = new Google_SortedDimension();
$activity->setName('dfa:activity');

$criteria = new Google_ReportFloodlightCriteria();
$criteria->setDateRange($dateRange);
$criteria->setDimensions(array(
                $date,
                $advertiser,
                $advertiserId,
                $floodlight,
                $campaign,
                $campaignId,
                $site,
                $siteK,
                $package,
                $placementSize,
                $placement,
                $placementId,
                $creative,
                $creativeId,
                $clickUrl,
                $activityGroup,
                $activity));
// Add metrics
$criteria->setMetricNames(array(
                'dfa:floodlightImpressions',
                'dfa:activityClickThroughConversions',
                'dfa:activityViewThroughConversions',
                'dfa:activityClickThroughRevenue',
                'dfa:activityViewThroughRevenue',
                'dfa:floodlightVariableMetric1',
                'dfa:floodlightVariableMetric2',
                'dfa:floodlightVariableMetric3',
                'dfa:floodlightVariableMetric4',
                'dfa:floodlightVariableMetric5',
                'dfa:floodlightVariableMetric6',
                'dfa:floodlightVariableMetric7',
                'dfa:floodlightVariableMetric8',
                'dfa:floodlightVariableMetric9',
                'dfa:floodlightVariableMetric10',
                'dfa:floodlightVariableMetric11',
                'dfa:floodlightVariableMetric12',
                'dfa:floodlightVariableMetric13',
                'dfa:floodlightVariableMetric14',
                'dfa:floodlightVariableMetric15',
                'dfa:floodlightVariableMetric16',
                'dfa:floodlightVariableMetric17',
                'dfa:floodlightVariableMetric18',
                'dfa:floodlightVariableMetric19',
                'dfa:floodlightVariableMetric20',
                'dfa:lastClickAttributedTransactionCount',
                'dfa:lastImpressionAttributedTransactionCount',
                'dfa:richMediaAverageFullScreenViewTime',
                'dfa:richMediaAverageInteractionTime',
                'dfa:richMediaAverageVideoViewTime',
                'dfa:richMediaCustomAverageTime',
                'dfa:richMediaInteractions',
                'dfa:richMediaVideoInteractionRate',
                'dfa:richMediaVideoViewRate',
                'dfa:transactionCount'));

$report->setFloodlightCriteria($criteria);

Which metric/dimension is not allowed? 

Joseph DiLallo (DFA API Team)

unread,
Jul 9, 2013, 11:19:12 AM7/9/13
to google-doubleclick-...@googlegroups.com
Greetings,

In your case, I believe it is the dfa:floodlightImpressions metric that is causing your problem. This metric is incompatible with most of the dimensions you have specified. You can find a list of the dimensions that you may combine this metric with in its help center page.

Two pieces of advice on this topic:
  1. In the DFA Reporting API version 1.3, we will be adding a way for you to find compatible dimensions/metrics via the API. This will be much easier to troubleshoot shortly. 
  2. In the meantime, I recommend that if you are unable to figure out which metric or dimension is the problem, use the Report Builder UI at google.com/analytics/dfa/. The Report Builder will grey out or remove the incompatible dimensions and metrics. You then know which one is the problem. If you're not sure WHY its a problem, check the help center, support.google.com/dfa/.
Cheers,
- Joseph DiLallo, the DFA API Team
Reply all
Reply to author
Forward
0 new messages