电子商务 - 经典分析电子商务数据层是否适用于通用分析



例如,以下标记...

dataLayer = [
    {
        'transactionId': 'placeholder-id',
        'transactionAffiliation': 'placeholder-affiliation',
        'transactionTotal': 'placeholder-total',

使用分析.js还是 Google 跟踪代码管理器配置?任何提供有关升级到通用分析新数据层的必要性的信息的资源都将非常有用。

谢谢。

不,它们是完全不同的。尝试搜索一下,您会发现很多待办事项,例如:https://developers.google.com/tag-manager/enhanced-ecommercehttp://merch.docs.magento.com/ee/user_guide/content/marketing/google-universal-analytics-enhanced-ecommerce.html

谷歌开发者的例子

dataLayer.push({
  'ecommerce': {
    'purchase': {
      'actionField': {
        'id': 'T12345',                         // Transaction ID. Required for purchases and refunds.
        'affiliation': 'Online Store',
        'revenue': '35.43',                     // Total transaction value (incl. tax and shipping)
        'tax':'4.90',
        'shipping': '5.99',
        'coupon': 'SUMMER_SALE'
      },
      'products': [{                            // List of productFieldObjects.
        'name': 'Triblend Android T-Shirt',     // Name or ID is required.
        'id': '12345',
        'price': '15.25',
        'brand': 'Google',
        'category': 'Apparel',
        'variant': 'Gray',
        'quantity': 1,
        'coupon': ''                            // Optional fields may be omitted or set to empty string.
       },
       {
        'name': 'Donut Friday Scented T-Shirt',
        'id': '67890',
        'price': '33.75',
        'brand': 'Google',
        'category': 'Apparel',
        'variant': 'Black',
        'quantity': 1
       }]
    }
  }
});

您指定的数据层虽然不完整,但适用于使用通用分析实现标准电子商务的 Google 跟踪代码管理器,但不适用于增强型电子商务。您可以参考此资源以获取更多信息:https://support.google.com/tagmanager/answer/3002596

请注意,数据层不是用户获取的一项功能,而是内置于 Google 跟踪代码管理器中。因此,使用 DL 进行分析跟踪不需要 UA 实施。

相关内容

最新更新