Dynamic Keyword Insertion

Zzzzz… wake up! This isn't as boring as it sounds. In essence it means you can control what your webpage says using the link you give people.

See? Not as dull as you thought.

A simple example

Let's say you have a dog grooming salon (looking at you, Andrew!).

You have an offer, but you want to personalise it by breed. Your headline says:

Special discount for {breed} owners

By using Dynamic Keyword Insertion, you can send people to a link like this:


Your page will now say:

Special discount for Rottweiler owners

Cool, eh?

Try it out

Let's see it in action on a page I've just set up

I want to greet you by name, and call out the dog breed you have. Your name is Simon and the breed of your dog is poodle.

Click on the link below and see what happens:


Now edit the URL in the browser and replace ‘Simon‘ with your actual first name, and ‘breed‘ with another breed of dog (choose one without spaces for now – I'll explain in a moment why).

Press ‘enter' and watch the page load with the variables you just specified.

Cool, eh?

(Not working? Make sure you've only changed the words ‘Simon' and ‘Poodle' and don't use any spaces or punctuation)

Here's a video walkthrough…

This video is an overview of the rest of the article. If you like it, then read the rest of the article!

Wait, what if there's no parameter in the URL?

You're a clever one – took me a few hours to work out that this would be a problem.

So I added a way to define a default or fallback value, just in case the link doesn't contain those variables.

Try going to the link above, but not specifying any ‘variables'. Like this:


You'll see that it defaults to some standard values – ‘old friend' and ‘dog'.

How does it work?

It's just a simple bit of PHP code that you add to your functions.php file in WordPress. You can see the whole code here.

Once that's installed, you just use a shortcode in your WordPress post/pages that looks like this:

(I've had to a use an image, as by typing it, it'll actually be classed as the shortcode… if you follow!)

KEY = the parameter in the URL to check for,. For example, in this link, the keys would be ‘fname‘ and ‘breed‘:


DEFAULT = what to output if no key is found.

For example if default=”new friend“, and you clicked on the link below, the key ‘fname‘ isn't in the URL, and so instead of seeing ‘Simon‘, you'll see the default: ‘new friend‘.


But it gets even cooler…

This is great for personalising names, but you can also personalise links or even add hidden fields to a form.

Example 1: Personalised voucher code

Imagine you want to send an email that a unique discount code, but don't want to muck about with custom voucher software.

Step 1: In your bulk email software, you'd simply create a link, and append the customer's unique ID (from the bulk mailer)

E.g. ‘https://yourwebsite.com/yourpage?code={{contact.id}}

(The exact ‘code' to insert the ID varies by software – I'm happy to show you it works with yours if you like. Book a quick call)

Step 2: In that landing page, you can set up a hidden field on your booking form to grab that code and save it.

This would allow you to give a unique code to everyone, and prevent people trying to makeup codes (as you can check it against the CRM).

Example 2: Change the image shown

Let's stick with the dog example.

Imagine you uploaded three images:

  • ‘rottie.png'
  • ‘labrador.png'
  • ‘poodle.png'

If you used the DKI shortcode in the path to the image, you could now change the image depending ont he URL.

This is how I've done it on my sample page:

<img src="https://stealmymarketing.com/wp-content/uploads/sites/12/2019/10/dog.jpg"  />

You can now define which image loads using the URL!

And if you don't include a breed type, then you'll just see some dogs: https://stealmymarketing.com/e/dki-example

Some warnings

Cos we're using PHP, like every programming language, it's very, very literal.

This does need a small amount of technerdery to install – you need to be comfortable editing the functions.php file in your theme, and you should probably set up a child theme. (Instructions here on Github)

However, it's just a copy and paste job, and it's about 90 seconds work, so ask your friends for someone who knows what they're doing.

Or schedule a call with me and I'll try and help.