我已经设置了一个Google Ads帐号和一个转换目标。 在我的网站中,我添加了一个按钮Facebook客户聊天。 我想将Google Ads转化跟踪代码添加到fb聊天按钮,以便每次有人开始聊天时系统都会跟踪转化情况。 (最好不使用Google跟踪代码管理器)
这是到目前为止没有跟踪代码的聊天代码:
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
xfbml : true,
version : 'v3.3'
});
};
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = 'https://connect.facebook.net/en_US/sdk/xfbml.customerchat.js';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<!-- Your customer chat code -->
<div class="fb-customerchat"
attribution=setup_tool
page_id="xxxxxxxxxxx"
theme_color="#9B813B"
logged_in_greeting="We are live and ready to chat with you now. Say something to start a live chat."
logged_out_greeting="We are live and ready to chat with you now. Say something to start a live chat."
greeting_dialog_display="show"
greeting_dialog_delay="5">
</div>
这是我从Google AdWords Conversion on AJAX Form?获得的跟踪代码:
window.google_trackConversion({
google_conversion_id: 'AW-xxxxxxxxx',
google_conversion_language: "en",
google_conversion_format: "3",
google_conversion_color: "ffffff",
google_conversion_label: "xxxxxxxxx",
google_remarketing_only: false,
onload_callback : function() {
console.log("Conversion Sent Contact");
}
});
谢谢!
答案 0 :(得分:0)
您可以在聊天按钮上添加onclick函数,以触发google ads转换脚本