视频教程
1.Shopify客户事件代码
// ***************************//
// Taboola, v1.2
// change your taboola id
const TABOOLA_ID = '12345';
// ===================
// DO NOT UPDATE BELOW
// ===================
analytics.subscribe("product_added_to_cart", async (event) => {
console.log('Taboola add to cart event triggered', event);
window._tfa = window._tfa || [];
!(function (t, f, a, x) {
if (!document.getElementById(x)) {
t.async = 1;
t.src = a;
t.id = x;
f.parentNode.insertBefore(t, f);
}
})(
document.createElement("script"),
document.getElementsByTagName("script")[0],
`//cdn.taboola.com/libtrc/unip/${TABOOLA_ID.trim()}/tfa.js`,
"tb_tfa_script"
);
window_tfa.push({ notify: "event", name: "add_to_cart", id: TABOOLA_ID.trim() });
});
// =========================//
// Taboola end
// ***************************//
2.主题模板代码
<script>
// ***************************//
// Taboola, v1.2
// change your taboola id
const TABOOLA_ID = '12345';
// ===================
// DO NOT UPDATE BELOW
// ===================
window._tfa = window._tfa || [];
!(function (t, f, a, x) {
if (!document.getElementById(x)) {
t.async = 1;
t.src = a;
t.id = x;
f.parentNode.insertBefore(t, f);
}
})(
document.createElement("script"),
document.getElementsByTagName("script")[0],
`//cdn.taboola.com/libtrc/unip/${TABOOLA_ID.trim()}/tfa.js`,
"tb_tfa_script"
);
console.log('Taboola page view event triggered');
window._tfa.push({ notify: "event", name: "page_view", id: TABOOLA_ID.trim() });
// =========================//
// Taboola end
// ***************************//
</script>
3.收款插件填入账号ID,事件为 make_purchase

4.走一遍结账流程测试像素