Google Analytics SEO – PHP API

I have a PHP file which give’s me google analytics data, such as pageviews, Top Pages, or Organic Data simple stuff.

Now I neet to get Stuff from the SEO Part.

For example: TOP 50 Search Keywords (with Impression and Clicks)

I can’t find any help in the API how to get these values.

this is a example of my api call:

$params = array(
    'dimensions' => array('date', 'pagePath', 'pageTitle'),
    'metrics' => array('sessions', 'pageviews'),
    'sort' => '-ga:sessions',
    'filters' => null,
    'startdate' => $startdate,
    'enddate' => $enddate,
    'startindex' => null,
    'limit' => 25,
    'mapping' => array('pagepath' => 'pagepath', 'pagetitle' => 'pagetitle', 'sessions' => 'visits', 'pageviews' => 'pageviews'),
);

$results = $this->service->data_ga->get($this->profile, $params['startdate'], $params['enddate'], $metrics, $optParams);

Any Help on this?

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s