Dynamic Keyword Insertion (DKI) allows you to personalize landing pages by automatically injecting the keyword that triggered your ad. This improves relevance, enhances user experience, and can boost your Quality Score.
🔧 Prerequisites
To complete this setup, you'll need:
Google Tag Manager account access
Ability to configure Google Ads tracking templates
Admin access to your website or CMS
Implementation Steps
1. Set Up URL Parameters in Google Ads
Add the following tracking parameter suffix to your Google Ads account settings:
This can be implemented at the account, campaign, or ad group level through tracking templates. When a user clicks your ad, these parameters will automatically be appended to your landing page URL.
2. Add HTML Markup to Your Landing Page
Insert this HTML code wherever you want the dynamic keyword to appear on your landing page:
You can customize the text and styling to match your design — just keep the id="dynamic-keyword"
attribute intact as this is what the script will target.
3. Configure Your Default Keyword
A default keyword is what will be displayed when no keyword parameter is detected in the URL. This ensures your landing page looks natural even when someone arrives through a non-paid channel.
Your default keyword will be configured in the internal configurator.
4. Install the Script via Google Tag Manager
In Google Tag Manager:
Go to Tags → New
Choose Tag Type: Custom HTML
Paste this code:
5. Set Up Your GTM Trigger
Choose one of these trigger options for your tag:
All Pages: Select the "All Pages" trigger if you want the keyword insertion to work across your entire website
Specific Page: Create a Page View trigger with "Page URL equals [your-url]" for single page implementation
Multiple Pages: Use "Page URL contains [common-path]" for groups of pages (e.g., all product pages)
Complex Rules: Use "Page URL matches RegEx" for more advanced page matching patterns
🧠 Pro Tips
Always test in GTM's preview mode before publishing
Check your browser console for any potential errors
Make sure your Google Ads URL parameters are correctly set up
Consider setting a default keyword as fallback for direct traffic
For multilingual sites, create separate tags with appropriate default keywords for each language
Troubleshooting
If keywords aren't appearing, verify that your Google Ads tracking template is correctly configured
Make sure the HTML element with ID "dynamic-keyword" exists on your landing page
Check if any browser extensions or ad blockers might be interfering with the script
Verify that the script is loading properly in your browser's network tab