user14877012
user14877012

Reputation:

Google Analytics Not listing all web properties

When using google analytics core reporting api i am unable to get all properties of an account some properties are missing and all are those which has no view in analytics dashboard of google here is my code

$data=[];$id = "abc1234";
    $properties = $this->analytics->management_webproperties
        ->listManagementWebproperties("~all")->getItems();
    foreach ($properties as $user) {
        $data[$user->getId()] = ['id' => $user->getId(), 'name' => $user->getName()];
    }
    return collect(array_values($data));

please tell me if i miss something or not using latest version of api i am using V4. please help me. Thanks

Upvotes: 3

Views: 1143

Answers (1)

Michele Pisani
Michele Pisani

Reputation: 14179

The APIs you are using are for the Google Analytics Universal version, while the properties that 'don't have a view' are from Google Analytics 4 (the new Google Analytics, ex App+Web).

This version of Google Analytics offers its API specifications (Analytics Data API), you can see here an early preview version: https://developers.google.com/analytics/devguides/reporting/data/v1

Upvotes: 3

Related Questions