Dynamic Search Responses Using Static Landing Pages
Everything changes, including keyword usage and visitor interests. Accommodating these as they occur, without starting over, is something of a challenge. But it can be done very quickly and simply with some plain vanilla javascript and a straightforward processing structure. Topics: The Challenge; Living On The Edge With Javascript; Get The Keywords First; Doing Double Duty; and Lining Things Up
The Challenge
By and large, search engines require landing pages to be static in order to have consistent optimization. It takes a lot of work and time to get a page working properly, with the keyword distribution worked out, along with content depth, to raise the page’s rank in quality and relevancy. Modifying such a page in response to changing keyword sets can be addressed in one of two ways: 1) either make new landing pages that focus on a different keyword mix; or 2) modify the target landing page to accommodate the new keyword set. Both take a lot of work, and can put the original investment in developing the original landing page at some risk. In our case, we’ve noticed that keyword sets tend to change in clumps that, for us at least, tend to be at the margins of the original keywords used during optimization. We examine the server logs daily and can see shifts quickly, and respond to them just as quickly, without having to do any extensive surgery, much less redo, the landing pages.
Living On The Edge With Javascript
We can augment content to a static web landing page by using some javascript that has a fairly regular structure. In essence, the detection of keywords, and the dynamic responses that rearrange, add or hide content all occur at the edge of the landing page. The mechanics can be highly streamlined. We have a core javascript section that is declared in the page’s head section that does some discovery and provides services that are invoked when the page’s body is rendered. All of these content modifications are done with plain html, eliminating the need for multiple landing pages, along with any need to maintain active code such as asp, php, etc. The following paragraphs describe how this is done.
Get The Keywords First
This should be done in the web page’s head section, or immediately after the body tag, before any body elements are rendered. The javascript code should be in a separate file to eliminate the inclusion of the script itself when the page’s contents are analyzed for relevancy. The keywords are in the referrer property, but their markers differ among the various search engines. A logical flag is set to reflect whether or not any keywords have been found, and the keyword values stored for subsequent examination when the web page’s body section is rendered.
Doing Double Duty
The javascript code declared in the head section has two logical parts. The first part does the keyword discovery and persists the results. The second part is a set of procedures that create the body elements needed to generate content, or not, based on the presence, or absence, of specific keywords. These procedures are invoked at selected positions in the body section, and can have various internal structures themselves, depending on how dynamic or complex the respective response should be.
Lining Things Up
The order in which responses are expanded into content is based on where their respective procedures are invoked within the body flow. Perhaps the most common example would be move content from, say, below the page’s fold to the very top to match a keyword, while another example is to eliminate content that is not relevant by not generating it.
Tags: dynamic content, javascript, seo
