4.9K members online now
4.9K members online now
Use AdWords conversion tracking and reporting to measure your results. Have a question about Google Analytics? Post it here, on the Google Analytics Community!
Guide Me

Tracking conversion on Ajax

Rising Star
# 1
Rising Star

Hi Guys,


I am looking a way to place conversation tracking code and I've implemented it using a method I found on StackOverflow.



		submitHandler:function(form) {
			var querystring = $(form).serialize();
				success:function(data) {
					if(data == true) {

    function googleTrackingPixel() {
        // set google variables as globals
        window.google_conversion_id = 955074050
        window.google_conversion_language = "en"
        window.google_conversion_format = "2"
        window.google_conversion_color = "ffffff"
        window.google_conversion_label = "lpd7CO6XwQMQgoy1xwM"
        window.google_conversion_value = 0

        var oldDocWrite = document.write // save old doc write

        document.write = function(node){ // change doc write to be friendlier, temporary

        $.getScript("", function() {

            setTimeout(function() { // let the above script run, then replace doc.write
                document.write = oldDocWrite
            }, 100)


 Will this able to track my conversion? In here I don't have a seperate page as thank you, to insert the html code. Thank you page being excuted through AJAX

2 Expert replyverified_user
Marked as Best Answer.
Accepted by topic author Nisal L
September 2015

Re: Tracking conversion on Ajax

Top Contributor
# 2
Top Contributor

Hi Nisal,


If you want to install the conversion tracking code for AJAX using Google Tag Manager, then this technical article by  theniks does it for you:-



Re: Tracking conversion on Ajax

Rising Star
# 3
Rising Star
Thanks @pankaj1782 and @theniks

Re: Tracking conversion on Ajax

Top Contributor
# 4
Top Contributor