Kntnt Ad Attribution for Google Ads
WordPress add-on for Kntnt Ad Attribution — Google Ads offline conversion tracking
by Kntnt Sweden AB · github.com/kntnt/kntnt-ad-attribution-gads · website
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/kntnt/kntnt-ad-attribution-gads/releases/download/v1.9.0/kntnt-ad-attribution-gads.zipReadme
Kntnt Ad Attribution for Google Ads
Add-on plugin for Kntnt Ad Attribution that enables Google Ads offline conversion tracking.
Description
Kntnt Ad Attribution gives you internal, privacy-friendly lead attribution. This add-on extends it with Google Ads integration — capturing the gclid (Google Click Identifier) at ad click time and reporting conversions back to Google Ads via the Offline Conversion Upload API.
The result: you keep the core plugin's internal attribution data and get conversion data in Google Ads, allowing Google's bidding algorithms to optimize for actual leads rather than just clicks.
How It Works
The plugin uses two adapter hooks provided by the core plugin:
-
Click-ID capture (
kntnt_ad_attr_click_id_capturers): Registers'google_ads' => 'gclid'. When a visitor clicks a tracking URL that has agclidquery parameter, the core plugin'sClick_Handlercaptures and stores the value in thekntnt_ad_attr_click_idstable. No custom tables or storage are needed — the core handles everything. -
Conversion reporting (
kntnt_ad_attr_conversion_reporters): Registersenqueueandprocesscallbacks. When a conversion is attributed to a hash that has a storedgclid, a payload is built and queued for asynchronous processing. Each job is deferred by 6 hours from the click capture time (via the core queue'snot_beforeparameter), giving Google Ads time to register the click before accepting the conversion upload. Clicks already older than 6 hours are processed immediately. The queue processor then sends the conversion to the Google Ads Offline Conversion Upload API.
The plugin creates no custom tables, CPTs, cron hooks, or cookies. It registers three REST API endpoints for settings page operations (test connection, create conversion action, fetch conversion action details). It relies on the core plugin's infrastructure for click-ID storage and conversion queuing.
Features
- Automatically captures
gclidparameters when visitors arrive via Google Ads tracking URLs. - Queues and uploads conversions to Google Ads via the Offline Conversion Upload API.
- Deferred upload — each conversion upload is deferred by 6 hours from click capture time, giving Google Ads time to register the click. Clicks older than 6 hours are processed immediately.
- Resilient queuing — conversions are always queued regardless of credential status. Missing credentials are filled in from current settings when the job is processed.
- Failed jobs are automatically reset when settings are updated with valid credentials.
- Test Connection button verifies all credentials — OAuth2 tokens, Customer ID, Developer Token, Login Customer ID, and Conversion Action ID — in a single click. Uses current form values, so you can test before saving.
- Create Conversion Action button creates a new conversion action in Google Ads directly from the settings page. The ID is filled in automatically on success.
- Auto-fetches conversion action name and category from Google Ads when an ID is present.
- Persistent admin notice warns when uploads fail due to missing or invalid credentials.
Settings Page
Navigate to Settings > Google Ads Attribution to configure the plugin. The page has three sections:
API Credentials — required for conversion reporting:
- Manager Account ID (MCC, 10 digits, dashes are stripped automatically)
- Customer ID (10 digits, dashes are stripped automatically)
- Developer Token
- OAuth2 Client ID, Client Secret, and Refresh Token
Conversion Action — configure or create the conversion action:
- Conversion Action ID (numeric)
- Conversion Action Name (auto-fetched from Google Ads when ID is set, or enter a name for a new action)
- Conversion Action Category (auto-fetched from Google Ads when ID is set, or select for a new action)
- Create Conversion Action button — creates a new action in Google Ads. Enabled when auth fields + name are filled and no ID exists. The ID is filled in automatically on success.
Conversion Defaults:
- Default Conversion Value (numeric, >= 0)
- Currency Code (ISO 4217 select dropdown, default: SEK)
Diagnostic logging is handled by the core plugin's shared Logger (configure under Settings > Ad Attribution).
The Test Connection button verifies all credentials using the current form values — you can test before saving. A single Save Changes button at the bottom saves all settings.
Limitations
- Requires the core plugin. This is an add-on — Kntnt Ad Attribution must be installed and active.
- Google Ads API credentials required. Conversion reporting requires a Google Ads Customer ID, Conversion Action ID, OAuth2 credentials, and a Developer Token. Configure these under Settings > Google Ads Attribution.
- Attribution window limited by cookie lifetime. The core plugin's cookie lifetime (default: 90 days) determines the maximum attribution window, even though Google Ads allows up to 90 days for offline conversion uploads.
For Users
Installation
- Install and activate Kntnt Ad Attribution first.
- Download the latest release ZIP file.
- In your WordPress admin panel, go to Plugins → Add New.
- Click Upload Plugin and select the downloaded ZIP file.
- Activate the plugin.
The plugin is distributed via GitHub Releases and updated through the standard WordPress plugin update UI. When a new version is available, you will see it on the WordPress Updates page.
If the core plugin is not active when you try to activate this add-on, activation is blocked with a clear error message. While this add-on is active, the core plugin's "Deactivate" link on the Plugins screen is replaced with a "Required by" notice, and bulk deactivation of the core is silently prevented.
System Requirements
| Requirement | Minimum |
|---|---|
| PHP | 8.3 |
| WordPress | 6.9 |
| Kntnt Ad Attribution | Latest |
The plugin checks the PHP version on activation and aborts with a clear error message if the requirement is not met.
Configuration Guide
After activation, go to Settings > Google Ads Attribution to enter your credentials. The following sections walk you through every step, including creating any accounts you may not already have.
Prerequisites
Using the Google Ads API requires a Google Ads Manager Account (MCC). This is a special account type primarily used by agencies and consultants to manage multiple Google Ads accounts, but it is also required for anyone who needs API access — even if you only manage a single account.
If you don't already have one, you will create it in the steps below. It is free and does not affect your existing Google Ads account.
Step 1: Create a Google Ads Manager Account (MCC)
Skip this step if you already have a manager account.
- Go to ads.google.com/home/tools/manager-accounts.
- Sign in with a Google account. Note: If your email is already associated with a regular Google Ads account, you may need to use a different email address.
- Follow the prompts to create the manager account. Give it a descriptive name (e.g. "Your Company — MCC").
- Note the 10-digit Manager Account ID shown in the top-right corner (formatted as
XXX-XXX-XXXX). You will need it later. - Link your existing Google Ads account to the manager account:
- In the manager account, go to Admin (gear icon) > Sub-account settings.
- Click + and enter the Customer ID of your Google Ads account (the 10-digit number shown in the top-right corner of your Google Ads dashboard).
- A link request is sent to the Google Ads account.
- Accept the link request from the Google Ads account side:
- Sign in to ads.google.com with the account that has access to your Google Ads account (verify the correct Customer ID in the top-right corner).
- Go to Admin (gear icon) > Access and security.
- Click the Managers tab.
- Accept the pending request from your manager account.
Why is this needed? The Developer Token (obtained in the next step) belongs to the manager account. API calls use the
login-customer-idheader to identify the manager account, but this only works if the manager account actually manages the target Google Ads account. Without this link, API calls will fail withUSER_PERMISSION_DENIED.
Step 2: Get a Developer Token
- Sign in to your Manager Account (not your regular Google Ads account).
- Go to ads.google.com/aw/apicenter. If you see the message "The API Center is only available to manager accounts", you are signed in to the wrong account — switch to the manager account.
- Fill in the form:
- API contact email: Your email address.
- Company name: Your company name.
- Company website: Your website URL (must be live and reachable).
- Company type: Choose the option that best describes you (e.g. "Agency/SEM" if you manage ads for clients, or "Advertiser" if you manage your own).
- Purpose: Describe your intended use. For example: "Offline conversion tracking. We upload lead conversions from our websites to Google Ads via the Offline Conversion Upload API, so that Google's bidding algorithms can optimize for actual leads rather than just clicks."
- Accept the Terms and Conditions and submit.
- You will typically receive Explorer Access immediately, which allows up to 2,880 API operations per day — more than sufficient for conversion uploads. You can apply for Basic Access later if needed.
- Copy the Developer Token (a 22-character alphanumeric string) shown on the API Center page.
Step 3: Get the Conversion Action ID
You can either create a conversion action from the plugin's settings page or manually in Google Ads.
Option A: Create from the plugin settings page (recommended)
- Complete Steps 1–2 and 4–7 first (you need API credentials).
- In the plugin's settings page, go to the Conversion Action section.
- Enter a name (e.g. "Offline Lead") and select a category.
- Click Create Conversion Action. The ID is filled in automatically.
[!IMPORTANT] After creating a new conversion action, Google Ads requires a ~6 hour waiting period before it accepts conversion uploads. During this time, uploads will fail with "Can't import events to a conversion action that was just created." This is normal — the queue processor will keep retrying automatically, and conversions will be uploaded successfully once the waiting period has passed. No action is needed on your part.
Option B: Create manually in Google Ads
- In Google Ads, go to Goals > Conversions.
- If you already have a conversion action of type Import > from clicks (e.g. one used for offline conversion imports from Matomo or another source), you can reuse it. Otherwise, create a new one:
- Click + New conversion action.
- Choose Import > Other data sources or CRMs > Track conversions from clicks.
- Name the action (e.g. "Offline Lead") and save.
- Open the conversion action. Copy the numeric Conversion Action ID — you can find it in the URL parameter
ctId(e.g.ctId=7171477836→ the ID is7171477836), or in the action details.
If you were previously importing conversions from another system (e.g. Matomo's Conversion Export), you should disable that import to avoid double-counting. The plugin replaces the need for external conversion imports.
Step 4: Set up a Google Cloud Project
A Google Cloud project is needed to create the OAuth2 credentials that authorize the plugin to communicate with the Google Ads API.
- Go to console.cloud.google.com.
- In the project selector at the top of the page, create a new project (e.g. "Google Ads Integration") or select an existing one.
- Go to APIs & Services > Library.
- Search for Google Ads API, click on it, and click Enable.
Step 5: Configure the OAuth Consent Screen
Before you can create OAuth credentials, Google requires a consent screen configuration.
- Go to Google Auth Platform > Overview (or navigate via the sidebar: APIs & Services > OAuth consent screen).
- Click Configure (or Get started if this is a new project).
- Fill in the required fields:
- App name: A descriptive name (e.g. "Kntnt Ad Attribution").
- User support email: Your email address.
- Audience / User type: Choose External.
- Developer contact email: Your email address.
- You can skip all optional fields (logo, homepage, privacy policy, etc.).
- You can also skip the Scopes step if prompted — scopes are not needed here.
- Save and continue through all steps.
Read the full README on GitHub →
Releases
| Tag | Published | Asset | Downloads |
|---|---|---|---|
| v1.9.0 | Mar 19, 2026 | kntnt-ad-attribution-gads.zip | 0 |
| 1.8.0 | Mar 7, 2026 | kntnt-ad-attribution-gads.zip | 0 |
| v1.7.1 | Feb 26, 2026 | kntnt-ad-attribution-gads.zip | 1 |
| v1.7.0 | Feb 26, 2026 | kntnt-ad-attribution-gads.zip | 1 |
| v1.6.3 | Feb 26, 2026 | kntnt-ad-attribution-gads.zip | 2 |
| v1.6.2 | Feb 26, 2026 | kntnt-ad-attribution-gads.zip | 1 |
| v1.6.1 | Feb 26, 2026 | kntnt-ad-attribution-gads.zip | 6 |
| v1.6.0 | Feb 26, 2026 | kntnt-ad-attribution-gads.zip | 1 |
| 1.4.0 | Feb 26, 2026 | kntnt-ad-attribution-gads.zip | 1 |
| 1.3.3 | Feb 25, 2026 | kntnt-ad-attribution-gads.zip | 4 |
| 1.3.2 | Feb 25, 2026 | kntnt-ad-attribution-gads.zip | 0 |
| 1.3.1 | Feb 25, 2026 | kntnt-ad-attribution-gads.zip | 1 |
| 1.3.0 | Feb 25, 2026 | kntnt-ad-attribution-gads.zip | 1 |
| v1.2.0 | Feb 25, 2026 | kntnt-ad-attribution-gads.zip | 0 |
| v1.1.2 | Feb 25, 2026 | kntnt-ad-attribution-gads.zip | 3 |
| v1.1.1 | Feb 25, 2026 | kntnt-ad-attribution-gads.zip | 1 |
| v1.1.0 | Feb 25, 2026 | kntnt-ad-attribution-gads.zip | 5 |
| v1.0.0 | Feb 24, 2026 | kntnt-ad-attribution-gads.zip | 0 |