Home > Articles > Webmaster resources > Javascript Toolkit

The Javascript Smart Marketing Toolkit

Scan of page from Internet Works magazine Watch a master salesman at work and you'll notice he's watching you. By learning your concerns, he can present the products that will most help you resolve them. By looking out for your interests, he can promote other products that might tempt you. He brings products together with people that will buy them out of need or desire.

On the web, delivering personalised content can be tricky. That's why I created the Javascript Smart Marketing Toolkit. It provides a simple way to make your content adapt to the visitor's requirements, using Javascript. You don't need to do anything clever on your server.

The toolkit enables your site to:

  • Display different messages, depending on the day, time or date. For example, your site could automatically show different promotions at the weekend or during your opening hours, than outside of those times. At the simplest level, you could greet customers with "good morning" or "good afternoon".
  • Display a countdown to a particular date (such as a product launch) or a recurring date (such as Valentine's Day)
  • Store information in the user's browser. This provides a simple way to add a capbility equivalent to cookies, although it's actually using local storage. The data can't be read from your server, but you can make your website personalise the user experience based on it.
  • Track what users are interested in, and use that to show them more content they'll like. Again, you can't collect this information from your server, but you can use it to improve the customer experience.
  • Cycle image content such as advertisements or promotional images evenly. The toolkit keeps track of how often each "banner" has been shown, and aims to even out the number of exposures the banners have for each user.

It is assumed that you're comfortable with the basics of using Javascript - this toolkit isn't suitable for absolute beginners. However, you only really need to know how to run Javascript commands in your web page.

This toolkit originally featured in the August 1999 issue of Internet Works magazine (pictured) and was updated in May 2019, including switching from using cookies to using local storage.

Implementing the toolkit

Here's how you can install the toolkit:

  1. Download this file: smart_marketing_toolkit.zip
  2. Unzip it
  3. Upload it to your server
  4. Incorporate it in your webpage using this code (you may need to modify the path to the file:

    <script language="Javascript" src="smart_toolkit.js"></script>

  5. Add a link to this site (optional, but very much appreciated)

Documentation

The tools fall into three categories:

Licensing

This software is released under the GNU Library General Public Licence.

In brief:

  • This software remains ©Sean McManus
  • You may copy and redistribute this software free of charge provided copyright notices are left intact
  • You may use this library in your webpages, but must leave copyright notices intact

If you use this software or find it helpful, a link to this site would be appreciated. Please read too how you can support this site

Navigating the toolkit:

Related links

Credits

© Sean McManus. All rights reserved.

Visit www.sean.co.uk for free chapters from Sean's coding books (including Mission Python, Scratch Programming in Easy Steps and Coder Academy) and more!

Discover my latest books

Mission Python book

Mission Python

Code a space adventure game in this Python programming book published by No Starch Press.

Coder Academy book

Coder Academy

Learn to make games and other programs in Scratch, and make a web page in HTML. Highly interactive book for 7-10 year olds.

Cool Scratch Projects in Easy Steps book

Cool Scratch Projects in Easy Steps

Discover how to make 3D games, create mazes, build a drum machine, make a game with cartoon animals and more!

Walking astronaut from Mission Python book Top | Search | Help | Privacy | Access Keys | Contact me
Home | Blog | Copywriting Services | Books | Free book chapters | Articles | Photos | Games | Shop | About