2

I am using adsense Management API and followed everything there to generate a demo report as it is described in the example on their site. The information I am currently fetching uses this information :

    $startDate = '2012-03-01';
    $endDate = '2012-04-18';
    $optParams = array(
      'filter' => array(
        'AD_CLIENT_ID==' . $adClientId
      ),
      'metric' => array(                    
        'CLICKS', 'PAGE_VIEWS','COST_PER_CLICK','EARNINGS'                  
      ),
      'dimension' => array('DATE'),
      'sort' => 'DATE'
    );

What I have to ask is is it possible to arrange this data according to the channels So that I get channel-wise information on EARNING, COST_PER_CLICK and PAGE_VIEWS. And how?

Sérgio Gomes
  • 720
  • 5
  • 14
ShayanK
  • 1,243
  • 2
  • 13
  • 27

1 Answers1

1

Assuming you're talking about custom channels, all you have to do is add one of the following to your list of dimensions, depending on what you prefer:

  • CUSTOM_CHANNEL_NAME
  • CUSTOM_CHANNEL_ID
  • CUSTOM_CHANNEL_CODE

You can think of dimensions as groups, that is, what you're organising your data by.

You can check this blog post for some more info.

Sérgio Gomes
  • 720
  • 5
  • 14