Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added AdsDataManager/metadata/V1/AgeRange.php
Binary file not shown.
Binary file modified AdsDataManager/metadata/V1/Audience.php
Binary file not shown.
Binary file modified AdsDataManager/metadata/V1/Destination.php
Binary file not shown.
Binary file modified AdsDataManager/metadata/V1/Error.php
Binary file not shown.
Binary file modified AdsDataManager/metadata/V1/Event.php
Binary file not shown.
Binary file added AdsDataManager/metadata/V1/Gender.php
Binary file not shown.
Binary file added AdsDataManager/metadata/V1/InsightsService.php
Binary file not shown.
58 changes: 58 additions & 0 deletions AdsDataManager/metadata/V1/PartnerLinkService.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified AdsDataManager/metadata/V1/RequestStatusPerDestination.php
Binary file not shown.
Binary file added AdsDataManager/metadata/V1/UserList.php
Binary file not shown.
Binary file not shown.
56 changes: 56 additions & 0 deletions AdsDataManager/metadata/V1/UserListDirectLicenseService.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
66 changes: 66 additions & 0 deletions AdsDataManager/metadata/V1/UserListGlobalLicenseService.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
35 changes: 35 additions & 0 deletions AdsDataManager/metadata/V1/UserListLicenseMetrics.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
65 changes: 65 additions & 0 deletions AdsDataManager/metadata/V1/UserListService.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?php
/*
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/*
* GENERATED CODE WARNING
* This file was automatically generated - do not edit!
*/

require_once __DIR__ . '/../../../vendor/autoload.php';

// [START datamanager_v1_generated_MarketingDataInsightsService_RetrieveInsights_sync]
use Google\Ads\DataManager\V1\Baseline;
use Google\Ads\DataManager\V1\Client\MarketingDataInsightsServiceClient;
use Google\Ads\DataManager\V1\RetrieveInsightsRequest;
use Google\Ads\DataManager\V1\RetrieveInsightsResponse;
use Google\ApiCore\ApiException;

/**
* Retrieves marketing data insights for a given user list.
*
* This feature is only available to data partners.
*
* Authorization Headers:
*
* This method supports the following optional headers to define how the API
* authorizes access for the request:
*
* * `login-account`: (Optional) The resource name of the account where the
* Google Account of the credentials is a user. If not set, defaults to the
* account of the request. Format:
* `accountTypes/{loginAccountType}/accounts/{loginAccountId}`
* * `linked-account`: (Optional) The resource name of the account with an
* established product link to the `login-account`. Format:
* `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}`
*
* @param string $parent The parent account that owns the user list.
* Format: `accountTypes/{account_type}/accounts/{account}`
* @param string $userListId The user list ID for which insights are requested.
*/
function retrieve_insights_sample(string $parent, string $userListId): void
{
// Create a client.
$marketingDataInsightsServiceClient = new MarketingDataInsightsServiceClient();

// Prepare the request message.
$baseline = new Baseline();
$request = (new RetrieveInsightsRequest())
->setParent($parent)
->setBaseline($baseline)
->setUserListId($userListId);

// Call the API and handle any network failures.
try {
/** @var RetrieveInsightsResponse $response */
$response = $marketingDataInsightsServiceClient->retrieveInsights($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}

/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$parent = '[PARENT]';
$userListId = '[USER_LIST_ID]';

retrieve_insights_sample($parent, $userListId);
}
// [END datamanager_v1_generated_MarketingDataInsightsService_RetrieveInsights_sync]
Loading
Loading