在本文中,您将了解到如何在PageFly页面上设置Facebook事件像素。 如果您已经在您的Facebook帐户上设置了Facebook 像素,请跳至步骤2。
步骤 1: 设置Facebook像素
首先,访问Facebook 事件管理器页面以设置帐户并获取唯一的像素ID。
请按照说明开始进行操作。
如下所示,把像素连接网站活动连接到Shopify商店。
然后选择Shopify为伙伴。
完成4个步骤,成功将Facebook像素连接到您的Shopify帐户。
完成设置后,可能显示这样的结果。
步骤 2: 在您的店铺设置Facebook像素
在事件管理页面,拷贝您账号名下面的唯一像素ID。
回到您的Shopify管理员页面。
访问 在线店铺 > 偏好设置 > 把像素ID粘贴到Facebook像素部分> 点击保存。
- 打开您要设置Facebook像素的页面。Facebook像素的事件跟踪可用于12种元素上:
- 标题
- 按钮
- 图片
- MailChimp 表单
- 商品列表
- 商品图片
- 商品标题
- 商品加入购物车
- 商品查看详细
- 集合图片
- 集合标题
- 集合查看详细
选择适合您的Facebook像素事件。 可以收集的事件类型为:
- 搜索
- 查看内容
- 加入购物车
- 加入心愿单
- 发起结账
- 添加付款信息
- 购买
- 带领
- 完成注册
- 自定义事件
选择事件类型后,事件代码将自动生成。
要检查像素的性能,您可以安装像素帮助器 Google Chrome 扩展。 如果像素工作正常,则在实时页面上单击扩展程序图标时,您会看到这样的效果。
步骤 3: 检查Facebook事件跟踪
要检查Facebook事件跟踪,请转到您的Facebook事件管理器页面 > 选择左上角的菜单 > 选择广告管理器。
转到广告集标签 > 选择列:性能 下拉列表>选择自定义列。
将视图切换到 转换 > 向下滚动以选择您正在使用的像素类型 > 点击应用。
再次选择菜单 > 选择事件管理器。 您应该看到像素触发的结果。
Best Practices using Facebook & PageFly
Below you’ll find the most frequently asked questions related to setting up Facebook pixel and pages built with PageFly app.
How to fire a specific Facebook event when PageFly page is loaded?
Step 1 – Open the Custom settings inside PageFly editor.
Step 2 – Insert the code below to CUSTOM JAVASCRIPT settings.
https://pastebin.com/raw/pHs6Hy1d
Step 4 – Check the result with Facebook Pixel Helper
Advanced Tips
If you want to send additional objectives to the Facebook event, for example, “content_name” and “content_type” please use the following code:
https://pastebin.com/raw/F9BQYpMQ
Important: Please keep in mind for the specific Facebook Event you can assign pre-designed objectives. Please refer to the Facebook Help doc. For example, Facebook ViewContent supports the following objectives: content_ids, content_category, content_name, content_type, contents, currency, value.
Check the result with Facebook Pixel Helper. As you can see there are custom parameters sent including content_type and content_name.
How to fire the Facebook Pixel when the user scrolled a specific section?
Step 1 – Name your section.
In our example, it’s “countdown”.
Step 2 – Add custom Javascript code.
Two things you need to pay attention to.
Firstly, the jQuery function trigger the section ID with the name “countdown”.
Secondly, for our example, we send Facebook Pixel “ViewContent” without any objects.
https://pastebin.com/raw/GaSA1sKF
Step 3 – Check the result
As you can see the section that we assigned a unique ID is called “countdown”, and after scrolling that part the Facebook pixel has been fired.
How to fire multiple Facebook Pixels on the same page?
Inside the Customer Javascript settings please include code below:
Please keep in mind to replace “YOUR PIXEL ID” with your unique ID number.
https://pastebin.com/raw/dbZ6ATbm
As a result you should see two pixels fired on the page load.
References
If you have any questions feel free to submit a ticket and our Customer Support team will get back to you ASAP.