Google Ads - Shopify - B2C 增强型转化 - 精准记录您的订单数和订单金额
【前言】
随着欧美地区隐私政策越来越严格,做独立站的小伙伴也越来越难抓取到实际下单客户的cookie,导致Google Ads记录到的转化远比实际的低,那当你在向老板汇报的时候,岂不是少了许多你的功劳,损失一个亿。又或者你自己就是老板,在做渠道归因的时候也无法做出最准确的判断,本文介绍的【增强型转化】就能帮助你轻松解决此类问题。
也贴一张增强型转化和普通转化的对比图,半年时间漏记123个订单,漏记率将近18%。
转化对比图
本文以shopify为例,结合图文,共分【Ads 部分】【GTM 部分】【Shopify 部分】【代码验证】【转化检查】5个操作步骤,按步骤逐一设置,小白也能轻松安装增强型转化。
【准备工作】
网站上能正常检测到GA4与GTM代码。
注意GA4代码通过shopify插件安装后,GTM内不用再安装GA4全局代码,防止重复记录。
Shopify需要下测试订单,使用【货到付款】就可以。
1. Ads部分
按以下步骤新建转化
2. GTM部分:
只需设置一个转化链接器,如下所示
3. Shopify部分
将以下代码段安装在shopify后台,位置为:【设置】-【结账】-【订单状态页面】-【自定义脚本】,标红处为需要修改的变量(上文中记录的转化变量)
{% assign fa_send_to = '
AW-108161XXXXX/rAVqCKv5qJ0YEOTXXXXX' %}
{% assign fa_include_tax_and_shipping = 'no' %}
{% comment %}DO NOT EDIT BELOW{% endcomment %}
{% if fa_google_coding %}{% assign fa_google_coding = true %}{%- else -%}{% assign fa_google_coding = false %}{%- endif
-%}
{% if fa_include_tax_and_shipping == 'no' %}
{% assign fa_checkout_price = checkout.total_price | divided_by: 100.0 %}
{%- else -%}
{% assign fa_checkout_price = checkout.subtotal_price | divided_by: 100.0 %}
{%- endif -%}
{% assign fa_google_ids = fa_send_to | split: "/" %}
{% if fa_google_coding == false %}
<script async src="https://www.googletagmanager.com/gtag/js?id={{fa_google_ids[0]}}"></script>
{%- endif -%}
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', '{{fa_google_ids[0]}}', { 'allow_enhanced_conversions': true });
var enhanced_conversion_data
</script>
{% if first_time_accessed %}
<script>
enhanced_conversion_data = {
"email": "{{ customer.email }}",
"phone_number": "{{billing_address.phone}}",
"first_name": "{{ billing_address.first_name }}",
"last_name": "{{billing_address.last_name}}",
"home_address": {
"street": "{{billing_address.street}}",
"city": "{{billing_address.city}}",
"region": "{{billing_address.province}}",
"postal_code": "{{billing_address.zip}}",
"country": "{{billing_address.country_code}}"
}
};
gtag('event', 'conversion', {
'send_to': '{{ fa_send_to }}',
'value': {{ fa_checkout_price }},
'currency': '{{ currency }}',
'transaction_id': '{{ order_number }}'
});
</script>
{% endif %}
4. 代码验证
Shopify打开货到付款选项,通过【增强型转化】后的【问题排查】链接下一个测试订单
打开货到付款
点击【问题排查】进行测试,与gtm调试操作逻辑一致
测试过程中,gtm会显示未找到增强型转化,因为此段代码只安装在购买成功页面,订单完成后,会显示成功触发,
测试完记得关货到货款。
5. 转化检查
回到ads转化界面,刷新,增强型转化后的【未验证】变成【最近无转化】,则安装成功
