Add Google Ads Conversion Tracking to Joomla

Find out which Google Ads keywords bring in sales and let Smart Bidding chase more of them, with an HTML and a JavaScript snippet.

Add Google Ads Conversion Tracking to Joomla

Google Ads reports every click, but clicks don't pay the bills. Without conversion tracking you can't tell which keyword brought in the sale, Smart Bidding has nothing to aim for, and every budget decision is a guess. Conversion tracking needs a tag on every page and an event on your thank you page. You can add both to Joomla with an HTML and a JavaScript snippet in Code Snippets.

Get your conversion ID and label

You need a Google Ads account.

  1. Go to Google Ads and sign in.
  2. Go to Goals → Conversions → Summary, and click New conversion action.
  3. Choose Website, enter your domain, and set up the action you want to count, like a purchase.
  4. Choose to install the tag yourself.
  5. Copy your Conversion ID, which looks like AW-123456789, and the conversion label from the event snippet.

The snippet code

The first snippet is the Google tag. It goes in the <head> of every page:

<script async src="https://www.googletagmanager.com/gtag/js?id=AW-123456789"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'AW-123456789');
</script>

The second reports the conversion. It runs only on the page visitors see after they convert, like your thank you or order confirmation page:

gtag('event', 'conversion', {
    'send_to': 'AW-123456789/AbCdEfGhIjKlMnOp',
    'value': 99.99,
    'currency': 'EUR',
    'transaction_id': ''
});

Change value and currency to what one conversion is worth to you.

How to add the snippets

Snippet 1: the Google tag

  1. Install Code Snippets if it isn't installed already.
  2. Log into your Joomla backend.
  3. Go to Components → Tassos Code Snippets.
  4. Click New.
  5. Enter a title, for example Google Ads tag.
  6. Set Code Type to HTML.
  7. Set Insertion Method to Auto-Insert Locations.
  8. Set Location to Site Header.
  9. Paste the Google tag above into the editor.
  10. Replace AW-123456789 with your Conversion ID, in both places.
  11. Click Save & Close.

Snippet 2: the conversion event

  1. Click New.
  2. Enter a title, for example Google Ads conversion.
  3. Set Code Type to JavaScript.
  4. Set Insertion Method to Auto-Insert Locations.
  5. Set Location to Site Footer.
  6. Paste the conversion code above into the editor.
  7. Replace AW-123456789/AbCdEfGhIjKlMnOp with your Conversion ID and label.
  8. Open the Conditional Logic tab:

    • Set Display on to Selected Pages.
    • Click New Condition Set.
    • Click Select Condition and choose URL - Query String.
    • In URL, enter a part of your thank you page's address, for example thank-you.
  9. Click Save & Close.

Don't skip the Conditional Logic on the second snippet. Without it, every page view counts as a conversion.

Check that it works

  1. Install Google Tag Assistant and connect it to your site.
  2. Browse a few pages, then make a test conversion.

Tag Assistant should show the Google tag on every page and the conversion only on the thank you page. In Google Ads, the conversion action leaves the Unverified status after the first real conversion, which can take a few hours.

To see all your traffic, not only ad clicks, see Add Google Analytics to Joomla. To learn more, read the HTML snippet docs and the JavaScript snippet docs.

Last updated on Oct 15th 2026 18:10