在tiktok ads中,创建了新的pixel(Events API ),但是由于没有数据,后台不会显示(有数据显示active),导致在创建campaigns 的时候,无法选择新创建的pixel和event。解决方法:
<head></head> <body> <script> !function (w, d, t) { w.TiktokAnalyticsObject = t; var ttq = w[t] = w[t] || []; ttq.methods = ["page", "track", "identify", "instances", "debug", "on", "off", "once", "ready", "alias", "group", "enableCookie", "disableCookie"], ttq.setAndDefer = function (t, e) { t[e] = function () { t.push([e].concat(Array.prototype.slice.call(arguments, 0))) } }; for (var i = 0; i < ttq.methods.length; i++) ttq.setAndDefer(ttq, ttq.methods[i]); ttq.instance = function (t) { for (var e = ttq._i[t] || [], n = 0; n < ttq.methods.length; n++) ttq.setAndDefer(e, ttq.methods[n]); return e }, ttq.load = function (e, n) { var i = "https://analytics.tiktok.com/i18n/pixel/events.js"; ttq._i = ttq._i || {}, ttq._i[e] = [], ttq._i[e]._u = i, ttq._t = ttq._t || {}, ttq._t[e] = +new Date, ttq._o = ttq._o || {}, ttq._o[e] = n || {}; var o = document.createElement("script"); o.type = "text/javascript", o.async = !0, o.src = i + "?sdkid=" + e + "&lib=" + t; var a = document.getElementsByTagName("script")[0]; a.parentNode.insertBefore(o, a) }; ttq.load('REPLACE_ME'); ttq.track("CompletePayment"); ttq.track("ViewContent"); ttq.track("SubmitForm"); ttq.track("AddPaymentInfo"); ttq.track("AddToCart"); ttq.track("AddToWishlist"); ttq.track("ClickButton"); ttq.track("CompleteRegistration"); ttq.track("Contact"); ttq.track("Download"); ttq.track("InitiateCheckout"); ttq.track("PlaceAnOrder"); ttq.track("Search"); ttq.track("Subscribe"); }(window, document, 'ttq'); </script> </body>
将以上的代码保存到一个html文件,替换你自己的pixel ID,然后在浏览器打开,刷新几次,等几分钟就可以在后台看到pixel显示为活动了。
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。