3 Ways to Get Your Amazon Affiliate Website Ready for the Holidays

The holiday shopping season is just around the corner. From previous years’ experience, I can safely predict that traffic to my Amazon Affiliate websites will likely increase 10x during the months of November and December, and if I make the right preparations, it is not unrealistic to expect earnings to increase just as much.

Here are 3 tips on how to get ready for the increase in online shoppers.

1. Check your Amazon Affiliate Links

Screenshot of Amazon Site with Error
It is not uncommon to find that products you linked to last year no longer exist. Amazon often keeps old product pages in their database, but if there are no sellers for the product, your readers can’t buy it.

A normal broken link checker will spot 404 errors, but it will not find links that point to out-of-stock products because the page still exists, even though the product doesn’t.  For that, you need an Amazon-specific link checker which actually checks each product you link to.

If you use WordPress, you can automate this task with the Check Amazon Links WordPress Plugin. It will automatically search your website for links and it will alert you of links to out-of-stock products.  It tells you what post(s) or page(s) it found the out of stock links on, and then you can easily update the link to a similar in-stock product.  With the jewelry and clothing categories especially, often you will find the same product available on another Amazon page, so you just need to update the ASIN to the correct one.

The Check Amazon Links plugin also looks to see what affiliate tag you are using, which makes it easy to spot any links with missing or incorrect affiliate tags.

There are some things you need to check for that can’t be done automatically.  To maximize your conversion rate with Amazon links, you should make sure that the links point to products that meet the following criteria:

  • The product is the newest model or edition
  • The product has positive reviews
  • The product has a competitive price from trustworthy sellers

Some links need to be updated every year.  For example, if you link to a calendar, you will have to change the link to next year’s calendar as soon as it becomes available.  No one is going to buy last year’s calendar.  You can search your blog for the keyword “calendar” and then correct all posts that link to calendars.

Likewise, electronic items often have new models every year.  Sometimes, last year’s model is actually quite desirable, but in other cases, the old model lacks sought after features and is not likely to sell.  You will have to manually inspect each link and decide which model your readers are most likely to purchase.

Your job as an Affiliate marketer is to make life easy for your readers.  If you point them to what they are most likely looking for, you will be more likely to make the sale.

2. Optimize your Website for Search Engines

Now is an excellent time for Search Engine Optimization (SEO).  It’s true that search engines like good content, but if you write content without thinking about search engines, you might be missing out on traffic.

Your page should be formatted in a way so that your title, meta description, and headings all contain your keywords.   The Yoast SEO plugin makes optimization of the description and title for each page easy.  It shows you a preview of what your page might look like in the search results, like this:

Yoast SEO Plugin for WordPress Screenshot

 

In addition to optimizing your website for your target keywords, you also want to check how your site is doing with two technical issues: website loading speed and mobile friendliness.

Mobile friendliness is a factor that Google uses to determine you search engine ranking on mobile devices. Google provides a tool to test your website for mobile friendliness.  If your site doesn’t pass, then you will likely need to make changes to the HTML & CSS.  If you are using WordPress, you may need to edit your theme or install a new one.

Your site’s loading speed is also an important factor in how well your site ranks.  Google has this tool for testing page speed.

3. Consider Upgrading your Hosting Plan

If your site is slow, you may want to upgrade to a faster hosting plan before the large increase in traffic that comes from holiday shoppers.  Personally, I’ve noticed that sometimes big sites become slow during Black Friday, Cyber Monday, and the days right before Christmas.  That tells me that they weren’t ready for all of the traffic.

So are you ready for 10x the traffic?  You could ask your hosting provider what would happen if you got a 10x increase.  If you are using shared hosting, the traffic that other sites on your server gets also effects you.

Think about all of the money you could lose if your site goes down during these popular shopping days.  I think it’s better to be prepared.  Spending a little extra money on a better web host or hosting plan can really pay off.  Personally, I use SiteGround and I have been happy with how their SuperCacher speeds up my websites.  Also no downtime!   I guess there is a reason that they list at the top of many web hosts comparison charts/surveys.

What are your suggestions?

Are you an experienced Affiliate Marketer?  Do you have some tips for beginners?  Please post a tip or two, either about affiliate blogging in general, or something specific to holiday sales.  Thanks!

How to make your plugin have universal settings on Multisite WordPress?

While updating my Check Amazon Links plugin to work with WordPress Multisite, I struggled with how I could make my plugin settings universal across all network installs.  More specifically, I wanted it to be an option that could be turned on and off.  I tried to find a way to implement a hook or filter for when the plugin options were being updated via the settings page, but I had so much trouble with that, that I finally decided to use some Javascript.  Yay for javascript!  Sometimes it’s the easier option.

First, I added the option to my settings page, but only on multisite installs.  Here’s what it looks like:

Multisite Option on my WordPress Plugin (Check Amazon Links)

Next, I wrote the Javascript (jQuery) code to respond to submit events:


jQuery(document).ready(function () {
    var option_page_name = jQuery('input[name=option_page]').val();
    if (typeof(option_page_name) != "undefined") {
        if(option_page_name === 'amazon_link_plugin_options') {
            jQuery('form').submit(function(e) {
                var update_all = jQuery('select[name="azlc_multisite_same[toggle]"]').val();
                if(update_all === '1') {
                    jQuery.post(ajaxurl, 'action=azlc_ms', function(){});
                }

            });
        }
    }

});

As you see, my code checks the page name to insure that it only sends the AJAX request if it’s MY plugin’s page.   I add that javascript code to a javascript file I already enqueue.

Here’s the PHP WordPress Backend code for handling the Ajax request:


if(is_multisite()) {
	add_action('wp_ajax_azlc_ms', 'azlc_ms');
}

