Sodaware

Marketing

Getting Traffic That Works


There are a few fundamental truths when selling things online. The first is that you need visitors to your website. The second is that you need those visitors to buy something. Anything else they do, such as blog or tweet about you, is just a bonus.

A lot of times people concentrate on getting traffic, instead of on obtaining quality traffic.

This article contains most of the traffic generation techniques I’ve used in the last few years, along with some statistics on how well they perform. Naturally, your results may differ from these, but they’re a good starting point for evaluating different methods.

All statistics are taken from an 18 month period (September 2007 – February 2009) to give as large a sample size as possible. There are nearly 1,000 different referrers for this period, so these statistics are certainly not 100% accurate. They do give a good picture of what works, which is the important thing.

Anyway, enough with the disclaimers. Each table contains four columns:

Pages Per Visit

This is the average number of pages a visitor looks at. A higher number means they look around your site more, so keep an eye on this number.

Adding relevant links to the bottom of pages, or sprinkling them throughout your content can help. Be careful not to add too many links though, so you don’t distract visitors from downloading or buying your product.

Time on Site

The average amount of time a visitor spends on your site. Again, higher numbers are better, as it generally means they’re reading and not just skimming.

Bounce Rate

The bounce rate is the percentage of visitors that leave your site after a single page. For example, a visitor who enters your homepage and then types another link in the address bar without following your links has “bounced”. The lower this number, the better.

Download Rate

This is from a goal I set up in Google Analytics to track downloads. A lot of my sales come from people who buy from within the demo, so the higher this number the better. If a source of traffic doesn’t produce any downloads, it’s a sign that I’m advertising to the wrong people.

As you’ll see, there’s a big difference between the best traffic sources and the worst. The most traffic to sodaware.net comes from search engines, but search engine optimisation is a big topic that I wanted to avoid, so this article concentrates on sources that are easier to control.

Paid Advertising

Google AdWords

This is one of the easiest ways to buy traffic. All you have to do is write a short textual advert about your product or website, and then target keywords that people search for. It’s quick to set up, and you know visitors are looking for what you’re offering because they searched for it.

On the flipside, there’s a lot of depth to AdWords, and it takes a long time to get really great results. Throwing down a few dollars is only the start, and you’ll lot of your time will be spent on optimising your campaigns and weeding out underperformers.

Pages Per Visit Time on Site Bounce Rate Download Rate
3.18 01:24 32.6% 17.44%

 

Project Wonderful

Project Wonderful is even easier to use than Google AdWords. Create a graphical button or banner, select the criteria for sites you want to advertise on and you’re away.

Project Wonderful has the advantage that ads are extremely cheap, as you pay per day, not per click or impression. It’s a good way of getting lots of hits, and the campaign option makes things even easier. However, it’s quite easy to spend a lot of money and end up with little to show if you’re not careful.

Manual bids that are tailored to each site you’re bidding on seem to work the best. They takes more work, but the responses are generally higher.

Below are stats for the top three bids I ran.

Pages Per Visit Time on Site Bounce Rate Download Rate
3.52 01:11 61.0% 9.76%
2.42 00:50 59.3% 6.44%
2.08 00:47 59.8% 2.06%

 

Text Link Ads

According to Text Link Ads, the real power of this method comes from the increase in search engine ranking for your site. They recommend you leave your ad running for several months to evaluate it, as search engines take a while to update.

Over a five month period, I saw no change in my ranking. Having said that, I was trying to rank on very competitive terms, so it may be better for niche phrases instead.

These are statistics from the sites that ads were placed on. As you can see, the links themselves didn’t bring particularly good traffic compared to other methods.

Pages Per Visit Time on Site Bounce Rate Download Rate
1.35 00:05 88.4% 3.49%

 

Free Advertising

StumbleUpon

Although you can pay for Stumbles, I’m putting it in the free category as you can get good results without paying. Stumblers generally fall into two categories: People who will stay and read, and people who will leave within a few seconds. This dramatically skews the visit time down and bounce rate.

