class ManagementGoals extends Resource (View source)

The "goals" collection of methods.

Typical usage is:

 $analyticsService = new Google\Service\Analytics(...);
 $goals = $analyticsService->management_goals;

Methods

get(string $accountId, string $webPropertyId, string $profileId, string $goalId, array $optParams = [])

Gets a goal to which the user has access. (goals.get)

insert(string $accountId, string $webPropertyId, string $profileId, Goal $postBody, array $optParams = [])

Create a new goal. (goals.insert)

listManagementGoals(string $accountId, string $webPropertyId, string $profileId, array $optParams = [])

Lists goals to which the user has access. (goals.listManagementGoals)

patch(string $accountId, string $webPropertyId, string $profileId, string $goalId, Goal $postBody, array $optParams = [])

Updates an existing goal. This method supports patch semantics. (goals.patch)

update(string $accountId, string $webPropertyId, string $profileId, string $goalId, Goal $postBody, array $optParams = [])

Updates an existing goal. (goals.update)

Details

Goal get(string $accountId, string $webPropertyId, string $profileId, string $goalId, array $optParams = [])

Gets a goal to which the user has access. (goals.get)

Parameters

string $accountId

Account ID to retrieve the goal for.

string $webPropertyId

Web property ID to retrieve the goal for.

string $profileId

View (Profile) ID to retrieve the goal for.

string $goalId

Goal ID to retrieve the goal for.

array $optParams

Optional parameters.

Return Value

Goal

Exceptions

Exception

Goal insert(string $accountId, string $webPropertyId, string $profileId, Goal $postBody, array $optParams = [])

Create a new goal. (goals.insert)

Parameters

string $accountId

Account ID to create the goal for.

string $webPropertyId

Web property ID to create the goal for.

string $profileId

View (Profile) ID to create the goal for.

Goal $postBody
array $optParams

Optional parameters.

Return Value

Goal

Exceptions

Exception

Goals listManagementGoals(string $accountId, string $webPropertyId, string $profileId, array $optParams = [])

Lists goals to which the user has access. (goals.listManagementGoals)

Parameters

string $accountId

Account ID to retrieve goals for. Can either be a specific account ID or '~all', which refers to all the accounts that user has access to.

string $webPropertyId

Web property ID to retrieve goals for. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to.

string $profileId

View (Profile) ID to retrieve goals for. Can either be a specific view (profile) ID or '~all', which refers to all the views (profiles) that user has access to.

array $optParams

Optional parameters.

Return Value

Goals

Exceptions

Exception

Goal patch(string $accountId, string $webPropertyId, string $profileId, string $goalId, Goal $postBody, array $optParams = [])

Updates an existing goal. This method supports patch semantics. (goals.patch)

Parameters

string $accountId

Account ID to update the goal.

string $webPropertyId

Web property ID to update the goal.

string $profileId

View (Profile) ID to update the goal.

string $goalId

Index of the goal to be updated.

Goal $postBody
array $optParams

Optional parameters.

Return Value

Goal

Exceptions

Exception

Goal update(string $accountId, string $webPropertyId, string $profileId, string $goalId, Goal $postBody, array $optParams = [])

Updates an existing goal. (goals.update)

Parameters

string $accountId

Account ID to update the goal.

string $webPropertyId

Web property ID to update the goal.

string $profileId

View (Profile) ID to update the goal.

string $goalId

Index of the goal to be updated.

Goal $postBody
array $optParams

Optional parameters.

Return Value

Goal

Exceptions

Exception