Dynamic Keyword Insertion (DKI) allows you to personalize landing pages by automatically injecting the keyword that triggered your ad — improving relevance, user experience, and Quality Score.
This guide walks you through the full setup using Google Tag Manager (GTM) and Google Ads tracking parameters.
🔧 Prerequisites
To complete the setup, you’ll need:
Access to Google Tag Manager
Ability to update Google Ads tracking templates
Admin access to your website or CMS
1. Set up URL parameters in Google Ads
In your Google Ads account, add the following tracking template at the account level:
This ensures that every ad click appends relevant data to your landing page URL.
2. Add HTML to your website
Place the following HTML snippet wherever you want the dynamic keyword to appear on your landing page:
💡 You can update the text and styling to fit your design — just keep the
id="dynamic-keyword"
intact.
3. Install the script via Google Tag Manager
In GTM:
Go to Tags → New
Choose Tag Type: Custom HTML
Paste this code:
4. Configure Your Trigger
Choose one of the following options based on where you want the script to run:
All Pages: Use the "All Pages" trigger for sitewide keyword insertion.
Single Page: Use "Page View → Page URL equals
[your-url]
".Group of Pages: Use "Page URL contains
[path]
" (e.g.,/products
).Advanced: Use "Page URL matches RegEx" for full regex control.
🧠 Pro Tips
✅ Test everything in GTM’s Preview Mode before publishing
🕵️♀️ Open your browser console to check for any script or loading issues
🔗 Ensure your Google Ads tracking template is properly saved