### AWS CLI Installation Output Example Source: https://developers.google.com/data-manager/api/devguides/concepts/encryption Example output demonstrating a successful AWS CLI installation. ```text aws-cli/2.31.12 Python/3.13.7 ... ``` -------------------------------- ### Send 'tutorial_begin' event using Data Manager API Source: https://developers.google.com/data-manager/api/reference/analytics/recommended-events This example demonstrates sending a 'tutorial_begin' event using the Data Manager API. This event signifies the start of an onboarding process and can be used in funnels with 'tutorial_complete'. ```json { "destinations": [ { "operatingAccount": { "accountType": "GOOGLE_ANALYTICS_PROPERTY", "accountId": "GOOGLE_ANALYTICS_PROPERTY_ID" }, "loginAccount": { "accountType": "GOOGLE_ANALYTICS_PROPERTY", "accountId": "GOOGLE_ANALYTICS_PROPERTY_ID" }, "productDestinationId": "MEASUREMENT_ID" } ], "events": [ { "eventName": "tutorial_begin", "eventTimestamp": "2025-06-10T23:42:33-05:00", "eventSource": "WEB", "clientId": "CLIENT_ID" } ] } ``` -------------------------------- ### Install Data Manager Go Client Library Source: https://developers.google.com/data-manager/api/devguides/quickstart/install-library Installs the latest version of the Data Manager Go client library using go get. ```bash go get cloud.google.com/go/datamanager/apiv1@latest ``` -------------------------------- ### List User Lists with Filtering and Pagination Source: https://developers.google.com/data-manager/api/reference/rest/v1/accountTypes.accounts.userLists/list Example of making a GET request to list user lists, demonstrating the use of query parameters for filtering by display name and for pagination. ```bash curl --header "Authorization: Bearer $(gcloud auth print-access-token)" --header "Accept: application/json" 'https://datamanager.googleapis.com/v1/accountTypes/PUBLISHER/accounts/123456789/userLists?filter=display_name=list1&pageSize=10&pageToken=token1' ``` -------------------------------- ### Sample Event with Experimental Fields and User Agent Source: https://developers.google.com/data-manager/api/devguides/events/send-events This example shows how to include experimental fields for campaign ID and session start time, along with the user agent in the landing page device info. Use this when JavaScript is not available for capturing session attributes. ```json { ..., "experimentalFields": [ { "field": "gad_campaignid", "value": "21288051566" }, { "field": "session_start_time_usec", "value": "1767711548052000" } ], "adIdentifiers": { "landingPageDeviceInfo": { "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36" } } } ``` -------------------------------- ### Install Sample Dependencies Source: https://developers.google.com/data-manager/api/devguides/quickstart/install-library Install the necessary dependencies to run the code samples included with the Data Manager library. ```bash pip install .[samples] ``` -------------------------------- ### HTTP Request Example Source: https://developers.google.com/data-manager/api/reference/rest/v1/accountTypes.accounts.userLists/list This is the base HTTP GET request to list user lists for a parent account. It uses gRPC Transcoding syntax. ```http GET https://datamanager.googleapis.com/v1/{parent=accountTypes/*/accounts/*}/userLists ``` -------------------------------- ### Install the Utility Library Source: https://developers.google.com/data-manager/api/devguides/quickstart/install-library Install the Data Manager utility library into your Python environment using pip. ```bash pip install . ``` -------------------------------- ### View Promotion Event Example Source: https://developers.google.com/data-manager/api/reference/analytics/recommended-events This example demonstrates how to send a 'view_promotion' event using the Data Manager API. It includes event-level parameters and item-specific details. ```json { "destinations": [ { "operatingAccount": { "accountType": "GOOGLE_ANALYTICS_PROPERTY", "accountId": "GOOGLE_ANALYTICS_PROPERTY_ID" }, "loginAccount": { "accountType": "GOOGLE_ANALYTICS_PROPERTY", "accountId": "GOOGLE_ANALYTICS_PROPERTY_ID" }, "productDestinationId": "MEASUREMENT_ID" } ], "events": [ { "eventName": "view_promotion", "eventTimestamp": "2025-06-10T23:42:33-05:00", "eventSource": "WEB", "clientId": "CLIENT_ID", "userId": "USER_ID", "additionalEventParameters": [ { "parameterName": "creative_name", "value": "Summer Banner" }, { "parameterName": "creative_slot", "value": "featured_app_1" }, { "parameterName": "promotion_id", "value": "P_12345" }, { "parameterName": "promotion_name", "value": "Summer Sale" } ], "cartData": { "items": [ { "itemId": "SKU_12345", "quantity": 1, "unitPrice": 29.99, "additionalItemParameters": [ { "parameterName": "item_name", "value": "Triblend Android T-Shirt" } ] } ] } } ] } ``` -------------------------------- ### Request Body Example (JSON) Source: https://developers.google.com/data-manager/api/reference/rest/v1/accountTypes.accounts.partnerLinks/create An example of the JSON request body for creating a partner link. This structure should be populated with the `PartnerLink` resource details. ```json { Add request body parameters } ``` -------------------------------- ### Get Help for Data Manager .NET Sample Source: https://developers.google.com/data-manager/api/devguides/quickstart/install-library Prints the usage statement for a specific Data Manager .NET sample, such as 'ingest-audience-members'. ```bash dotnet run -- ingest-audience-members --help ``` -------------------------------- ### UserListDirectLicense Request Body Example Source: https://developers.google.com/data-manager/api/reference/rest/v1/accountTypes.accounts.userListDirectLicenses/create An example of the request body structure for creating a user list direct license. This JSON object should contain the necessary parameters for the license creation. ```JSON { Add request body parameters } ``` -------------------------------- ### PHP Autoloader Setup Source: https://developers.google.com/data-manager/api/devguides/audiences/send-audience-members?hl=it Includes the Composer autoloader for PHP scripts. This is a standard setup for using Composer-managed libraries. ```php ';   fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, { method: "POST", body: JSON.stringify({ "client_id": "client_id", "events": [{ "name": "tutorial_begin" }] }) }); ``` -------------------------------- ### Run Node.js Data Manager Sample Source: https://developers.google.com/data-manager/api/devguides/quickstart/install-library Execute a Node.js Data Manager sample from the command line using npm run, passing arguments like --help. ```bash npm run ingest-audience-members -w samples -- --help ``` -------------------------------- ### Manager Partner Link Scenario for Google Ads Source: https://developers.google.com/data-manager/api/devguides/concepts/destinations Example IngestionResource configuration for a data partner sending audience data to a Google Ads client account through a manager partner link. This setup requires specifying operating, login, and linked accounts along with the product destination ID. ```json { "destinations": [ { "operatingAccount": { "accountId": "C2_CUSTOMER_ID", "accountType": "GOOGLE_ADS" }, "loginAccount": { "accountId": "D1_CUSTOMER_ID", "accountType": "DATA_PARTNER" }, "linkedAccount": { "accountId": "M2_CUSTOMER_ID", "accountType": "GOOGLE_ADS" }, "productDestinationId": "USER_LIST_ID" } ] } ``` -------------------------------- ### Verify AWS CLI Installation Source: https://developers.google.com/data-manager/api/devguides/concepts/encryption Checks the installed version of the AWS Command Line Interface. This is a verification step after installation. ```bash aws --version ``` -------------------------------- ### Send tutorial_complete event using Measurement Protocol Source: https://developers.google.com/data-manager/api/reference/analytics/recommended-events This JavaScript snippet shows how to send a tutorial_complete event using the Measurement Protocol. It's useful for tracking onboarding completion. ```javascript const measurementId = 'G-XXXXXXXXXX'; const apiSecret = '';   fetch(`https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}`, { method: "POST", body: JSON.stringify({ "client_id": "client_id", "events": [{ "name": "tutorial_complete" }] }) }); ``` -------------------------------- ### get Source: https://developers.google.com/data-manager/api/reference/rest/v1/accountTypes.accounts.userLists Gets a UserList. This operation retrieves the details of a specific UserList. ```APIDOC ## get ### Description Gets a UserList. ### Method GET ### Endpoint /v1/accountTypes/accounts/{name} ### Parameters #### Path Parameters - **name** (string) - Required - The name of the UserList to retrieve. ``` -------------------------------- ### Install Node.js Dependencies Source: https://developers.google.com/data-manager/api/devguides/quickstart/install-library Install project dependencies for the Node.js Data Manager library. ```bash npm install ``` -------------------------------- ### Log in with user account credentials, Data Manager, and Display & Video 360 API scopes Source: https://developers.google.com/data-manager/api/devguides/quickstart/set-up-access Include the Display & Video 360 API scope along with the Data Manager and Cloud Platform scopes if you need to use the same credentials for both APIs. Replace `PATH_TO_CLIENT_JSON` with the path to your downloaded client configuration file. ```bash gcloud auth application-default login \ --scopes="https://www.googleapis.com/auth/datamanager,https://www.googleapis.com/auth/display-video,https://www.googleapis.com/auth/cloud-platform" \ --client-id-file="PATH_TO_CLIENT_JSON" ``` -------------------------------- ### Run Java Data Manager Sample Source: https://developers.google.com/data-manager/api/devguides/quickstart/install-library Execute a Data Manager sample from the command line using the Gradle run task, passing arguments like --help. ```bash ./gradlew data-manager-samples:run \ --args='IngestAudienceMembers --help' ``` -------------------------------- ### Run Data Manager .NET Samples Source: https://developers.google.com/data-manager/api/devguides/quickstart/install-library Executes available samples from the Data Manager .NET samples directory. ```bash dotnet run ``` -------------------------------- ### Status Type Details Field Example Source: https://developers.google.com/data-manager/api/reference/rest/v1/Status An example of an object within the 'details' field, including a URI identifying its type. ```json { "id": 1234, "@type": "types.example.com/standard/id" } ``` -------------------------------- ### Install Java Data Manager Utility Library Locally Source: https://developers.google.com/data-manager/api/devguides/quickstart/install-library Build and publish the Java Data Manager utility library to your local Maven repository. ```bash ./gradlew data-manager-util:install ``` -------------------------------- ### Print access token for user account credentials Source: https://developers.google.com/data-manager/api/devguides/quickstart/set-up-access Verify that your credentials are set up correctly by running this command, which prints an access token to the console if successful. ```bash gcloud auth application-default print-access-token ``` -------------------------------- ### Set up Application Default Credentials with Display & Video 360 API scope Source: https://developers.google.com/data-manager/api/devguides/quickstart/set-up-access Use this command to set up Application Default Credentials (ADC) that include scopes for both the Data Manager API and the Display & Video 360 API. Ensure the service account has the Service Account Token Creator role. ```bash gcloud auth application-default login \ --impersonate-service-account=SERVICE_ACCOUNT_EMAIL \ --scopes="https://www.googleapis.com/auth/datamanager,https://www.googleapis.com/auth/display-video,https://www.googleapis.com/auth/cloud-platform" ``` -------------------------------- ### Remove from Cart Event Example Source: https://developers.google.com/data-manager/api/reference/analytics/recommended-events This example demonstrates how to send a 'remove_from_cart' event using the Data Manager API. It includes item details such as ID, quantity, unit price, and additional parameters like item name. ```json { "destinations": [ { "operatingAccount": { "accountType": "GOOGLE_ANALYTICS_PROPERTY", "accountId": "GOOGLE_ANALYTICS_PROPERTY_ID" }, "loginAccount": { "accountType": "GOOGLE_ANALYTICS_PROPERTY", "accountId": "GOOGLE_ANALYTICS_PROPERTY_ID" }, "productDestinationId": "MEASUREMENT_ID" } ], "events": [ { "eventName": "remove_from_cart", "conversionValue": 30.03, "currency": "USD", "eventTimestamp": "2025-06-10T23:42:33-05:00", "eventSource": "WEB", "clientId": "CLIENT_ID", "userId": "USER_ID", "cartData": { "items": [ { "itemId": "SKU_12345", "quantity": 1, "unitPrice": 29.99, "additionalItemParameters": [ { "parameterName": "item_name", "value": "Triblend Android T-Shirt" } ] } ] } } ] } ``` -------------------------------- ### Add to Wishlist Event Example Source: https://developers.google.com/data-manager/api/reference/analytics/recommended-events This example demonstrates how to send an 'add_to_wishlist' event using the Data Manager API. It includes essential event details and item parameters such as itemId, quantity, unitPrice, and additional parameters like item_name. ```json { "destinations": [ { "operatingAccount": { "accountType": "GOOGLE_ANALYTICS_PROPERTY", "accountId": "GOOGLE_ANALYTICS_PROPERTY_ID" }, "loginAccount": { "accountType": "GOOGLE_ANALYTICS_PROPERTY", "accountId": "GOOGLE_ANALYTICS_PROPERTY_ID" }, "productDestinationId": "MEASUREMENT_ID" } ], "events": [ { "eventName": "add_to_wishlist", "conversionValue": 30.03, "currency": "USD", "eventTimestamp": "2025-06-10T23:42:33-05:00", "eventSource": "WEB", "clientId": "CLIENT_ID", "userId": "USER_ID", "cartData": { "items": [ { "itemId": "SKU_12345", "quantity": 1, "unitPrice": 29.99, "additionalItemParameters": [ { "parameterName": "item_name", "value": "Triblend Android T-Shirt" } ] } ] } } ] } ``` -------------------------------- ### v1.accountTypes.accounts.userListDirectLicenses.create Source: https://developers.google.com/data-manager/api/reference/rest Creates a user list direct license. ```APIDOC ## POST /v1/{parent=accountTypes/*/accounts/*}/userListDirectLicenses ### Description Creates a user list direct license. ### Method POST ### Endpoint /v1/{parent=accountTypes/*/accounts/*}/userListDirectLicenses ``` -------------------------------- ### RetrieveRequestStatus Source: https://developers.google.com/data-manager/api/reference/rpc Gets the status of a request given request id. ```APIDOC ## RetrieveRequestStatus ### Description Gets the status of a request given request id. ### Method (Not specified, assumed RPC) ### Endpoint (Not specified, assumed RPC) ### Parameters (Not specified) ### Request Example (Not specified) ### Response (Not specified) ``` -------------------------------- ### Install and Use Data Manager API Client Library (Bash) Source: https://developers.google.com/data-manager/api/devguides/quickstart/install-library This script uses gcloud to obtain an access token and then sends a POST request to the Data Manager API to ingest audience members. It includes error handling for token retrieval and verifies the Data Manager API scope. ```bash #!/bin/bash # Uses gcloud to get an access token. If the Application Default # Credentials aren't for a service account then the command that # specifies --scopes fails, so this sample falls back to the command # without the --scopes argument. DATA_MANAGER_ACCESS_TOKEN="$(gcloud auth application-default print-access-token --scopes=https://www.googleapis.com/auth/datamanager || \ gcloud auth application-default print-access-token)" # Fetches and prints the scope information for the access token. If you # get scope-related errors when you send the request in the next step, # verify that this output includes the Data Manager API scope: # https://www.googleapis.com/auth/datamanager curl https://www.googleapis.com/oauth2/v1/tokeninfo?access_token="${DATA_MANAGER_ACCESS_TOKEN}" # Sends the request. curl -X POST "https://datamanager.googleapis.com/v1/audienceMembers:ingest" \ --header "Authorization: Bearer ${DATA_MANAGER_ACCESS_TOKEN}" \ --header "x-goog-user-project: PROJECT_ID" \ --header "Content-Type: application/json" \ --data @- <