StumbleUpon brings in a big spike of traffic at the beginning, and quickly tales off after a few days. It continues to bring in visitors over time, and sometimes you’ll get secondary spikes. There’s also the chance that visitors will stumble your other content, leading to more spikes.

For the main page, the were quite poor, but for articles and resources it works much better. Your best option is to add tips, hints or guides to your site and have them stumbled.

Articles about unique qualities of your product will perform better, as long as you go easy on the sales talk and concentrate on writing something of value.

Pages Per Visit Time on Site Bounce Rate Download Rate
1.34 00:23 74.4% 0.58%

 

Article Marketing

This is a simple technique, but it can have good results. The process involves writing articles that target certain keywords. Each article will contain a link to your site in the article footer. This article is then submitted to article directories, which generally rank high in the search engines. For example, if you’re selling a solitaire game you could write about tips for playing the game and include a link at the bottom of the article.

It may sound a little bit spammy, but it isn’t if you provide value to your readers.

So far this has been one of the best methods of traffic generation I’ve used. It takes effort to research and write your article, but the traffic quality is extremely high. An article I wrote over a year ago still sends a good amount of traffic which converts extremely well into downloads and sales.

Article marketing is a topic I’ll be writing more about in the future.

Pages Per Visit Time on Site Bounce Rate Download Rate
2.37 00:46 42.8% 24.28%

 

Blog Commenting

Find a blog that relates to your topic, and make a relevant comment that contains a link to your website. As long as your comment is useful and the blog gets a reasonable amount of traffic, you’ll get visits. Depending on your contribution, you may also develop a relationship with the blogger which can bring more traffic.

The first result in the table below is the result of a single trackback I made three years ago. It’s brought several hundred visits (and still brings in a dozen or so a week), but the traffic doesn’t convert. This technique works much better for getting blog readers rather than customers.

Pages Per Visit Time on Site Bounce Rate Download Rate
2.60 02:28 48.3% 0.00%
1.83 00:09 66.7% 0.00%

 

Forum Posting

This is similar to blog commenting, but the link to your site goes in your forum signature. Again, the benefit here comes from generating an online presence, rather than raw traffic power.

These are the top three forum referrals to sodaware.net.

Pages Per Visit Time on Site Bounce Rate Download Rate
2.39 01:28 73.4% 1.06%
2.96 01:41 62.7% 0.00%
1.36 01:21 72.7% 0.00%

 

"How To" blog articles

Think of a problem you face daily, and write a blog article about solving it. Its simple, quick, and if you get the title (and problem) right you can get a lot of exposure and links.

I get a lot of traffic to one "how to" in particular, but the vast majority of visitors don’t stay for anything else. This makes sense, seeing as they’re searching for a solution to a problem and not for games.

The best advice I can give is to treat this method like writing a recipe with one of your products as the ingredient. This way you’re providing something valuable, and also encouraging downloads and sales.

Pages Per Visit Time on Site Bounce Rate Download Rate
1.04 05:29 94.3% 0.00%

 

Link directories

I tried an automated submission programme a while ago, but I’m yet to see a single visitor from any directory.

dmoz.org is worth submitting to, but as it’s human edited it can take a while to get added.

Pages Per Visit Time on Site Bounce Rate Download Rate
0 00:00 n/a 0.00%

 

Blog Carnivals

I’ve entered blog carnivals as well as hosted them, and the results have been a little mixed. Hosting brings in a decent amount of short term traffic, but I suspect it’s mainly people who submitted articles that visit.

It’s a good way of getting a few more readers for your blog, and be good for spreading your site around.

Pages Per Visit Time on Site Bounce Rate Download Rate
1.50 00:21 75.0% 0.00%

 

Game Buttons

I tried these out in my $19.95 experiment and absolutely hated them. I think they cheapened the look of the site, and most of the banners contained images I didn’t really want to see. The other problem is you have to make a lot of impressions to generate any decent amount of traffic.

