Goran Jakovljevic
Goran Jakovljevic

Reputation: 2820

Google analytics API - page creation date

Is it possible to get page creation date which would most probably be when it had first visit, via google analytics API ? So i am looking at the date page had first visit, but maybe there is some option in API which i overlooked.

function getResults(&$analytics, $profileId) {
  return $analytics->data_ga->get(
      'ga:' . $profileId,
      '15daysAgo',
      'today',
      'ga:pageviews',
      array(
        'dimensions'  => 'ga:pagePath,ga:pageTitle', 
        'metrics' => 'ga:pageviews,ga:uniquePageviews,ga:socialInteractions',
        'sort'  => '-ga:pageviews',
        'max-results' => '25'
      ));
}

Upvotes: 2

Views: 1619

Answers (1)

Eike Pierstorff
Eike Pierstorff

Reputation: 32780

No. Best you can do is to select the date and then see the first visit in your selected timeframe. So you'd have to select a very long timeframe, or do multiple consecutive queries until the pages does not show up anymore.

In cases where this is really important you'd probably create two hit level scoped dimensions for create- and last modified dates and send them along with every pageview. If you have the create date recorded somewhere (i.e. if these are pages from a CMS solution) you can use the data import feature and the date (as a custom dimension that you need to create first) will be applied to all newly incoming hits (you cannot modify existing data).

Upvotes: 1

Related Questions