【问题标题】:GA4 purchase event revenue not matching order valueGA4 购买活动收入与订单价值不符
【发布时间】:2022-12-15 16:09:39
【问题描述】:

shopify 购买的购买事件显示收入值接近但与购买价值不匹配。事件值似乎是正确的,但电子商务收入似乎正在少量改变该值。

关于修复的任何想法?

60 事件值是应该的。

数据层购买事件:

 /** DATALAYER: Checkout on Shopify Plus **/
        if(Shopify.Checkout){
            var ecommerce = {
                'transaction_id': '{{checkout.order_number  | json}}',
                'affiliation': {{shop.name | json}},
                'value': {{checkout.total_price | money_without_currency | replace: ',', '.' | json}},
                'tax': {{checkout.tax_price | money_without_currency | replace: ',','.' | json}},
                'shipping': {{checkout.shipping_price | money_without_currency | replace: ',','.' | json}},
                'subtotal': {{checkout.subtotal_price | money_without_currency| replace: ',','.' | json}},
                'currency': {{checkout.currency | json}},
                {% for discount in checkout.discounts %}
                'coupon': {{discount.code | json}},
                'discount'  : {{discount.amount | money_without_currency | json}},
                {% endfor %}
                'email': {{checkout.email | json}},
                'items':[{% for line_item in checkout.line_items %}{
                    'item_id'         : '{{line_item.product.id | json}}',                  
                    'item_variant'    : {{line_item.variant.title | json}},             
                    'item_name'       : {{line_item.product.title | json}},
                    'price'           : {{line_item.product.price | money_without_currency | replace: ',', '.' | json}},
                    'item_brand'      : {{line_item.product.vendor | json}},
                    'item_category'   : {{line_item.product.type | json}},
                    'item_list_name'  : {{line_item.collection.title | json}},
                    'quantity'        : {{line_item.quantity | json}},
                    'discount'        : {{discount.code | json}}
                    },{% endfor %}],
                };
            if(Shopify.Checkout.step){ 
                if(Shopify.Checkout.step.length > 0){
                    if (Shopify.Checkout.step === 'contact_information'){
                        dataLayer.push({
                            'event'    :'begin_checkout',
                            'pageType' :'Customer Information',
                            'step': 1,
                            ecommerce
                        });
                    }else if (Shopify.Checkout.step === 'shipping_method'){
                        dataLayer.push({
                            'event'    :'add_shipping_info',
                            'pageType' :'Shipping Information',
                            ecommerce
                        });
                    }else if( Shopify.Checkout.step === "payment_method" ){
                        dataLayer.push({
                            'event'    :'add_payment_info',
                            'pageType' :'Add Payment Info',
                            ecommerce
                        });
                    }
                }
                            
                /** DATALAYER: Transaction */
                if(Shopify.Checkout.page == "thank_you"){
                    dataLayer.push({
                    'pageType' :'Transaction',
                    'event'    :'purchase',
                    ecommerce
                    });
                }               
            }
        }

我已经在标签助手中进行了测试,订单上的值与数据层中的预期一致。 但是使用 GA4 中的电子商务指标,有些东西正在稍微改变这些值。 GA4、dataLayer 和 shopify 中的货币匹配。

认为这可能与此有关:

{{checkout.total_price | money_without_currency | replace: ',', '.' | json}}

任何帮助或资源表示赞赏!

【问题讨论】:

    标签: shopify google-analytics-4 google-datalayer data-layers


    【解决方案1】:

    根据https://support.google.com/analytics/answer/9796179?hl=en#zippy=%2Cin-this-article

    即使您的财产或景观的货币设置设置为与您的当地货币相匹配,Analytics 在处理非美元货币的命中时执行转换,并在每次生成报告时对该数字执行新转换.由于每日汇率的波动,这可能会导致您的本地货币报告出现非常小的差异。

    【讨论】:

      猜你喜欢
      • 2022-06-21
      • 2022-11-09
      • 2013-12-21
      • 2020-03-11
      • 2022-09-28
      • 2017-03-24
      • 2021-06-17
      • 1970-01-01
      • 2022-12-02
      相关资源
      最近更新 更多