Pages Per Visit Time on Site Bounce Rate Download Rate
2.84 00:59 41.3% 13.99%
1.67 00:21 71.4% 0.00%

 

Free Developer Resources

The "For Developers" section is where I put articles, source code and tools for other developers to use. It didn’t bring in much traffic to begin with, but posting about some of the resources on forums helped.

Pages Per Visit Time on Site Bounce Rate Download Rate
2.43 01:39 73.5% 0.86%

 

WikiPedia

This is a five minute method that works well, but if done incorrectly you’ll end up looking like a spammer, so use it wisely.

Find an article on WikiPedia that relates to something on your site, and add a link to it in the "External Links" section of the page. Remember that WikiPedia monitors links that are added, so if you don’t add value to the topic you’ll find your link nuked (and you could also be banned). For example, my interview with Hanako Games is on the Hanako Games WikiPedia page.

As with text link ads, the real benefit here is getting links and increasing your search engine ranking.

Pages Per Visit Time on Site Bounce Rate Download Rate
1.31 01:03 76.9% 0.00%

 

Traffic Exchanges

This one is a little hit and miss, although it’s not as bad as some of the other methods. You add your link to a directory, and its position is dependent on how many other sites you visit. For example, visiting 30 sites may put you on the first page, which will get you more visitors.

The downside is that most people are only visiting your page to increase their own rank, but the traffic isn’t as bad as I expected.

Pages Per Visit Time on Site Bounce Rate Download Rate
1.42 00:27

81.4% 1.53%

 

Conclusion

This is just a small sample of the various method of traffic generation techniques out there. If you’re trying to increase your site’s traffic, just remember to measure what your visitors are doing, not just how many you’re getting. Sure, it’s nice to see big numbers in your hit counter, but that means nothing if they don’t stay and buy from you.

Related posts:



How much traffic does $19.95 get you? – Part 2


In part 1 I gave an overview of the experiment and what methods were used. Today I’ll be explaining what happened. Just as refresher, here’s the idea behind this challenge:

“If I had $19.95 to spend on advertising and I had to do everything myself, what would give me the greatest return on investment?”

Results are split into two categories, “paid” and “free”. Where applicable the number of ad impressions and clicks are shown. There are also some exciting charts and analysis at the end too.

Paid Advertising

First up we have the paid advertising, the main focus of this experiment. The total number of hits generated was quite impressive for the amount spent. Sales and newsletter sign-ups were the best I’ve seen whilst the adverts were running, so something must have worked.

Google AdWords

Total Impressions / Clicks: 4823 / 66
Clickthrough Rate: 1.37%
Cost Per Click $0.18

I wasn’t really sure what to expect with AdWords, but I was pleasantly be surprised by the results. The cost per click was a little more than I would have liked, but the clickthrough rate was quite high for a first time ad on some pretty competitive keywords.

First time advertisers must pay a fee to set-up their account, so in effect only $9.95 of the advertising budget actually went on displaying ads.

Project Wonderful

Total Impressions / Clicks: 1037451 / 650
Clickthrough Rate: 0.06%
Cost Per Click $0.03

Project Wonderful use an auction based advertisement model, where the highest bidder has their ads displayed on their chosen slot.

To start with I placed a few manual bids to get a feel for how the site worked. Once I was more comfortable with it, I placed a campaign to last for the rest of the challenge. The campaign feature in Project Wonderful is a massive time saver and is quite comprehensive. Simply enter the criteria for sites you’d like to advertise on, and the system will go out and bid on appropriate slots.

One thing you’ll notice is that you often go under your bid limit. The total amount spent on Project Wonderful was $18.59, so there was a little change left to run a few more slots. Another important thing to note is that the most expensive ads are not always the best. A $3 bid on a rather busy site (icanhascheezburger.com/) only brought in around 30 visits, whereas $0.57 on rpghost.com brought in over 100.

Text Link Ads

