AdWords- Track clicks on your website as conversions


#1

Hi all,

I try to set up Adwords (Previous) conversion when someone clicks on a button.
After I pasted the conversion tracking tag, how can I implement the onclick code on the button that I want to track?

Adwords support: https://support.google.com/adwords/answer/6331304?authuser=0

"You’ll now need to add an onclick command directly to the code for the button or link that you want to track. The particular code that you use will depend on how the link or button is displayed on your site: as a text link, image or button:
-Add the code to a button: In the code below, replace “http://example.com/your-link” with the URL for your website or telephone link, and replace “Download now!” with your button text.

<button onclick="goog_report_conversion('http://example.com/your-link')" href="http://example.com/your-link">Download now!</button>

Thanks In Advance,
Ron


#2

Hey Ron!

We often do this via Google Analytics instead.

Since the GA Unbounce integration works so nicely, we create a goal for a specific button on Google Analytics, then we import that Goal into AdWords.

Let me know if you think that would be a good solution for you - I can help you get it to work!


#3

Hey Stefano,

Thank you for the quick reply.

Why are you doing this with Google Analytics and not with Adword?
Is it possible to implement the onclick code on a button with Adwords?
If not/ it’s very complicated, I would love to your help.

Thanks,
Ron


#4

Hey Ron,

I used Analytics because it already tracks Unbounce button clicks as ‘events’ making it easy to create a goal conversion from it.

If you have Analytics set up with the Unbounce integration, you should be able to see your button clicks (and other actions) reported under Behaviour > Events > Top Events. “In-Page” would be the event category, and event label would be the button tag.

Let me know if you are seeing this data in Analytics - I could then help you with setting this up as a goal!


#5

Hey Stefano,

I can see the data in Analytics, but the event category is Outbound (because the links take users to other websites), and the labels are button and image (I use both).

Could you help me with the goal setting and the import to AdWords?

Thanks,
Ron


#6

Sure!

To create a goal in analytics:

  • Click the admin tab on the bottom left (gear icon)
  • Click on the goals tab (flag icon)
  • Click on the red button + New Goal
  • Goal Setup: Select Custom, click continue
  • Name: Name your goal
  • Type: Select “event”, click continue
  • Category > Equals To > this could be any of the categories you see under “Event Category”)
  • Action > Equals To > (this could be any of the categories you see under “Event Action”)
  • Label > Equals To > (this could be any of the categories you see under “Event Label”)

Here is an example for the form completion as a goal in Analytics:

Here is an example of a button click as a goal in Analytics:

Importing goals into AdWords (see documentation here):

  • Sign in to your AdWords account, and click the Tools, billing, and settings icon in the header. Note: If you just recently linked your AdWords and Analytics accounts, wait 30 minutes before starting to import goals or transactions.
  • Click Measurement > Conversions.
  • Click Add.
  • Click Import, select Google Analytics, then click CONTINUE.
    Select each goal or transaction you want to import, then click IMPORT AND CONTINUE.
    Click DONE.

Before you save the goal, you can click “Verify this Goal” to see if you created the conditions correctly.

Please let me know if this helps!


#7

Hello Ron!

I had exactly the same issue some weeks back, and it’s working fine now - I am able to track both clicks on buttons and form submissions, using AdWords conversions. If you are still interested in using AdWords conversions (as opposed to recording conversions in Analytics and importing them to AdWords), I suggest you contact Vanessa Johansson from Unbounce Customer Support - she has it sussed when it comes to this.

All the best!

Jordan


#8

Hi there. What’s the situation if the button element id (e.g. #lp-pom-button-308) isn’t showing up under events in Analytics, even though you know it’s fired in the last 7 days, and the GA script seems to be in place and correct?

I can’t currently set up the Goal in GA because of this. Thanks.


#9

Hi Zak,

Not sure I can help diagnose the issue with discrepancies, but I could offer an alternative. Can you verify if you are correctly recording the “Submit” event as an action?


#10

Thanks Stefano. I’ve put a request in with the tech team so hopefully they’ll be able to help.

I have tried to create this goal with “Submit” as the action, and it is showing that the goal would not have recorded over the past 7 days. Is that what you mean?