如何跟踪 Google Adwords 的 onclick 转化?

How to track a Google Adwords conversion onclick?(如何跟踪 Google Adwords 的 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&amp;guid=ON&amp;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 转化?

基础教程推荐