Clicks: 20
Cost Per Click $0.85

I use Text Link Ads (affil) to generate revenue, so it seemed only right to try them out from an advertisers point of view. The ad cost $17, and with only 20 visits the cost per click wasn’t very good. To make matters worse, 80% of visitors left without clicking anything else on the site. Oh dear.

Of course, Text Link Ads is (or rather was) more about boosting search engine rankings by getting links for your keywords. Google has recently punished people who place text link adverts on their sites (including myself), so I’m not sure how this model of advertising will continue. In this case it wasn’t really worth the money, as any improvements in the site’s ranking have been wiped out by the latest Page Rank update. Oh well.

StumbleUpon

Visits: 281
Cost Per Click $0.07

Everybody knows the WWW is a huge time waster. StumbleUpon is time wasting on steroids. By entering your interests, StumbleUpon will let you “stumble” onto sites that fit into your likes and dislikes. I use it myself and have found hundreds of new sites I never would have seen otherwise. It’s really worth installing, especially if you have Firefox.

The idea behind StumbleAds is that you pay for “stumbles” from people interested in your site’s theme. Each stumble costs $0.05, and you can set how many will be used each day, which is useful for spreading the server load.

My first try at creating a campaign was rejected for not having enough visitors to send. I found this unusual as I’d submitted it in the “Video Games” section which apparently has around 154,000 subscribers. Changing the site to “Shareware” got it accepted, and I was away. $19.95 would effectively buy 399 visitors, but only 281 showed up in the log. I assume that means a percentage of visitors blog Analytics or JavaScript.

Free Advertising

The free advertising was much harder to measure, as it came from a lot of smaller sources which don’t usually have their own reporting features. The range of traffic was quite varied, with a few surprises as well as a few disappointments.

LinkReferral.com

Total Visits 76

LinkReferral.com is quite a simple idea. Your site is placed in a directory, and its position within this directory is dependant on how active within the community you are. By visiting other member sites you gain places, which improves your exposure. Writing (good) reviews and helping in the forums also improves your rank. Other members can also review your site so you get feedback.

Naturally it doesn’t work quite like that. Plenty of reviews consist of “Great site link me kthxbye”, and there are a fair few sites which are…below average. Having said that, for the amount of work it’s a good way of getting feedback and a few hits. Some of the reviews are quite useful, and I’ve had a few website errors pointed out by members.

Traffic wise, the bounce rate (number of people leaving without interacting) is about the same as StumbleUpon’s, which isn’t as bad as I was expecting.

Link Bait

Total Visits 965

Link baiting is the process of crafting articles and content with the deliberate intention to attract a big response. For an idea of what these articles are like, check out the front pages of digg or reddit.

The article that worked for me was “Game Design Lessons: Halo“, and a quick email to the editors at the excellent halo.bungie.org quickly got me over 800 visits. There were also a few referrers from other Halo fan sites as the link spread. Sadly Bungie didn’t visit my house with cake and an Xbox 360, or even and Xbox 360 cake. Maybe next time.

The only other attempt at link bait was the Pirate Week series of posts, which didn’t exactly set the Internet on fire. The Carnival of Video Game Bloggers also brought in a few visitors, but nothing compared to the Halo post.

Flashing Banners

Total Visits 190

You might have seen the square adverts if you’ve visited Flash arcade websites. Most of them animate far too quickly and include gratuitous flashes of cleavage to grab the viewer’s attention.

I’ll be honest. I ran the ads on this blog for a week and then had to remove them because I felt they were just too horrible. They were generating no traffic and made the place look untidy. I didn’t actually realise that one of the services (moregamers.com) gave out 50,000 free credits after a week of posting, which is where all 190 visits came from. Never again.

Forum Posts

Total Visits 13

I didn’t exactly go overboard with this technique, but I was still surprised at how poorly it did. I went for a more indirect approach with links in signatures and profiles instead of in actual posts, so perhaps that explains the poor response rate. It’s worth a try, but links need to be promoted a little more.

