已收藏,可在 我的资料库 中查看
关注作者
您可能还需要

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

本文将演示 Shopify网站设置Google Ads增强型转化代码的实操过程。

Shopify网站怎么添加Google Ads增强型转化代码?图片来源:图虫创意

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

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

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

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


以下为实操演示:

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

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

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

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

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

图片来源:Google Ads

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

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

点击“下一步”

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

图片来源:Google Ads

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

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

图片来源:Google Ads

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

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

图片来源: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

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

图片来源:Google Ads

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

1. 打开Shopify后台,点击Setting

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

图片来源:Shopify

2 点击Checkout

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

图片来源:Shopify

3 拉倒页面底部,找到Order status page - Additional 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 = {
"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增强型转化代码?

图片来源:Shopify

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

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

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

图片来源:Google Ads

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

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

图片来源:Google Ads

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

Shopify网站怎么添加Google Ads增强型转化代码?关注公众号,领取独立站资料包

(来源:孙谦)

以上内容属作者个人观点,不代表雨果跨境立场!本文经原作者授权转载,转载需经原作者授权同意。​

相关标签:

分享到:

--
评论
最新 热门 资讯 资料 专题 服务 果园 标签 百科 搜索
雨果跨境顾问
Google顾问-Sandy
OceanWeb新客独家福利:前100名免费送$20广告体验金,点击按钮咨询顾问并领取,雨果跨境官方顾问

收藏

--

--

分享
孙谦
分享不易,关注获取更多干货