Skip to content

Commit

Permalink
Merge pull request #30 from SahAssar/master
Browse files Browse the repository at this point in the history
Fix when we have more than 1000 profiles
  • Loading branch information
bobdenotter authored Apr 20, 2017
2 parents 420b65d + ad3f509 commit 576f82f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Handler/GoogleAnalyticsHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,12 @@ public function getProfileID() {

// Get the list of profiles for the authorized user.
$profiles = $this->getAnalytics()->management_profiles->listManagementProfiles("~all", "~all");


// If the service account has access to more than 1000 profiles
if (count($profiles->getItems()) > 999) {
return $specified_profile_id;
}

//Verify user has profiles
if (count($profiles->getItems()) > 0) {

Expand Down

0 comments on commit 576f82f

Please sign in to comment.