Blog Comments

Total Visits 0

:(

The Big Conclusion

Out of all the advertisements, creating link bait brought in the most visitors. However, most of them only stayed for the article and then left so sales weren’t really affected. Project Wonderful brought in lots of traffic from a wide variety of sites, and AdWords had a decent clickthrough rate and brought good visitors.

I promised charts, didn’t I?

PIE!

Exciting, isn’t it?

And finally, two heat maps from before and after the ad campaign (click for bigger images).

 Heatmap - Before

Before
1779 visits / 557 clicks

 Heatmap - After

After
3021 visits / 1222 clicks

The links to Cute Knight and Aveyond attracted a lot of clicks, especially from visitors referred by More Gamers. It must be the pretty pictures (and the fact that they rock).

So where does this leave things? As someone who’d never advertised online, it was easy to get started and quite nice to watch traffic appear with no more effort once the payment had been made.

One thing that’s worth pointing out is that it’s quite easy to blow a lot of money on advertising and see virtually no return. Different advertisers bring in different visitors, and spending money (or even time) on the wrong audience will quickly drain your resources.

From that perspective, Google AdWords brings in some of the most targeted visitors as they’re already looking for what you’re selling. Project Wonderful brings in a lot of traffic at a very low price, so it’s a great place to get started.

StumbleUpon didn’t perform nearly as well as I would have liked, but the content really wasn’t targeted well for StumbleUpon audience. Individual, focused articles tend to do much better than site front pages. In the past I’ve seen articles bring in thousands of visitors within a few hours, so it’s worth using to get some good exposure.

Text Link Ads were the biggest disappointment for me. The recent Google update hasn’t helped matters, but I did see a slight improvement in my search engine rankings shortly after the ad went live. A few well placed ads might still work for other search engines, but it takes a while for the visitors to show up.

The free advertisers weren’t as bad as expected. LinkReferral.com brings in a trickle of traffic, although the site users are looking for free advertising so may not be the biggest spenders. Some reviews are helpful though, and you may be able to build contacts if offering services and products to webmasters.

I still hate those flashing banners, even though they brought in nearly 200 hits. I really don’t see how they’re worth it for most sites as you have to generate around 100 impressions to get a single click. If you’re getting enough impressions to get a worthwhile amount of visitors from them, you really don’t need the help ;)

Forum posts and blog comments didn’t really do much for the traffic, but they’re easy to make and they may just catch someone’s eye. A few recommendations between friends can do more for your business than any amount of paid advertising.

More business articles: Sodaware.net – Article index

Related posts:



How much traffic does $19.95 get you? – Part 1


Traffic.

Traffic is the lifeblood of websites. Without people seeing your website, it’s just another piece of litter at the side of the Internet super-highway.

Digressing slightly, I really hate the term “Internet super-highway”. It has a real dot com boom feel to it. It’s the sort of term the media used when the online world was new and exciting and and everything that wasn’t electronic was going to become extinct.

Moving swiftly on…

There are plenty of ways to get more traffic. Whole websites and online communities are devoted to it. When starting out, it’s easy to just look at what free options are available. After all, why pay for traffic when you can get it for free?

The thing is, you may never find something better if you don’t experiment with the available options.

I decided to try it out.

This is part one of a two part series that covers an experiment I ran during September.

The Setup

The idea behind the challenge was as follows:

“If I had $19.95 to spend on advertising and I had to do everything myself, what would give me the greatest return on investment?”

Why $19.95? It seems to be the common price for a single Indie game, so it would make it easier to see what percentage of a sale went on advertising. It also meant I wouldn’t break the bank if things went wrong.

The “everything else” clause served two purposes. The first was to stop myself from spending money on advert designers. The second, and perhaps most important, was to act as an excuse in case the ads didn’t perform particularly well.

