如何 copy/export 需要的 GA4 事件从一个 属性 到另一个

How to copy/export required GA4 events from one property to another

我创建了一个 GA4 属性 (属性-1),我们 partner/vendor 团队中的一个创建了另一个 GA4 属性 (属性-2 ).当我们启动供应商页面时,事件将通过 属性-2.

进行跟踪

有什么方法可以在不手动的情况下将 few/specific 事件从 属性-2 复制到 属性-1。 我们正在考虑从 bigquery 链接手动将 属性-2 事件导出到 CSV。然后将事件 csv 导入 属性-1,这似乎是手动过程而不是可行的解决方案。

您可以使用 google analytics data api 从每个 属性 中提取。

POST https://analyticsdata.googleapis.com/v1beta/properties/GA4_PROPERTY_ID:runReport
  {
    "dateRanges": [{ "startDate": "2020-09-01", "endDate": "2020-09-15" }],
    "dimensions": [{ "name": "country" }],
    "metrics": [{ "name": "activeUsers" }]
  }

此数据以 Json 格式提取,因此您需要根据需要对其进行格式化以便进行分析。

{
  "dimensionHeaders": [
    {
      "name": "country"
    }
  ],
  "metricHeaders": [
    {
      "name": "activeUsers",
      "type": "TYPE_INTEGER"
    }
  ],
  "rows": [
    {
      "dimensionValues": [
        {
          "value": "Japan"
        }
      ],
      "metricValues": [
        {
          "value": "2541"
        }
      ]
    },
    {
      "dimensionValues": [
        {
          "value": "France"
        }
      ],
      "metricValues": [
        {
          "value": "12"
        }
      ]
    }
  ],
  "metadata": {},
  "rowCount": 2
}

注意:在撰写本文时,Google 分析数据 api 仍处于测试阶段。并且以后可能会改变。

This is a Beta version of the product. While no breaking changes are expected in this phase, pre-GA products may have limited support, and changes to pre-GA products may not be compatible with other pre-GA versions.