本文介绍了如何执行谷歌的Adwords转换跟踪没有物理谢谢页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有什么似乎是一个常见的​​场景。我有一个页面,一个人填表和,而不是重定向到一个不同的感谢页面的所有跟踪需要发生在同一页面上。

I've got what appears to be a common scenario. I have a page where someone fills out a form and rather than redirecting to a different thank you page all the tracking needs to take place on the same page.

我发现这个链接<一个href="http://stackoverflow.com/questions/11296781/execute-google-analytics-$c$c-after-ajax-request">here解释我就按照下面的一个成功提交后(转换ID为11111111的标签为22222222)。

I found this link here that explains a solution which I implemented as per the below after a successful submission (conversion ID is 11111111 and the label is 22222222).

$("#conversion-script").prop('src', '//www.googleadservices.com/pagead/conversion.js');
                $("#ga-code img").prop('src', '//www.googleadservices.com/pagead/conversion/11111111/?value=0&amp;label=22222222&amp;guid=ON&amp;script=0');

在此得到执行我监视网络选项卡为开发工具,并看到GoogleAdServices.com地址被成功调用,不仅如此,但我有谷歌标签援助(Chrome扩展)运行和在此事件触发它出现在发现标签,并说工作。

When this gets executed I'm monitoring the network tab for developer tools and see that the GoogleAdServices.com address gets called successfully, and not only that but I have Google Tag Assistance (Chrome extension) running and when this event fires it comes up under "Tags Found" and says "working".

当我检查不过AdWords帐户,它没有显示出来。我已经证实,跟踪codeS是正确的,而第一个写了8天前。

When I check the adwords account however, it's not showing up. I've confirmed that the tracking codes are all correct, and the first one was made 7 days ago.

想法?

推荐答案

例如,你有这样的按钮:

For example you have such button:

<a href = '#' class = 'add_to_cart'><img src = 'btn_buy.png'></a>

试试这个脚本:

Try this script:

<SCRIPT src='/js/jquery.js' type=text/javascript></SCRIPT>
<SCRIPT type=text/javascript>

$(document).ready(function()
{
  var add_to_cart_processed = false;

  $('.add_to_cart').click(function()
  {
    if (!add_to_cart_processed)
    {
      $('body').append('<div id = "remarketing_basket" style = "display:none"></div>');
      $('#remarketing_basket').load('/add_basket.txt');
    }
  });
});
</SCRIPT>

在add_basket.txt您需要保存您的转换code文件。

In file add_basket.txt you need to save your conversion code.

这篇关于如何执行谷歌的Adwords转换跟踪没有物理谢谢页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 16:56
查看更多