function azlc_ms() {
	add_site_option( 'azlc_update_from', get_current_blog_id() );
}

 

And here’s the PHP WordPress code the updates the options:



if(is_multisite()) {
	add_action('plugins_loaded', 'azlc_multisite');
}


function azlc_multisite() {
	global $wpdb;

	// check for flag 
        // I call this a flag because its existence means that this code needs to run.
        // You could write this to make it more human readable
	$blog_id = get_site_option('azlc_update_from');
	if($blog_id) {
		// switch to the blog to copy the actions from
		switch_to_blog($blog_id);
		$options = get_option('azlc_plugin_options');
		// copy settings to all sites
		AmazonLinkCheckerCore::copy_settings_from($blog_id, 'azlc_plugin_options', $options );
		// remove flag
		delete_site_option('azlc_update_from');
		// switch back
		restore_current_blog();
	}
}

 

And here’s the code that actually does the copying:


	public static function copy_settings_from($source_id, $option_name, $option_value) {
				global $wpdb;
				$sql = "SELECT blog_id FROM $wpdb->blogs";
				$blog_ids = $wpdb->get_col($sql);
				foreach($blog_ids as $blog_id) {
					// update option on other blogs
					if($blog_id!=$source_id) {
						switch_to_blog($blog_id);
						update_option($option_name, $option_value);
					}
				}
				restore_current_blog();
	}

 

Related Tutorial

Don’t miss this related article: How to Enable WordPress Multisite for your Plugin

Your feedback is important

I write this blog with sincere hope that I can help other WordPress developers.  Please let me know if this helped you, or if I made a bad error.  Thanks!

How to make your plugin compatible with WordPress Multisite?

How to Enable WordPress Multisite for your Plugin

So you have written a WordPress plugin, and need to enable it to work with WordPress Multisite.  Multisite allows the Network admins to install plugins on all their network blogs at once.

When it comes to plugin development, adding this feature is really not too difficult, but there are not many tutorials available to follow.  And while working on this feature, I came across one prominent tutorial with code that just didn’t  work.  So here’s the code that actually works!  This is written for version 4.3 and should work for WordPress versions as early as 3.0.0.

The code shown below is an excerpt from my Check Amazon Links WordPress Plugin.  Of course, you will have to change the function and class names to the names used in your plugin.

Code that actually works!

First, the Hook.  My hook looks like this because my activate function is inside of the class AmazonLinkCheckerCore:


register_activation_hook( __FILE__, array( 'AmazonLinkCheckerCore', 'activate' ) );

This hook will run on both single sites and multisite WordPress installations.  There is no need to specify a different activation hook for multisite, if you write the function as follows.

The function that’s called:


     public static function activate($network_wide) {
		if(is_multisite() && $network_wide) { 
                // running on multi site with network install
		        global $wpdb;
			$activated = array();
			$sql = "SELECT blog_id FROM $wpdb->blogs";
			$blog_ids = $wpdb->get_col($sql);
			foreach($blog_ids as $blog_id) {
				switch_to_blog($blog_id);
				AmazonLinkCheckerCore::implement_activation();
				$activated[] = $blog_id;
			}
			restore_current_blog();
			update_site_option('azlc_multisite_activated', $activated);

		} else { // running on a single blog
			AmazonLinkCheckerCore::implement_activation();
		}

		// this sets a transient and should only be done once 	
                // put any code that should only happen once, network-wide, here:
		    self::activate_about_page();

	}

Note that my activation code uses a transient to display the settings page after activation. Setting this transient on each blog caused a big bug, so I moved that code outside of the foreach loop.  If you don’t use a transient, just delete that line, but I left it here for demonstration purposes.  If you do use a transient, then change the code to point to the function that you wrote that generates the transient.

The function that’s called by the above function:


      public static function implement_activation() {
            // put your activation code here
            // for example, install databases
            // initialize options
            // whatever your plugin already does on activation, move here
      }

 

You will also need to change your deactivation code so that it works in a similar manner to the above activation code.  Depending on your plugin, you may need to loop through all of the blogs and perform your deactivate code on each one.

Add this to your deactivation code:


delete_site_option('azlc_multisite_activated');

Also, add code to check if any new blogs were installed on the network

This code will check if there are any new blogs installed and it will activate the plugin on those too.   This ensures that your plugin always runs on every single blog on the network.


	add_action('admin_init', array('AmazonLinkCheckerCore', 'multisite_check_activated'));

	public static function multisite_check_activated() {
		global $wpdb;
		$activated = get_site_option('azlc_multisite_activated');
		if($activated == 'false') {
			return false;
		} else {
			$sql = "SELECT blog_id FROM $wpdb->blogs";
			$blog_ids = $wpdb->get_col($sql);
			foreach($blog_ids as $blog_id) {
				if(!in_array($blog_id, $activated)) {
					switch_to_blog($blog_id);
					AmazonLinkCheckerCore::implement_activation();
					$activated[] = $blog_id;
				}
			}
			restore_current_blog();
			update_site_option('azlc_multisite_activated', $activated);
		}
	}

 

 

Other Considerations

  • If you have a settings page, it will appear on each blog.  If you want to make the settings universal across all network blogs, you will have to implement a way to copy the settings from one blog to all.  Read this tutorial: How to make your plugin have universal settings on Multisite WordPress.
  • You may find settings that should always be the same on all blogs.  In that case, you want the setting to be a SITE OPTION instead of a regular option.  Instead of “update_option” use “update_site_option.”

Your feedback is important

I write this blog with sincere hope that I can help other WordPress developers.  Please let me know if this helped you, or if I made a bad error.  Thanks!