<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dave Wooding &#187; dynamic keyword insertion</title>
	<atom:link href="http://www.davewooding.com/tag/dynamic-keyword-insertion/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.davewooding.com</link>
	<description></description>
	<lastBuildDate>Sat, 28 Aug 2010 17:52:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Google Adwords Dynamic Keyword Insertion PHP Script</title>
		<link>http://www.davewooding.com/google-adwords-dynamic-keyword-insertion-php-script/</link>
		<comments>http://www.davewooding.com/google-adwords-dynamic-keyword-insertion-php-script/#comments</comments>
		<pubDate>Sat, 30 May 2009 00:06:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[adwords]]></category>
		<category><![CDATA[dynamic keyword insertion]]></category>

		<guid isPermaLink="false">http://www.davewooding.com/?p=4</guid>
		<description><![CDATA[So, you want to be an Adwords rockstar?
Well then, you&#8217;ll need to wrap your brain around dynamic keyword insertion.
And I&#8217;m not just talking about the basics &#8211; just using dynamic keyword insertion in your Google Adwords advertisement.  I&#8217;m talking about playing with the big kids and using those keywords that appear in your Adwords [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>So, you want to be an Adwords rockstar?</p>
<p>Well then, you&#8217;ll need to wrap your brain around <strong>dynamic keyword insertion</strong>.</p>
<p>And I&#8217;m not just talking about the basics &#8211; just using dynamic keyword insertion in your Google Adwords advertisement.  I&#8217;m talking about playing with the big kids and using those keywords that appear in your Adwords advertisement <strong>also</strong> on your web page.</p>
<p>That&#8217;s right, if you are targeting a specific search terms in your advertisement &#8211; make that keyword show up on your landing page.  Heck, even have it show up as the title and actual url of your page.  Now we are talking.</p>
<p>Maybe instead of talking, let me show you a few things to give you the picture.  It will all be crystal clear in just a moment &#8230;</p>
<h2>What Is Dynamic Keyword Insertion?</h2>
<p>Lets say you are advertising using <a href="http://adwords.google.com/" target="_blank">Google&#8217;s Adwords program</a>.  One of the things you provide for your ad is a list of keywords that you are interested in having your advertisement display for.</p>
<p>For instance, if you were selling &#8220;kobe beef&#8221;, you might want your advertisement to show up on Google&#8217;s search engine page every time someone types in the words &#8220;kobe beef&#8221; in the search box on Google.</p>
<p>Same goes for someone searching for &#8220;kobe steak&#8221; &#8211; you want your ad displayed.</p>
<p>With dynamic keyword insertion, every time someone types in the exact search term you are targeting, your advertisement would include those keyword &#8211; in bold &#8211; on your advertisement.</p>
<p>Here&#8217;s what the syntax looks like:</p>
<p>{keyword:} &#8211; will display the search term or not if there is not a match</p>
<p>{keyword: Default} &#8211; will display the search term or &#8220;Default&#8221; if there is problem displaying the search term.  Of course, you can replace &#8220;Default&#8221; with whatever you like.</p>
<p>Some specific details regarding keyword: (source: <a href="http://www.redflymarketing.com/blog/dynamic-keyword-insertion-the-ultimate-guide/" target="_blank">Red Fly Marketing</a> )</p>
<p>keyword &#8211; No capitalization, all word(s) are in lower case</p>
<p>Keyword &#8211; The first word is capitalized<br />
KeyWord &#8211; Every word is capitalized<br />
KEYword &#8211; Every letter in first word is capitalized<br />
KEYWord &#8211; Every letter in the first word AND the first letter of the second<br />
KEYWORD &#8211; Every letter is capitalized</p>
<p>More details at <a href="http://adwords.google.com/support/bin/answer.py?answer=74996&#038;hl=en_US" target="_blank">Google Adwords</a></p>
<h2>How Do You Do It?</h2>
<p>Login to your Adwords account.  Create or edit a campaign.  Create or edit a Text Ad.</p>
<p>Here&#8217;s an example of what an ad might look like that uses keyword insertion.</p>
<p><img src="http://www.davewooding.com/images/adwords1.png" alt="adwords" /></p>
<p>&nbsp;</p>
<p>Notice that use of the {KeyWord: Default} in the Headline and Description line 1.</p>
<p><img src="http://www.davewooding.com/images/adwords2.png" alt="adwords keyword insertion" /></p>
<p>&nbsp;</p>
<p>This is the important part for getting the search term to show up on your web site.  <strong>Use the {Keyword: Default} as part of your Destination URL</strong>.  In this example, I have added my top level domain, http://www.DaveWooding.com/ followed by the keyword insertion expression followed by &#8220;.html&#8221;. Note that I have added a dash, &#8220;-&#8221;, in between my default word.</p>
<p><img src="http://www.davewooding.com/images/adwords3.png" alt="adwords dynamic keyword insertion" /></p>
<p>&nbsp;</p>
<h2>Display the Adwords Search Terms On Your Page</h2>
<p>At this point, somebody clicked on an Adwords ad of yours, something that might look like this:</p>
<p><img src="http://www.davewooding.com/images/adwords5.png" alt="adwords dynamic keyword insertion" /></p>
<p>&nbsp;</p>
<p>In this case, the search term is &#8220;kobe steak&#8221;.  A visitor that clicks on that advertisement would be sent to this url, http://www.davewooding.com/kobe%20steak.html.</p>
<p>If someone searched for &#8220;kobe beef&#8221; the advertisement would look like this:</p>
<p><img src="http://www.davewooding.com/images/adwords4.png" alt="google adwords dynamic keyword insertion" /></p>
<p>&nbsp;</p>
<h2>On To Your Web Site</h2>
<p>Now that you have setup your Google Adwords advertisement to use <strong>keyword insertion</strong>, it is time to separate the men from the boys, the women from the girls, the &#8230; you get the point.</p>
<p>Time to play big.  You want your site to display an appropriate page for each of those particular search terms.  Sure you can do it the old fashion way and grunt it out &#8211; create an individual page for each and every possible search term.</p>
<p>Or you can do it the right way.</p>
<p>Using PHP or some other scripting language that allows for extracting information about the referring page &#8211; the referring page that uses dynamic keyword insertion.  Ding, ding, ding <<<--- important</p>
<p>First, assuming you are working from the top level domain, i.e. &#8211; http://www.example.com, you will need to add or modify a .htaccess file to include the following:</p>
<blockquote><p>
RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule ^([^/]+).html?$ index.php?q=$1 [L]</p>
</blockquote>
<p>I&#8217;m going to assume that if you are reading this far into the article that you are willing to use php files instead of plain html file (otherwise you will need to include additional code in your .htaccess file, specifically &#8220;AddType application/x-httpd-php .htm .html&#8221;).</p>
<p>Very simply, the chuck of code above says to turn on the rewrite engine, reference to the root directory, the rule that follows is applicable if the file or directory referenced does not already exist, then grab all the info after the domain but before the .html extension <- this is our dynamic keyword insertion stuff courtesy of Google Adwords.</p>
<p>Take that information (the dynamic keyword info), shove it into memory &#8211; which we will call &#8220;dollar one&#8221; = $1 and send it over to the index.php file as part of the &#8220;q&#8221; query string.</p>
<p>You like that techo jargon?</p>
<h2>The PHP Code That Displays Adwords Search Terms</h2>
<p>&#8230; on your site.</p>
<p>As I mentioned, you will need to be using php files for this to work (or you can modify your .htaccess file to accomodate).</p>
<p>At the top of your index.php file, the code should like like this:</p>
<p><img src="http://www.davewooding.com/images/adwords6.png" alt="google adwords dynamic keyword insertion" /></p>
<p>&nbsp;</p>
<p>This chunk of code checks to see if any information has been passed over via the &#8220;q&#8221; query string (remember the .htaccess grabbed any info between the top level domain and the .html and sent it over as part of the query string parameter).</p>
<p>If there is info, then that information gets assigned to a variable called $replace (after it replaces any dashes with whitespace &#8211; assuming there are any dashes).</p>
<p>If no query string info is present, no problemo, there is a default value set previously &#8211; &#8220;kobe beef&#8221; in this case.</p>
<p><img src="http://www.davewooding.com/images/adwords7.png" alt="google adwords dynamic keyword insertion" /></p>
<p>&nbsp;</p>
<p>Next a few other variables are set based on the what is in $replace.  $title is the same as $replace with the exception that the <strong>first character of <u>every word</u></strong> are capitalized. $h1 is the same as $replace except that just the <strong>first character</strong> is capatilized.</p>
<p><img src="http://www.davewooding.com/images/adwords8.png" alt="google adwords dynamic keyword insertion" /></p>
<p>&nbsp;</p>
<p>Following the php script part of the index.php file is plain old html code &#8211; with the $title and $h1 variables thrown in.</p>
<p><img src="http://www.davewooding.com/images/adwords9.png" alt="google adwords dynamic keyword insertion" /></p>
<p>&nbsp;</p>
<p><strong>This is how you display the Adwords search terms on your site</strong>.</p>
<h2>What&#8217;s Next?</h2>
<p>We are only scratching the surface of what is possible here.</p>
<p>Lets just speculate that you have a datafeed that you want to create individual landing pages for that you want to use PPC to drive visitors to.  Or you are a Clickbank affiliate that wants to use Adwords to promote products and you want to use the Clickbank datafeed?  Or you have an Ebay store that uses a RSS feed from Ebay to display items for sale that could afford pay per click marketing?</p>
<p>What you have seen here is perfect for creating relevant, high quality score landing pages for using Google Awords with.  </p>
<p>Stay tuned, or sign up to get on the mailing list, for the next article which will show you how to <strong>integrate a datafeed</strong> &#8211; like <a href="http://www.davewooding.com/go/speedppc.html" target="_blank">SpeedPCC</a> &#8211;  with <strong>dynamic keyword insertion</strong>.<br />
<a href="http://www.davewooding.com/go/speedppc.html"><img src="http://www.davewooding.com/images/speedppc-468x60.gif" title="speedppc" border="0" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.davewooding.com/google-adwords-dynamic-keyword-insertion-php-script/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