Finally I picked several forms of “free” advertising to try to see how they compared. I couldn’t use the $19.95 benchmark for these, but I needed some form of limit so I used “time”. My limit was thirty minutes a day on each method. That’s not a particularly long time, but I didn’t really want to devote a full eight hour day to commenting on blogs and forums.

Here’s the list of paid and unpaid advertisers I settled on:

Paid Advertisers:

  • Google AdWords — AdWords appear on nearly all Google search results pages, and AdSense is shown on a huge amount of other websites.
  • Text Link Ads — TLA sell text links on other sites that are designed to increase your search engine rankings as well as generate clicks.
  • Project Wonderful — Project Wonderful sell banner ads in a variety of shapes and sizes. Advertisers bid on different slots, and the highest bidding adverts are displayed.
  • StumbleUpon — Users install a browser toolbar, and are given random sites that will appeal to them when they click the “Stumble” button.

Free Advertising:

  • LinkReferral.com — Place your link within a directory, and increase your rankings by participating in the community.
  • Forum posts  — Make a post on a forum advertising your site and get traffic (and flames). I didn’t want to spam people, so I kept this to links in my profile and signature.
  • Blog comments — Find interesting blog posts that are related to your website and leave a comment.
  • Free banners — Square images that flash and generally annoy. Gain exposure by generating ad impressions and clicks.
  • Link bait — Articles deliberately crafted to attract attention.

So there we have the basics of the experiment. $79.80 to spend on four advertisers, and just under three hours a day to spend promoting the site.

Measuring the Results

It wouldn’t be much of an experiment without measuring the results. At the very least I needed to measure where visitors were coming from, but it would also be handy to know what they were doing once they arrived.

Most web-hosting comes with weblog analysis built in, usually Webalizer or AWStats. Several third-parties offer a more visual approach to visitor tracking, such as Crazy Egg and Google Analytics.

I decided to use Analytics to monitor where people were coming from, and Crazy Egg to see what they were doing once they arrived at the index page. Webalizer kept a watchful eye on the blog, but as the blog wasn’t my main focus I left it out of my main tracking.

What happened?

The full results of the experiment are revealed in part two, including how many hits each source generated and how much they cost per click. There’s also a rundown of how the free advertising performed.

There will also be charts like the one below. If that doesn’t get you excited, I don’t know what will…

Happy Traffic Chart

To give an idea of how things looked before, the following heat map was generated from 56 days worth of data before the test. That’s 1784 front page visits and 560 clicks, if you’re interested in precise figures.

Click the preview below for the full image.

It's hot

In total, the experiment generated an additional 2261 visitors in 30 days. Where did they come from, and what did they do once they arrived? All is revealed in part two

Related posts:



Get Free Links – Write a Review


We’d all like more traffic, wouldn’t we? Well here’s something quick and easy you can do that will not only bring in traffic in the short-term, but also increase your Google page rank so you’ll get more search traffic in the long-term.

All you have to do is write a review of the site. You can write anything you want, good or bad. The only requirements are that you link to this post, and you must also link to the main page (www.sodaware.net) using any of the following terms:

  • Free game downloads
  • Free computer games
  • Download computer games
  • Download free games
  • Downloadable games

Here’s a quick example of what we’re looking for:

Sodaware is a great website that features many free game downloads. You can get links and traffic by writing a review of the site.

As long as it includes the two links and the anchor text, the format is entirely up to you.

What you’ll get

Depending on the volume received, reviews will be published every two weeks. You’ll get a link in the update post, and also a link on this page. You’re free to choose the anchor text you’d like, as long as it’s not on the list of terms already mentioned. So that’s two links from this blog (currently a PageRank of 4) as well as the chance to increase your search engine rankings by choosing your own anchor text.

How to enter

Write your review as a single post, then send us an email with the following details:

  • Subject: Sodaware.net Review
  • Your name as you’d like it to appear
  • The URL of the review
  • Your homepage URL (should be the same domain as the review)
  • The anchor text you’d like to use

That’s all there is to it! As long as your site is legal and not pornographic in nature, your review should be posted within two weeks.

