AdWords
4.8K members online now
4.8K 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

How to track a conversion when a button is clicked?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

The regular conversion tracking snippet should be inserted into something like a "thank you" page.

I don't want to have such a page. I want a conversion to be tracked right when my visitor has clicked on a certain button in my initial landing page, such an element that carries a certain class name.

 

How exactly and what is the best practice to do that? 

 

Thanks

1 Expert replyverified_user

Re: How to track a conversion when a button is clicked?

[ Edited ]
Top Contributor
# 2
Top Contributor

Hi Robbie,
The easiest way to do this is with Google Tag Manager. In fact, if you have it installed, you don't even need to make any changes to the code on your site. GTM automatically listens out for clicks (all clicks) and you can trigger the AdWords conversion on the click of any given unique class id or element id.

There's a few ways you can go about it. The GTM way is the easiest way and the way that we use for all our clients now. You can find details on how to do it here: http://cutroni.com/blog/2013/10/07/auto-event-tracking-with-google-tag-manager/

Please note that there is a new version of GTM which does NOT require a "listener" to be set up. It's available at tagmanager.google.com (V1 and V2 are not backwards compatible).

If you don't want to use GTM, you might want to consider setting up a virtual pageview in GA when someone clicks the button. https://developers.google.com/analytics/devguides/collection/gajs/asyncMigrationExamples#VirtualPage...

Set the virtual pageview as a goal then import the goal into AdWords as a conversion.

 

Finally, you can of course call the adwords conversion pixel onClick of the button if you prefer. This option requires the most on page coding.

Let me know if you need any assistance setting these up.

Re: How to track a conversion when a button is clicked?

Participant ✭ ✭ ✭
# 3
Participant ✭ ✭ ✭
Hi Robbie,

You an use Google tag manager for that. You can set up a listen event and track it is a conversion, or at least make that the firing rule for your conversion.

Get GTM here:
http://www.google.com/tagmanager/

Re: How to track a conversion when a button is clicked?

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭
Thanks, though I prefer a more "generic" solution (such as jquery method maybe?), as I would like a method that can be used with Bing's conversion as well. I'm looking for tracking only one certain click, so the GTM seems to me like an overkill, and I do not use Google Analytics, so I guess I can't use the page view thing.

Re: How to track a conversion when a button is clicked?

Top Contributor
# 5
Top Contributor
Hi Robbie,
Using jQuery is far more overkill than GTM if you're not already using it Smiley Happy
If you want to track multiple conversions, including BING, GTM is definitely the way to go.

However, if you do want to do it the hard way, and manually code it up, there's plenty of examples available. There's a good one on Stackoverflow here: http://stackoverflow.com/questions/2082129/how-to-track-a-google-adwords-conversion-onclick

I wouldn't be doing my job if I didn't tell you though that the GTM method is far superior in every way (especially if you're not using GA) and will futureproof you in case of any changes to AdWords/Bing etc. in the future.

Hope that helps.

Re: How to track a conversion when a button is clicked?

[ Edited ]
Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭

Well I'm already using other jquery scripts on my page so another one wouldn't hurt,
Are you saying that on the Bing-ads interface, I would be able to see Bing-ads conversions that could be tracked using the GTM? can you point me to the part that explains how do theses two interact together, and what part of the Bing tracking- snippet am I supposed to place and where?

also, I'm wondering what are the cons of implenting the GTM? I'm also quiet reluctant because it seems to be too "big-brotherish" to let google listen to all clicks when I only need it to listen for one.

Re: How to track a conversion when a button is clicked?

Top Contributor
# 7
Top Contributor
You don't have to have it listen for all clicks. You can filter the click listener to listen for clicks on your classID.

Sounds like you really don't want this option though. The stackoverflow post I linked above should sort you out.

Re: How to track a conversion when a button is clicked?

Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭
Would using an iframe work good as well?

as suggested here:

http://www.benjaminkim.com/conversion-tracking-with-ajax/