How to put Adwords Conversion Code in AJAX form

Discussion in 'Google AdWords' started by lavista4u, Sep 1, 2010.

  1. #1
    Hi Guys,

    I'm trying to put a conversion code for an adwords campaign into an AJAX form which is PHP. The problem is that the Thank you for registering page does not appear as a separate page, instead a small Thank you message is show below the AJAX form in the index page itself.

    I have searched everywhere even in Google adwords help forum, but couldn't find any solution.

    I only got a tit-bit info that i need to only use <img> tag content in the conversion code and return it in AJAX content. But, i'm not sure where to put the code.

    I also saw this code in one site but do not know where exactly to put it. It says to create an iframe and call it with jquery in AJAX ??

    ================= Code Below=============

    If your site is using AJAX, then the traditional implementation of AdWords, YSM, MSN, etc. conversion tracking may not work. The solution is to use an IFRAME to call a file with the conversion tracking code (pixel) on it.

    IFRAMES with Javascript:

    function ppcconversion() {
    var iframe = document.createElement('iframe');
    iframe.style.width = '0px';
    iframe.style.height = '0px';
    document.body.appendChild(iframe);
    iframe.src = 'http://www.yourdomain.com/path_to_file_with_code';
    };

    ====================

    If anyone knows anything about this will be greatly helpful, since i'm stuck up with this for the last two and haven't made the campaigns live.

    Thanks.
     
    lavista4u, Sep 1, 2010 IP