Configuration

Herein lies the description of the plugin’s configuration options. You can access these settings via the Settings -> Link Cloaker tab.

The configuration page is divided into several sections. I’ll discuss each of them in turn.

Link Cloaking

General

The “General”  section defines where the plugin will look for links that need to be cloaked. There are two main options :

  • Cloak links in post/page content – The plugin will cloak only the links it finds inside posts and pages. Links in any other parts of your site – like the sidebar and comments – will be left uncloaked.
  • Cloak links in any part of the site – Just what it says on the tin. The plugin will cloak links in posts, the sidebar, header, footer, the comment section, etc.

You can also set whether the plugin should cloak links in your RSS feed(s) by checking /unchecking the Also cloak links in the RSS feed box.

Cloaking Mode

The “Cloaking mode” section determines which links will be cloaked. Again, there are two options :

  • Cloak All Links. In this mode the plugin will cloak any and all links it encounters. You can prevent individual links from being cloaked by adding the domain name(s) to the exception list (see below), or by adding the <!--nocloak--> tag to each link like this : <a href="http://example.com/" ><!--nocloak-->Link Text</a>
  • Selective Cloaking. In this mode the plugin will only cloak the links that match one of the domains on the inclusion list (see below) and links that you explicitly tag for cloaking using <!--cloak--><a href="http://example.com/" ><!--cloak-->Link Text</a>

Exception/Inclusion Lists

The exception/inclusion list provides you with another level of control in determining which links will get cloaked :

  • Add domain names to the exception list to prevent links to those domains from being cloaked (in “Cloak All Links” mode).
  • Add domain names to the inclusion list to allow links to those domains to be cloaked (in “Selective Cloaking” mode).

Both lists have the same basic format – one or more domain names, separated by newlines. A link will only count as matching the exclusion/inclusion list if it’s domain name is exactly the same as one of those on the list. For example, “example.com” and “www.example.com” will be treated as different domains. When in doubt, enter both variations.

Note that only the list relevant to the currently selected cloaking mode will be shown at any one time.

Link Prefix

The link prefix determines, in part, how your cloaked links will look. The easiest way to explain it’s function is with a few examples. With the default link prefix “goto”, your cloaked links would look like this :

  • http://yourdomain.com/goto/link_text/123/ – unnamed, automatically cloaked links.
  • http://yourdomain.com/goto/LinkName/ -  named links, created by the user (i.e. you).

You can use any link prefix you like. Common choices include “more”, “likes”, “recommends” and so on.

(Note : The above cloaked URL examples assume your server has mod_rewrite installed and that you’re using “pretty permalinks” on your blog. The cloaked URLs will look slightly different in other setups.)

Cloaking Type

When a visitor clicks on a cloaked link they need to be somehow transported to the original, uncloaked URL. In the “Redirect type” section you can choose how, exactly, that will work.

  • 301 Permanent Redirect - A plain old HTTP redirect. Fast and unnoticeable, but it lets some SEO value/pagerank flow to the linked site.
  • 302 Found - Pretty much the same as the “301 redirect”, except that it doesn’t pass SEO value. This is the default setting.
  • 307 Temporary Redirect - Very similar to the above. Most browsers will treat it exactly the same as “302 Found”.
  • Double Meta refresh – This useful technique will clear the referer info so that the owner of the linked site can’t tell that the visitor came from your site. Works in Internet Explorer and Firefox, which accounts for about 88% of of Internet users. Doesn’t work in Opera or Chrome – the visitor will be redirected correctly but the referer data won’t be cleared.
  • Show the target site in a frame – Displays the target side inside a frame. The main advantage of this technique is that, unlike with all the other redirect types, the address bar will still show your cloaked URL even after the redirect.

Tweaks & GA Tracking

