How to track a Google Adwords conversion onclick?(如何跟踪 Google Adwords 的 onclick 转化?)
问题描述
如果有人点击链接,Google Adwords 不提供任何代码添加到您的网页以计算转化.但由于它是 Javascript,我相信有办法做到这一点.
Google Adwords offers no code to add to your page to count a conversion if somebody clicks on a link. But as it's Javascript, I am sure there is a way to do this.
这是 Google 为您提供的代码(未更改)以包含在页面中,这应该算作一次转化(大多数情况下是感谢页面):
Here's the code (unaltered) Google gives you to include in the page, that should count as a conversion (most of the time a thank you page):
<!-- Google Code for Klick Conversion Page -->
<script type="text/javascript">
<!--
var google_conversion_id = 1062751462;
var google_conversion_language = "de";
var google_conversion_format = "1";
var google_conversion_color = "ffffff";
var google_conversion_label = "dKXuCODvugEQ5pnh-gM";
var google_conversion_value = 0;
//-->
</script>
<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/1062751462/?label=dKXuCODvugEQ5pnh-gM&guid=ON&script=0"/>
</div>
</noscript>
对于其他转化跟踪脚本,必须执行一些函数来计算转化.在这里,只需将 JS 文件添加到您的页面就足以触发转换跟踪,因为 conversion.js 在加载时调用了一个函数(下载它并在通过代码美化器运行它后查看它,这真的是相当不错的工作!).
With other conversion tracking scripts some function has to be executed to count the conversion. Here, just adding the JS-File to your page can be enough to trigger the conversion-tracking, as conversion.js calls a function on load (download it and look at it after running it through a code beatuifier, it's really quite nice work!).
知道如何解决这个问题吗?
Any idea how to tackle this?
推荐答案
不知道你有没有找到它...我还是为以后的冲浪者提一下...
Don't know if you've already found it... I mention it anyway for future surfers...
我一直在寻找相同的,并找到了这段代码:
I was looking for the same, and found this piece of code :
<script type="text/javascript">
function trackConv(google_conversion_id, google_conversion_label) {
var image = new Image(1, 1);
image.src = "//www.googleadservices.com/pagead/conversion/" + google_conversion_id + "/?label=" + google_conversion_label + "&script=0";
}
</script>
然后对于您要跟踪的链接,只需执行以下操作:
Then for links which you want to track just do this :
<a onclick="trackConv(1234567890, 'LQV8CNq6RxCKlPbvAw');" href="http://www.example.com">Link</a>
这篇关于如何跟踪 Google Adwords 的 onclick 转化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何跟踪 Google Adwords 的 onclick 转化?
基础教程推荐
- html表格如何通过更改悬停边框来突出显示列? 2022-01-01
- 用于 Twitter 小部件宽度的 HTML/CSS 2022-01-01
- 如何使用TypeScrip将固定承诺数组中的项设置为可选 2022-01-01
- Chart.js 在线性图表上拖动点 2022-01-01
- 自定义 XMLHttpRequest.prototype.open 2022-01-01
- 直接将值设置为滑块 2022-01-01
- Electron 将 Node.js 和 Chromium 上下文结合起来意味着 2022-01-01
- Vue 3 – <过渡>渲染不能动画的非元素根节点 2022-01-01
- 我可以在浏览器中与Babel一起使用ES模块,而不捆绑我的代码吗? 2022-01-01
- 如何使用JIT在顺风css中使用布局变体? 2022-01-01