Related posts:



Turn hotlinks into advertising – part II


In Monday’s entry, I explained some simple techniques to turn a drain on resources into a free* method of advertising.

In today’s entry, I’ll be going into more depth about how to use a little PHP to dynamically generate your adverts. Why would you want to do this? For starters, you can modify the image to include a discount code, which will help track where the orders came from. Who knows, you could even strike up a deal with the site owner to display ads on their site should it bring you a lot of customers.

Please note that most of the code will just be fragments, and I’m not tying it down to one implementation. It’s quite likely that I’ll modify this method over time and post updates in the future. There’s also the small question of “is it worth it”. Again, I’ll keep you updated.

First things first

First, we’ll create a database table to store several things:

  • The full referring URL – The unique identifier.
  • The number of hits to this file.
  • The discount code, either for this URL or for the domain.

Nothing particularly complex there, although you may wish to tweak it to allow for different advert styles.

Basic PHP

Our file, which I’ll call “image-script.php” needs to carry out several functions:

  • Check to see if we’ve had a referrer from this site before.
    • If we have, log the hit and get the discount code
    • If we haven’t, create an entry and generate a discount code.
  • Create and output an image

Lets look at some sample code

[php]
// Get the referrer and look for this site in the database
// Please note: HTTP_REFERER is not a typo
$referrer_url = $_SERVER['HTTP_REFERER'];
$siteData = find_site($referrer_url);

if ($siteData) {
// Seen the site before, so grab discount code
add_site_hit($referrer_url);
$discountCode = $siteData['discount_code'];
} else {
// A new site, so create a discount code and add it to the db
$discountCode = create_discount_code($refferer_url);
add_new_site($referrer_url, $discountCode);
}

// Image Creation code
[/php]

Sample code to grab the referring URL and find the site in the database.

create_discount_code would need to be tailored to each particular solution, and I’ve deliberately left out the database code to save space.

Image Creation Code

The final bit of code is creating our image, complete with embedded discount code. You’ll need the GD engine installed to use these functions. More information about that is available in the image section of the PHP manual.

The code itself is relatively simple. We open an advert image, and then add the discount code to it before outputting it to the browser.

[php]// Image Creation code

// Setup where we want the code to appear
$codeX = 5;
$codeY = 5;

// Load advert image.
$advertImage = imagecreatefrompng(‘background-image.png’);

// Draw discount code
$textColour = imagecolorallocate($advertImage, 255, 255, 255);
imagestring($advertImage, 3, $codeX, $codeY, $discountCode, $textColour );

// Output our image and cleanup
header(‘content-type: image/png’);
imagepng($advertImage);
imagedestroy($advertImage);[/php]

Code to create and output our image to the browser.

In case you’re wondering if creating an image works, here’s one I made earlier (using slightly modified code for the shadow and position).

Image created using dynamic script.

One of the advantages of using dynamically generated images is that you can modify the code to perform a split test if you wish to check ad wordings or appearances. That falls outside the scope of this article, but I may write about it in future.

All done

So there we have it – how to change an unpleasant situation into something that can benefit your business.

The code is still a little rough around the edges, so I’ll be cleaning it up to make it ready for release. My goal is to create something that is simple to install and use, which will take some work.

In case anybody’s wondering, I’m using “iG::Syntax Hiliter” to produce the highlighted code snippets.

* Not including bandwidth costs, but seeing as your bandwidth was already being stolen at least now you’re getting some value out of it.

Related posts:



Complete Archives

Hot Game Downloads

American History Lux

American History Lux

Classic Risk with added history.

Build-a-Lot Build-a-Lot
Becoma a propert mogul and flip houses for big profits!
Fatal Hearts Fatal Hearts
Solve the mysteries behind your dreams in Fatal Hearts!

Free Game Downloads | Site Map | Links | Anonymous Feedback | Contact Us

© 2005 — 2012 Sodaware. All rights reserved. About Us | Privacy Policy