Tracking Leadpages Conversions in Google Analytics & Adwords

Are you using Leadpages, but can’t figure out how to count the conversions in Google Analytics or Adwords? It was really bothering us as we wanted to take advantage of Google’s powerful AI. We couldn’t find a good answer online, so we created one. This article will teach how to track Leadpages’ conversions using Google Tag Manager and Google Analytics.

As we all know Google Ads is an online advertising platform developed by Google. Sadly, Leadpages does not provide a native functionality to send conversions data into Google Ads or Analytics directly. The truth is, there are other platforms to track Leadpages conversions like ClickMagick; however, it’s a paid third party tool. You could also send everyone to a custom thank you page, but sometimes you need them to redirect to a common page or you just like the clean look of a simple thank you pop-up.

This tutorial will teach you how to track Leadpages’ form conversions using Google Tag Manager (GTM) and Google Analytics no matter how your Leadpages are setup.

Tip: Familiarize yourself a bit first with Leadpages, Google Analytics, and Tag Manager. It will definitely help!

Tip: If you already have GTM setup and on your Leadpages, skip to Step 4.

Now, let’s begin the step-by-step procedures on how to set up Adwords in Leadpages:

Step 1: Create a Google Tag Manager account.

Note: If you already have one, just make sure you still remember the log-in details in order to access your GTM account!

STEP 2: When you're done creating your account, you'll have your own unique GTM code. Copy the code given on the first box.

Step 3: Adding Google Tag Manager to LeadPages

After signing in to Leadpages, you will be directed to the main page. Select the page you want to track conversions in or you may create new Lead Page.

A. Let’s assume that you selected one page. Click the edit icon (the one that is encircled on the attached photo).

B. Note: You will do the same process if you chose to “create new Leadpage” as you will be brought directly to the page editor once you choose a template.After clicking the edit icon, you will be led to the Page Builder page. Click the “Tracking” section (located at the left side of the page).

C.  In the tracking section, paste the GTM code in “Head section tracking code” text area.

D. When done,  click Save and you can leave the ‘edit’ mode of the page.

Step 4: Create a GTM Variable.

Go back to Tag Manager website and Click ‘Variables’ (located at the lower left side of the page).

A. In the ‘variables’ section, click New (located at the lower right side of the page).

B. Click on the Variable Configuration container and when options pop up at the right side of the screen, choose ‘Custom javascript’.

C. After clicking the Custom JavaScript, the text area will appear.

D. Paste this script inside the text area.

function(){return document.querySelector('button[type ="submit"] ').innerText;}

It will look like this.

E. Name your variable as ‘LP – submit button text’ and click Save.

Step 5: Create Trigger 1.

After clicking Save, go back to the main page of Tag Manager and click Triggers.

A. Just like in Variables, click New (located at the upper right side of the page).

B. Click on the Trigger Configuration container and when options popped up at the right side of the screen. Choose ‘All Elements’. ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

B. Click on the Trigger Configuration container and when options popped up at the right side of the screen. Choose ‘All Elements’.

D. Options will pop up at the right side of the screen, choose ‘Click Classes’.

E. Paste this text beside the “Contains” box that appears.


It will look like this.

 F. Name the trigger as ‘LP – Submit button click’ and click Save.

Step 6: Create Trigger 2.

This will be the last trigger for conversion. The process is the same as step 5, but this time when choosing trigger type, select “Custom event” as your trigger type.

A. On the Custom Event page, you’ll see the “Event name” section, type this text in the box:


B. After that, Click some events and choose the variable “LP – submit button text” we created on step 5.

C. Next, choose “matches RegEx” on the dropdown menu next to it and type ‘(hank|ubmitt)’ on the third box to the right.

Note: “(hank|ubmitt)” is a text that CTA button contains. If your button contains “Get it now” value in your case, it should look like this,(hank|ubmitt|Get it now)

It should be like this:

C. Name the second trigger as “LP – Successful form submit” and click Save.

Step 7: Create a listener tag.

This is the last step before you are able to track the conversions.

A. Click “Tags” on the left sidebar and click “New”.

B. Click on the tag in the configuration container and select Custom HTML as a tag type.

C. When the text field appears, paste the following text:

<script> setTimeout(function(){ dataLayer.push({'event': 'check_error_message'}); }, 500); </script>

It will look like this:

D. For the Triggering area located below the Tag text box, select “LP – Submit button click” that we created on step 5.

E. Name your new tag as “LP -Button click listener”.

F. Click Save on top right corner and you’re done setting up the tagging in GTM!

Simple reminder:We set up triggers and variables to look after what message a Leadpages form returns. If someone unsuccessfully fills out the form, the conversion will not count.

In other words:

  • If the form has already submitted and an error appears – The conversion is not successful.
  • If the form has already submitted and no error message – The conversion is successful.

This way we can ‘determine’ when a conversion works perfectly and send this information to Google Analytics or Google ads (Adwords).

Step 8: Now set up a Google Analytics event tag or use Google Ads conversion tag and use the trigger 'LP-Successful form submit' in Google Tag Manager.

Here’s an example of how I use the trigger for Google Analytics tag:

Step 9: Create a new goal in Google Analytics.

A. Sign in to Google Analytics.

B. Click Admin, and navigate to the desired view.

C. In the VIEW column, click Goals.

D. Click + NEW GOAL or Import from Gallery to create a new goal, or click an existing goal to edit its configuration.

E. Create a custom goal setup and name as you would like.

F. In the Goal Details, choose Event and set the fields to match the fields in Step 8 that you setup in Google Tag Manager.

Using my example from Step 8, the goal details would look like:

Make sure to link Google Analytics with Google Ads (AdWords) to see Leadpages conversions in Google Ads.

And that’s it! I hope you’ve learned a lot from this article on how to track leadpages goals with Google Analytics and if you’re still confused, feel free to reach out to us.

Get our weekly newsletter

Each week we highlight the top marketing stories that intrigue us or simply make us laugh.

This field is for validation purposes and should be left unchanged.