Manual Insertion of Google Ads Tracking Code in WordPress
Step 1: Access Conversion Tracking in Google Ads
- Sign in to your Google Ads account at https://ads.google.com/.
- In the top right corner, click the tools icon (wrench) and select "Conversions" under the "Measurement" section.
Step 2: Create a New Conversion Action
- On the Conversions page, click the blue "+" button to create a new conversion action.
- Choose "Website" as the conversion source since we're tracking actions on a WordPress site.
- Configure the conversion settings:
- Select the appropriate conversion category (e.g., "Purchase" for sales or "Submit lead form" for signups).
- Name the conversion (e.g., "Product Purchase" or "Newsletter Signup").
- Assign a value if applicable. For sales, use the actual revenue amount. For leads, consider lifetime customer value or use a standard amount like $1.
- Choose a counting method - "Every" for sales, "One" for leads to avoid double counting.
- Click "Create and Continue" then select "Install the tag yourself" to access the tracking code snippet.
The code will look similar to this:
<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>
Step 3: Insert the Code in WordPress
- Log into your WordPress admin dashboard and navigate to Appearance → Theme Editor in the left sidebar.
- In the Theme Files list on the right, look for header.php and click to edit that file. This is where we'll paste the tracking code.
- Find the
</head>
tag near the top of the file. Paste the entire Google Ads code snippet directly above that closing tag. - Click "Update File" to save your changes. The tracking code is now installed on every page of your WordPress site.
Step 4: Verify and Troubleshoot
After 24-48 hours, check your Google Ads account to ensure conversions are being recorded:
- Navigate back to the Conversions page. If the status shows "Recording conversions", the code is working properly.
- To test, complete a conversion action on your site (e.g., submit the tracked form). Then click the conversion name to view details. Your test conversion should appear within an hour.
If no conversions are showing after 48 hours:
- Use the Google Tag Assistant Chrome extension to verify the code is present and firing on key pages.
- Make sure the code is pasted correctly in header.php without any extra spaces or characters.
- Ensure you're checking the correct conversion in Google Ads, as the code snippet contains the unique AW-123456789 ID number for each action.
Optimize your Google Ads spending with AI
Plugin Integration Guide for Google Ads Tracking Code
Integrating Google Ads tracking code into your WordPress site can be simplified using dedicated plugins. This guide will walk you through the process of setting up two popular options: Site Kit by Google and MonsterInsights.
1. Site Kit by Google Plugin
Site Kit is an official plugin developed by Google that enables you to connect various Google services, including Google Ads, to your WordPress site seamlessly.
Installation and Activation:
- In your WordPress dashboard, navigate to "Plugins" and click "Add New."
- Search for "Site Kit by Google" in the plugin repository.
- Click "Install Now" and then "Activate" once the installation is complete.
Setup Process:
- Click on the "Start Setup" button to begin the configuration process.
- Sign in with your Google account that has access to your Google Ads and Analytics accounts.
- Grant the necessary permissions for Site Kit to access your Google account data.
- Select the property you want to connect and choose the Google services you wish to integrate, ensuring that Google Ads is selected.
Site Kit will automatically add the necessary tracking code to your WordPress site, eliminating the need for manual integration.
2. MonsterInsights Plugin
MonsterInsights is a popular WordPress plugin that offers Google Analytics integration and includes features for Google Ads tracking.
Installation and Activation:
- In your WordPress dashboard, go to "Plugins" and click "Add New."
- Search for "MonsterInsights" in the plugin repository.
- Click "Install Now" and then "Activate" once the installation finishes.
- After activation, you'll be prompted to authenticate with your Google Analytics account. Follow the on-screen instructions to complete this process.
Setting up Google Ads Tracking:
- Navigate to the MonsterInsights settings and locate the "Addons" tab.
- Install and activate the "Ads" addon.
- In the MonsterInsights settings, go to the "Conversions" tab and configure your desired conversion tracking settings, such as conversion actions and values.
- MonsterInsights will automatically add and manage the necessary Google Ads tracking code on your site based on your settings.