The “Tweaks” sections lets you enable/disable a handful of minor customizations that can be automatically applied to all cloaked links. Most of the tweaks are self-explanatory :

  • Prevent search engines from following cloaked links by adding rel=”nofollow” - exactly what is says.
  • Open cloaked links in a new window - ditto.
  • Track clicks with Google Analytics – see below.

Enabling click tracking with GA lets you use the full power of the Google Analytics suite to track and analyse clicks on your cloaked links. Once this setting is enabled, all the cloaked links that someone clicked on your site will show up as /cloaked/LinkName/ (for named links) and /cloaked/uncloaked_url_here/ (for unnamed links) in the Content -> Top Content tab of your Analytics account.

To make this work, you will need to have the GA tracker code already set up on your blog. This can be easily done with an Analytics plugin like Ultimate Google Analytics (freeware). Also note that if you post one of your cloaked links on another site, people that click it on that site won’t be counted by the GA tracker (the basic built-in tracking will still work however).

For more information about named and unnamed links and the build-in click tracker, check out the link management guide

Keyword Autolinking

General

The “General” section lets you enable/disable the feature that automatically turns keywords into links. You can specify the keywords by adding or editing cloaked links in the Tools -> Cloaked Links tab.

  • Enable autolinking - If this box is unchecked, you will still be able to add or edit keywords, but the plugin will not scan your posts and turn the keywords into links.
  • Process only single posts and pages - Only autolink keywords on individual posts/pages, not archives or search results.

Max. links per post

This field determines the maximum number of keyword links that the plugin may insert in one post (or page).

Max. links per keyword

Just like “Max. links per post”, except that this one specifies the maximum number of inserted links per keyword (in a single post). You can also override this setting for certain links.

This setting can behave slightly counter-intuitively when you assign more than one keyword to a link, so here’s an example : lets assume you’ve set the max. links per keyword to 3 (the default setting) and added a cloaked link with the URL “http://google.com/” and its Keyword(s) field set to “search engine,google”. Now, if the plugin encounters a post that contains two instances of “search engine” and four instances of “Google”, it will create three links in total : two for “search engine” and one for “Google”.

Ignore Posts and Pages

Sometimes might want to  turn off the autolinking feature for certain posts or pages. This is easy to do – just enter the post’s ID, slug or name in the “Ignore Posts and Pages” box. You can make the plugin ignore multiple posts by separating their IDs (or slugs, etc) with commas.

Ignore Tags

If you don’t want the plugin to create links inside certain HTML tags (e.g. headings), you can specify the list of excluded tags in the “Ignore Tags” box.

Custom CSS

This setting lets you customize the look of automatically inserted links. When it’s enabled, the plugin will add the CSS class “autolinked” to all keyword links it creates. You can specify custom CSS rules for this class either by entering them in the “Custom CSS” text box, or by adding them to your theme’s stylesheet.

For example, this CSS code will make all keyword links green :

a.autolinked {
     color: green;
}

Tweaks

Like with cloaked links, you can also apply several tweaks to automatically inserted links.

  • Prevent search engines from following automatically inserted links – adds rel=”nofollow” to the links.
  • Open automatically inserted links in a new window – self-explanatory.
  • Always cloak automatically inserted links - If you leave this box unchecked (the default), automatically inserted links will be treated just like any other link and cloaked (or not) according to the cloaking settings explained above. If you enable this option, automatically inserted links will always be cloaked – even if they match the exception list.

Conversion Tracking

Some affiliate programs offer an option to insert custom tracking code on the order confirmation page. With Eclipse Cloaker, you can use this feature to keep track of how many of the people that click your cloaked links actually buy the product you linked to.

  • Enable conversion tracking - Conversion tracking is disabled by default. Enabling it will add a new “Conv.” (conversions) column to  the link table on the Tools -> Cloaked Links page and make the plugin display daily conversion statistics on the link statistics chart. See the Link Management guide for more details.
  • Tracker code – This is the tracking code that you need to place on the merchant’s confirmation page to track conversions.