Shopify网站怎么添加Google Ads增强型转化代码?

Google Ads增强型转化代码是应对GDPR等隐私政策更新的重要方式,可以在当前情况下,限度的跟踪到实际的广告效果,降低隐私政策更新带来的影响。本文将演示 Shopify网站设置Google Ads增强型转化代码的实操过程。

实操过程主要分为两个步骤:

1. Google Ads中增强型转化操作的设置

2. Shopify网站中添加增强型转化代码


以下为实操演示:

一、 Google Ads账户中完成增强型转化设置

1. 创建Google Ads购买转化跟踪(如已创建可跳过)

参考文章:【shopify专栏】shopify怎么做转化跟踪

2. 打开Google Ads账户,点击“工具与设置” “转化” 已创建的购买转化跟踪(转化来源是网站)

图片来源:Google Ads

3. 点击“增强型转化”,在展开的对话框中,勾选“启用增强型转化”

勾选“全局网站代码或Google跟踪代码管理器”

点击“下一步”

图片来源:Google Ads

输入网址,点击“检查网址”

图片来源:Google Ads

选择“输入“JavaScript或CSS选择器”

图片来源:Google Ads

分别勾选Email, Phone, First Name, Last Name, Street address, City, State, Country, Postal code, 并对应输入如下值后,点击保存

Email enhanced_conversion_data.email

Phone enhanced_conversion_data.phone_number

First name enhanced_conversion_data.first_name

Last name enhanced_conversion_data.last_name

Street addressenhanced_conversion_data.home_address.street

Cityenhanced_conversion_data.home_address.city

Stateenhanced_conversion_data.home_address.region

Countryenhanced_conversion_data.home_address.country

Postal codeenhanced_conversion_data.home_address.postal_code

图片来源:Google Ads

二、Shopify网站中添加增强型转化代码

1. 打开Shopify后台,点击Setting

图片来源:Shopify

2 点击Checkout

图片来源:Shopify

3 拉倒页面底部,找到Order status pageAdditional scripts

复制以下代码模板Additional scripts代码框中:

<!– FEEDARMY START Global site tag (gtag.js) – Google Ads V1.7 –>
{% assign fa_send_to = ‘AW-123456789/abcdefghijlklmnopq’ %}
{% 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.subtotal_price | divided_by: 100.0 %}
{%- else -%}
{% assign fa_checkout_price = checkout.total_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});
</script>
{% if first_time_accessed %}
<script>
gtag(‘event’, ‘conversion’, {
‘send_to’: ‘{{ fa_send_to }}’,
‘value’: {{ fa_checkout_price }},
‘currency’: ‘{{ currency }}’,
‘transaction_id’: ‘{{ order_number }}’
});
var enhanced_conversion_data = https://www.cifnews.com/article/{
“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}}”
}
};
</script>
{% endif %}
<!– FEEDARMY END Global site tag (gtag.js) – Google Ads V1.7 –>


4. 将框起来fa_send_to后面的部分替换为自己的转化代码。

图片来源:Shopify

自己的转化代码查找位置:

“工具与设置” – “转化” –已创建的购买转化跟踪(转化来源是网站) – 代码设置

图片来源:Google Ads

找到事件代码段,复制“send_to”后的内容,替换增强转化代码中fa_send_to后的内容

图片来源:Google Ads

最后点击保存,并跟进数据统计,通常系统需要3-7天来验证状态。

关注公众号,领取独立站资料包

(来源:孙谦)

免责声明:本文内容来自其他媒体或者他人投稿,请自行判断内容的正确性。若本站收录的信息无意侵犯了贵司版权,请给我们来信(info@chuhaihao.com),我们会及时处理和回复。
0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
搜索