How to execute Google Adwords conversion tracking without physical thank you page

匿名 (未验证) 提交于 2019-12-03 01:33:01

问题:

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.

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&label=22222222&guid=ON&script=0'); 

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".

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.

Ideas?

回答1:

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> 

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



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!