I had previously had this module working correctly but now I have the following error appearing with both the API config and also the reports. In addition the views are no longer present.

Any pointers would be most welcome.

Undefined property: stdClass::$defaultPage in google_analytics_api_admin() (line 55 of /sites/all/modules/google_analytics_reports/google_analytics_api.pages.inc).


I can confirm this too

I too am getting:

Notice: Undefined property: stdClass::$defaultPage in google_analytics_api_admin() (line 55 of /.../sites/all/modules/google_analytics_reports/google_analytics_api.pages.inc).

On google_analytics_api.pages.inc, line 55, it is assumed the optional 'Default Page' setting has a value (to edit this setting go to google.com/analytics, click on Admin, select account, select property, select profile, and click on the Profile Settings tab).

Perhaps the existence of $current_profile->defaultPage should be checked before being used in variable_set.

Hi, I don't understand what you mean by this. You are saying alter which setting within GA?

Total guesss: maybe they're saying you should just go to that GA Profile Settings tab and just save it, so it creates a value.

Not sure it makes sense to check for a default page.

The default page value in GA is for sites that have an "index.php" page which can be accessed separately from the root of the site (and, potentially, index and tracked as a separate page).

On all of my sites, the home page identified in Site Configuration is always 301 redirected to /, so it seems unnecessary to provide a default page in the GA profile settings.

This does a check for the default page and if not found, sets it to "/".

/* Load current profile object */
foreach ($profiles as $profile) {
      if (
$profile->id == $profile_id) {
$current_profile = $profile;
$page = isset($current_profile->defaultPage) ? $current_profile->defaultPage : '/';
variable_set('google_analytics_reports_default_page', $page);

Can confirm this is still popping up using the latest dev versions of the module from September 30.

Any suggestions?

Issue summary:View changes


Has this been resolved, i'm currently facing the same issue.

I'm also seeing it on my site.

To the current maintainer, can you please suggest how to fix this. It's been 3 months since my last request and others are getting this as well.

Many thanks for your time.

I have the same problem as well. Any help would be very appreciated!