AdWords
4.6K members online now
4.6K 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
star_border
Reply

Conversion tracking on button click

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I have been unable to track conversions in my Adwords campaign because I can't find an easy or understandable way to track a conversion when someone clicks a button on a contact us form. SO consequently I have suspend my Adwords campaigns until I can get conversion tracking working.

 

There is no interstitial 'Thank You" page I can create to host the Adwords conversion tracking code. I wish there was, but it is not possible with my 'contact form' page, which you can see here:

 

http://www.forumcast.net/

 

I have paged though many discussions on this help forum, and searched dozens of webpages for a simple answer but there doesn't seem to be one.  I would hope Adwords technical people could come up with a quick and easy  solution to tracking a conversion directly in Adwords when someone clicks a button, as it seems a lot of people can't figure this out.

 

 

 

 

Re: Conversion tracking on button click

Collaborator ✭ ☆ ☆
# 2
Collaborator ✭ ☆ ☆

Hi Alex

I tried testing your form by submitting a test lead but nothing happened. I tested in FF 25.0.1, this is something you should lok at.

As far as solution to your problem you should try this article

Regards, Nik
LinkedIn  |   @nikhilparachure | My Blog

Re: Conversion tracking on button click

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Sorry the form to use is at http://www.forumcast.net that other one we are using for testing purposes.

Thanks,

Re: Conversion tracking on button click

Collaborator ✭ ☆ ☆
# 4
Collaborator ✭ ☆ ☆
Hi
Okay the article link i provided in previous post should work for you
Regards, Nik
LinkedIn  |   @nikhilparachure | My Blog

Re: Conversion tracking on button click

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Well I have tried you method and checking it out in the debug screen and my tag isn't fired. What do I use to fire the tag in this? How do I create rules that will fork when this form is submitted?

One of my rules is that the URL should be the URL the form is on, but what rule I use to trigger the event of submitting the form?

The form seems to be a component of a common.js file. This part:

// contact form
if ($('#contact_form').length) {
$('#contact_form').validate({ rules: { name: { required: true},
email: { required: true, email: true },
message: { required: true },
type: { required: true },
_captcha: { required: true, remote: '_captcha.php' }},
messages: { name: 'This field is required.',
email: { required: 'This field is required.',
email: 'Please enter a valid email address.'},
message: 'This field is required.',
_captcha: 'Are you really a human?'},
submitHandler: function(form) { $(form).ajaxSubmit({ dataType: 'json',
success: contactFormResponse }); }
});
} // if contact form
}); // onload

// handle contact form AJAX response
function contactFormResponse(response) {
if (response.responseStatus == 'err') {
if (response.responseMsg == 'ajax') {
alert('Error - this script can only be invoked via an AJAX call.');
} else if (response.responseMsg == 'notsent') {
alert('We are having some mail server issues. Please refresh the page or try again later.');
} else {
alert('Undocumented error. Please refresh the page and try again.');
}
} else if (response.responseStatus == 'ok') {
dataLayer.push({
'event': 'form-was-submitted',
'eventCategory': 'contactForm',
'eventAction' : 'success'
});
alert('Thank you for contacting us! We\'ll get back to you ASAP.');
} else {
alert('Undocumented error. Please refresh the page and try again.');
}

location.reload(true);
} // contactFormResponse


Can I use a bit of that as something to trigger the event? I am lost.

Re: Conversion tracking on button click

Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭
Can I get this alert('Thank you for contacting us! We\'ll get back to you ASAP.'); to fire the tag? That seems to be the key bit when the form has been completed [properly and submitted.

Re: Conversion tracking on button click

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭
Well, events don't seem to trigger this. I have tried various things for about 4 hours to no avail. Adwords should really create a simple straight forward way to track conversions for people who can't use interstitial thank you pages.

Re: Conversion tracking on button click

Collaborator ✭ ☆ ☆
# 8
Collaborator ✭ ☆ ☆
HI
your form url is http://www.forumcast.net/ just use that and forget about JS file. If you still have problems post your GTM rules here
Regards, Nik
LinkedIn  |   @nikhilparachure | My Blog