gpt4 book ai didi

ios - GoogleTagManager 警告 : Unexpected type in Builder: (null)

转载 作者:可可西里 更新时间:2023-11-01 04:45:50 26 4
gpt4 key购买 nike

我正在使用 GoogleTagManager 来实现增强型电子商务 (Google Analytics)我尝试将以下数据层推送到 GTM。

 [dataLayer push:@{@"event",@"purchase",
@"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 跟踪代码管理器教程中的示例数据。但是,当我尝试向 Google 发送匹配时收到以下警告消息。

GoogleTagManager warning: Unexpected type in Builder: (null)

我使用的数据类型是 NSNumber (price[doube],revenue[double] & quantity[int]) & NSString for others.

上述数据类型适用于其他电子商务标签,如“AddToCart”、“Checkout”等。但是“Purchase”不起作用。

任何人都可以建议还可以尝试什么吗?

最佳答案

我前段时间遇到了这个问题。在我看来,这与之前的电子商务内容有冲突。

在发送购买事件之前,尝试清除电子商务对象

[self.tagDataLayer push:@{@"ecommerce":[NSNull null]}];

这对我很有效

关于ios - GoogleTagManager 警告 : Unexpected type in Builder: (null),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30615168/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com