Method: organizations.analyticsAccountLinks.create
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eCreates a link between a Google Analytics account and a Google Marketing Platform organization.\u003c/p\u003e\n"],["\u003cp\u003eRequires the user to be an organization user and an admin on the Google Analytics account.\u003c/p\u003e\n"],["\u003cp\u003eIf the account is already linked, it needs to be unlinked before creating a new link.\u003c/p\u003e\n"],["\u003cp\u003eUses an HTTP POST request to create the link with specified parameters and request body.\u003c/p\u003e\n"],["\u003cp\u003eNeeds \u003ccode\u003ehttps://www.googleapis.com/auth/marketingplatformadmin.analytics.update\u003c/code\u003e authorization scope.\u003c/p\u003e\n"]]],["This outlines linking an Analytics account to a Google Marketing Platform organization. A user, with org membership and Analytics admin privileges, can link accounts via a `POST` request to `organizations/*/analyticsAccountLinks`. The request requires the organization ID as a path parameter. The request and response bodies use the `AnalyticsAccountLink` format. If the Analytics account is currently linked, it must be unlinked first. This action also requires the `marketingplatformadmin.analytics.update` authorization scope.\n"],null,["# Method: organizations.analyticsAccountLinks.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nCreates the link between the Analytics account and the Google Marketing Platform organization.\n\nUser needs to be an org user, and admin on the Analytics account to create the link. If the account is already linked to an organization, user needs to unlink the account from the current organization, then try link again.\n\n### HTTP request\n\n`POST https://marketingplatformadmin.googleapis.com/v1alpha/{parent=organizations/*}/analyticsAccountLinks`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|--------------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. The parent resource where this Analytics account link will be created. Format: organizations/{org_id} |\n\n### Request body\n\nThe request body contains an instance of [AnalyticsAccountLink](/marketing-platform/devguides/api/admin/v1/rest/v1alpha/organizations.analyticsAccountLinks#AnalyticsAccountLink).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [AnalyticsAccountLink](/marketing-platform/devguides/api/admin/v1/rest/v1alpha/organizations.analyticsAccountLinks#AnalyticsAccountLink).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/marketingplatformadmin.analytics.update`"]]