Browse: |
Tutorial » |
Subcategories: |
This has been taken from the blog over at Insight-UK, where the affiliate manager Bob came up with the method for you to rewrite your URLs, here it is straight from the post:
There are currently 2 methods to embed the Content Units into your website. JavaScript, or PHP. The JavaScript method is the easiest but is not the best as Search Engines cannot index JavaScript. If you have the technical skills, you can drop the PHP code that ECU supply directly into your website. This allows search engines to know what products you are offering. However, there is still the downside that for every product you promote you have an external link to easycontentunits.com. This is generally bad SEO practice as every external link is a drop in page rank. Thankfully, ECU provide the ‘rel=”nofollow”‘ code in the anchor tags, so you shouldn’t be penalised too much, if at all. In addition, most PHP servers have a security setting which prevent this code from running.
There is the fact that some folks just prefer to see that the links are on their own website, rather than an external website. For this reason, I’ve come up with a different bit of PHP code. If you use the PHP code supplied by ECU; then I’d highly recommend you implement this code. For an example of both php methods go here:
http://iq.insight.com/blog/ecu.php
The code is as follows and goes wherever you want the content unit.
/*
Retrieve HTML for Easycontentunits.com product unit.
Note: 'fopen wrappers' must be enabled. Requires PHP 4.3.0. or above.
*/
/*
Code by Bob DeVeaux for ECU
This re-writes the ECU link to the same domain as the code
*/
// function for downloading file
function curl_get_file_contents($URL)
{
$c = curl_init();
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_URL, $URL);
curl_setopt($c, CURLOPT_CONNECTTIMEOUT, 5000);
curl_setopt($c, CURLOPT_TIMEOUT, 10000);
$contents = curl_exec($c);
curl_close($c);
if ($contents)
{
return $contents;
}
else
{
return false;
}
}
$ecu_mid = 839; // your member id
$ecu_uid = 20212; // your unit id
$ecu_tracking = ''; // optional tracking id
$ecu_keywords = ''; // optional keywords for random product unit
$ecu_debug_mode = 'no'; // debug mode (yes or no)
$domain = "http://".$_SERVER["HTTP_HOST"];
$path = '/blog';
$ecu_url =
'http://www.easycontentunits.com/phpunit.php?ecu_mid='.$ecu_mid
.'&ecu_uid='.$ecu_uid.'&ecu_tracking='.urlencode($ecu_tracking).
'&ecu_keywords='.urlencode($ecu_keywords).'&debug='.$ecu_debug_mode;
// cURL download file.
if($content = curl_get_file_contents($ecu_url))
{
$content = str_replace('href="http://www.easycontentunits.com',
'href="'.$domain.$path, $content);
print $content;
}
You then need your own version of product.php in the location you specified for ‘$path’.
$domain = "http://".$_SERVER["HTTP_HOST"];
$qs = explode('product.php', $_SERVER['REQUEST_URI']);
$url = 'http://www.easycontentunits.com/product.php'.$qs[1];
header('HTTP/1.1 301 Moved Permanently');
header("Location: ".$url);
The final step is to prevent search engines from spidering the redirect page by editing your robots.txt.
Disallow: /PATH_HERE/product.php
Amazon Users
If you have products from Amazon in your units, you will also need to add the following page:
amazon_product.php in the location you specified for ‘$path’.
$domain = "http://".$_SERVER["HTTP_HOST"];
$qs = explode('amazon_product.php', $_SERVER['REQUEST_URI']);
$url = 'http://www.easycontentunits.com/amazon_product.php'.$qs[1];
header('HTTP/1.1 301 Moved Permanently');
header("Location: ".$url);
Plus the robots file will need amending to:
Disallow: /PATH_HERE/product.phpDisallow: /PATH_HERE/amazon_product.php
I’d like to thank Bob DeVeaux for coming up with this solution for us. If you would like to include any Insight products in units, or indeed use their Weekly Deals managed unit, that would help thank them for this useful code.
A frequent question among the niche site owners is ‘how many products should I add to a unit?’ Of course for many this can be dependent on the number of product available, however for home pages, you might think that you should show all the available products from all the merchants. Well this is one way to do it, and with our paginated units, this can be easily achieved, however stop and think about it for a moment.
As a visitor to a website, how many show all their products on the home page? If they did, would you wade through them? How many pages do you think a visitor may go through before getting bored and give up on your site?
The same can be said for search results, most people never stray too far from page one, and very few will go through to page 3 before trying a different search, same is said for shoppers I would say.
Better for your niche site home page is a selection of best selling products, and a clear navigation for visitors to drill down to the actual product they are after. The home page is the one which most people will stop on for (at best) a minute or so before hitting the back button, or if you hook them in, a link on your navigation menu.
So back to the original question, I would say that between 5/10 top sellers would be a good number. Along with your text and navigation this should give your users a good feel for your site, and provide them the choices.
You could then look to divide your navigation by a number of means, popular are by price/colour/brand/size/model numbers, this is very dependent on your chosen niche, and lets not forget you could split up the pages by more than one variable.
Like the home page, the category pages will benefit from a best selling bunch of products rather than the whole lot, with links to the individual product pages. I would however increase the number of products to say 15/20 for these pages. This shows more choice and that you have a wider range of products available.
Finally on the individual product pages, the favoured option is to provide some price comparison for the item, and another unit with ‘related’ or ‘accessories’ type products in it (again limited to say 5 products). The price comparison unit, will have as many products’ as there are merchants selling it, which is fine, you could also choose to include one or more merchants who should be selling it in there as well, to show you have covered the entire sector.
To see how others are using ECU on their Niche sites, check out our Showcase.
If you have any further questions about the number of products showing in the units, please ask away below or on a support ticket.
We have recently launched our own Last Order Dates content unit which we have made available to affiliates to use on their sites. We are updating this unit with new dates as we get them, as well as removing listings as time passes.
If however you would like to feature your own list of merchants, I thought it would be handy to show you how we did it (creating your own Last Order Dates units are available for Pro Members Only):
Before I do, please ask us if you would like us to drop a copy of our unit into your account, so that you can edit the merchants featured, save making one from scratch. This service is for Pro Members only
First you’ll need to create a new ‘Search based’ unit. Pop in a name for the unit, ensure the ‘Search’ is selected and click on continue.

On the search page, click on the link marked ‘Add Merchants (non product)’

This will open up a merchant selection page. Simply tick all the merchants you’d like to feature in this unit.

Click the ‘Add Merchants’ Button at the bottom of the page when you have selected all the merchants you would like to feature. Don’t worry you can come back later and add/remove merchants from the unit if you wish.
Next onto editing the merchant details. To achieve the Last Orders Unit, we changed the Product Title to the date, and the Product Description to the type of delivery (you can add further information here if you like such as price of delivery/expected delivery time etc). You will also need to ensure the deeplink is correct and has your affiliate ID in it.

I have edited the details for Flying Flowers, but not for Interflora
Once you have edited all the merchants that you added, then it’s back to the styling page, via the ‘Customise Unit’ link at the top of the page. You can style the unit any way you like. Make sure you only show the information you need like merchant logo, product name and description. You’ll not need price in this instance. You could show a ‘Shop Now’ call to action if you’d like.
Once you have finished styling, that’s it the unit is ready for your site.
You can add/remove merchants any time, by following the Add/Remove Merchant’ Button on the Unit Edit Page. Once you save the changes, they show live in your unit.
Good luck! If you’d like us to create a last order unit for any vertical, please ask, and we’ll manage it too!
We have been asked about if ECU can be integrated with Google Analytics, and we featured the following post on the A4U Forum, but I thought we’d pop it here too (note this is only available for Pro members who have a fair knowledge of PHP):
There is a way to send your unit click information to google analytics, Ive not tested this method myself yet though.
In your ‘My Details’ page, enter the ‘Callback URL’ value.
an example url:
http://www.mydomain.com/myscript.php?unitid=[UNIT_ID]&product=[PRODUCT_TITLE]&datetime=[CLICK_TIME]
This url should point to a small PHP script that sits on your own website (I’ll get to that in a minute).
Within the callback url, you can specify which information you want to send to the PHP script. Other parameters are listed in the dropdown help for the Callback URL.
When a click occurs, we send that specified information to your PHP script, which then forwards it to google analytics.
This is the PHP script that I have found that should do the trick:
Google Analytics without Javascript – PHP – Snipplr
There are 3 lines that you will need to edit within the PHP script:
PHP Code:
$var_utmac=GOOGLE_ANALYTICS_CODE; //enter the new urchin code
$var_utmhn=WEB_DOMAIN; //enter your domain
The other line is where you will place any value/values that you want to send to google:
PHP Code:
$var_uservar=$storeinfo["storeid"]; //enter your own user defined variable
You could replace the $storeinfo["storeid"] part with any of the values that we have sent to the script, ie
PHP Code:
$var_uservar=$_GET['product_title'];
or:
PHP Code:
$var_uservar=$_GET['unit_title'].’:’.$_GET['product_title'];
This probably sounds more convoluted than it actually is, but its the only way that I’ve found that could work.
Good luck
Here is the full PHP script:
PHP Code:
$var_utmac=GOOGLE_ANALYTICS_CODE; //enter the new urchin code
$var_utmhn=WEB_DOMAIN; //enter your domain
$var_utmn=rand(1000000000,9999999999);//random request number
$var_cookie=rand(10000000,99999999);//random cookie number
$var_random=rand(1000000000,2147483647); //number under 2147483647
$var_today=time(); //today
$var_referer=$_SERVER['HTTP_REFERER']; //referer url$var_uservar=$storeinfo["storeid"]; //enter your own user defined variable
$var_utmp=”http://”.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];$urchinUrl=’http://www.google-analytics.com/__utm.gif?utmwv=1&utmn=’.$var_utmn.’&utmsr=-&utmsc=-&utmul=-&utmje=0&utmfl=-&utmdt=-&utmhn=’.$var_utmhn.’&utmr=’.$var_referer.’&utmp=’.$var_utmp.’&utmac=’.$var_utmac.’&utmcc=__utma%3D’.$var_cookie.’.’.$var_random.’.’.$var_today.’.’.$var_today.’.’.$var_today.’.2%3B%2B__utmb%3D’.$var_cookie.’%3B%2B__utmc%3D’.$var_cookie.’%3B%2B__utmz%3D’.$var_cookie.’.’.$var_today.’.2.2.utmccn%3D(direct)%7Cutmcsr%3D(direct)%7Cutmcmd%3D(none)%3B%2B__utmv%3D’.$var_cookie.’.’.$var_uservar.’%3B’;
$handle = fopen ($urchinUrl, “r”);
$test = fgets($handle);
fclose($handle);
?>
Let us know how you get on, and if you have any changes/improvements for this we can share with our other users
One of the uses of Easy Content Units is to ‘power’ price comparison on your website. So you have already created a page full of unique content on a particular product, now you’d like to show it’s prices from the many merchants selling it on the web – well worry ye not! Here’s a guide on how to do it:
First off, create a unit, and add all the merchants to it who are selling your item. For products with a model number, it’s usually best just to search for that. You may need to differ the search query if not all the merchants come up first – see our guide to finding the products you want.
Once you have them all in, click on customise unit.
On the UNIT ADMIN tab
Check that ‘Order By’ is set by Price
Choose/set a Buy Now button if you wish to show one
On the UNIT SIZE tab
Select Vertical Layout
Change the number of rows and columns to the desired shape for the number of merchants included in the unit
On the CONTENTS tab
Deselect all options apart from Price and Merchant Logo
Change Unit Alignment to ‘Center’
On the ADVANCED STYLING tab
Change any setting you require on this tab for example remove the border or show a title for the unit, if you wish
Click on Save/update button and that’s it
If you have a number of units to make, then I would recommend that you save this layout as a template. To do this, return to the UNIT ADMIN tab, and click on ‘Templates’.
Put a name in the box for the template (like Price Comparison)
Click Save
To use this template on the next unit, create the unit, then return to the template options, use the drop down to select the template, and click on ‘Apply to Unit’ button. All the settings should now be loaded.
Double check the appearance of the unit in case you have more or less merchants this time around, and that’s it.
For some inspiration about what can be achieved, take a look at how others are using ECU for Price comparison
If you would like a guide on how to do something else with Easy Content Units, please let us know below or in a support ticket.
For those who hate having to change all the settings for each unit that’s made, we have introduced Templates. You can save the settings for one unit, and apply it to future/past units quickly and easily.
You’ll find the template options on the Admin Tab, click on Templates and the following options are available:

Once you are happy with the style of your unit, open up the Template options (as seen on the Admin Tab above). Enter a name for the new template and click on save.
Selecting a Template:
Once saved the template will appear in the drop down box under ‘Select a Template’. You can delete it or rename it by clicking on the appropriate option.
Applying a Template:
Once you have made a new unit, visit the template options, and use the drop down to select the wanted template. Click on apply to load all the settings. You can also apply the template retrospectively to units you already have by clicking on the apply selected template to other units. This is particularly good if you change the look of your site, or decide to create your own buttons.
We hope that the template system will save you time and effort if you have any questions or ideas for improvements, please let us know below or via a support ticket.
As affiliates we know the value in put up and forget solutions, everyone is looking for an easier life, without having to check this and change that. If the solution could also get results and become one of my top performing pieces of creative then that would be excellent.
This is where we came up with the idea of expanding Easy Content Units to merchants, so they could provide us affiliates with just that, a top piece of creative that can be put up and forgot. That’s how Managed Units started off, then we thought, the merchant just doesn’t make them the way I would to fit in with my site, plus wouldn’t it be cool to include the units in my stats, so that we can check that things tally up with the networks, and so a revamp to our Managed Units did just that.
So the key features then:
Managed Units suit the following uses:
Using Managed Units
Here’s a step by step guide to using Managed Units:
Visit the Managed Units page and pick your merchant
Click on the name of the merchant
All the available units for the merchant is presented with a description
Click on View unit to see what products are currently included
If you’d like to add this unit to your site, tick the box and click submit
You can then edit the unit in the usual way, changing any aspect apart from the products listed
Once you’re happy take the code and place it on our site
Your comments:
If there are any barriers to you using the Managed Units that we haven’t addressed please let us know below or via our contact form
OK you have asked for a merchant account, and been emailed your log ins, but now what? Don’t panic, forget the words datafeed and content units, I know they strike fear in those who are not technically minded. Instead think ’search – tick – job done’ as this is how easy it is!
Once you log into ECU you’ll have the following box staring at you:

Enter a name for your unit (you can change this later) something like ‘Bestsellers’ will do nicely.
Make sure the Search is highlighted and click on ‘continue’
Here’s the search box you’ll find on the next page:

You’ll find tips for finding the products you want on this page, so assuming all is well, type in the product name of your first item for our unit, use the drop down to select your program and click on ’search’
Results will appear below. Find the specific product(s) you want to feature and tick the box next to it. At the top and bottom of the results is an ‘Add Products to Unit’ button, click on this and you’ll see the product appear in a blue box at the top of the page. This box shows all the products you have selected (and the means to remove them).
Repeat the searches until you have all the products you need. We’d suggest 6/7 products to be enough to show the top 5 products on the site, and have spares should 1/2 go out of stock before you have updated the unit.
Once all the products have been selected, click on ‘Customise’ button. As the affiliates will customise the units for themselves there’s little to concern yourself with here, except we’d suggest:
That’s all we would suggest on this page, so click on ‘Save/Update Unit’ and your unit is ready. Incidently, when you update your unit, as soon as you click on this button, any changes you have made will be instantly updated on your affiliate’s sites.
The last thing to do is to put the unit live on our Managed Unit page:
These are the basic steps to getting the unit up and running. There are advanced features available to you, which we will discuss in a later post.
Obviously with every new system, it will take time to get used to, but following the above instructions will help. If you have any problems, or would like us to set up your first unit, please ask via a support ticket.
The key to being successful with Easy Content Units is the ability to find the correct products to show in your units. For some merchants this might prove to be more of an art than a science, but if we’re listing the merchant on the All Merchants Page and it says there’s a quantity of products loaded onto ECU then you can be sure they are there.
How ECU Search Works:

In a nut shell the search box queries the ‘Product Name’ field, as the merchants have provided it in their datafeed. Your search must be 3 characters or more. You can use three types of keyword search as outlined below:
For most merchants and searches this should be adequate to find the products you need for your unit. You can filter negative keywords by using ‘-’ so an example could be -keyword. The ability to search for ‘Brand’ is possible if you tick the Brand Only box, great if you’re creating a site about a particular brand.
If you’re looking to add an Amazon product, then select the option.
For the merchant who have put in something ‘odd’ in this field a simple look at their site could indicate what they have used for the ‘Product Name’. For example in the Dixons/Currys feed, the model number makes up the Product Name, so searching for ‘lcdtv’ wouldn’t return any products, however a search for a model number will return the result you’re looking for.
Browse Merchant:
Of course if you’re looking for a lot of products, this might be a bit arduous, so we have added a browse function. Once you have a result for the merchant in question, if you click on the merchant logo in the results, you will be taken to a page where you can browse their catalogue. It comes complete with a drop down category selector, so in the above example, you are able to choose the ‘lcdtv’ category and the products will be displayed for adding to your unit.
Narrow your Results:
Once you have entered your search term and got a list of results, we have provided a number of filters, to narrow your results further. There’s a filter for merchant – so you can just find products at a single merchant. There’s a filter for network, so you can choose to see results from merchants from a set network and finally there’s a Brand Filter, so you can choose to view products from a single brand.
More help please!
There may be a time when you can’t seem to find a particular product, worry not, just send in a support ticket and we’ll do our best to find it for you. Sometimes it’s because it’s not in the datafeed as what you’re expecting, sometimes the datafeed is incorrect in some way or maybe it’s not even made it into the feed. All of these things we’ll check for you, and where possible we’ll give you instructions in how to get the product into a unit.
With all the units that are being created it can seem like a bit of a nightmare to keep track of them all; well fear not we have built in some handy tools which we’ll take a look at in this post.
Where oh where is my Unit?
We have provided a field on the unit admin tab for you to put in the URL to where your unit is published. This will help you trace down where the code is on your website, in case you need to find it in the future. Obviously the unit title often won’t tell you where it’s placed, just what it’s about, so we think this is pretty nifty.
Click… what click?
Our stats are pretty rudimentary at the moment, and to be honest, there’s not too much we can add apart from more impression/click stats. These will be great, but you really judge the success of a unit on the revenue generated (not necessarily the number of clicks). As we don’t have access to your accounts at the networks, this is left a little up to you, however we have made it a little easier by adding a reference which we append to most network deeplinks.
We call it ‘tracking ID’ and this can be found on the admin tab on the styling page. This value shows up in the various networks which support this feature. For Affiliate Window it’s known as ‘Clickref’, Tradedoubler call it ‘EPI’, CJ it’s ‘SID’ and Buyat have it as ‘LID’. Check out the network reporting area for this term and you will be able to break down the clicks/sales by unit, based on this value.

Different sites? – Different Groups
On the ‘My Units’ page we have added a grouping feature, in which you can file your units away in groups. Just tick the box and click on the button which will add the unit to an existing group, or type in a new name to start a new group. Great feature for organising your units by site etc. You will notice the groups follow through to the Stats page to make it easier to select the units to report on.
Oh heck I forgot to change the promotional message?
Worry no more, we have added a reminder feature into your unit admin tab. If you add date sensitive information to a unit, or need to change promotional information, you can set up a reminder for the unit. You will receive an email reminder, and an area on the front page will alert you to the need to look at the unit.
The reminder service is great when using voucher code information (or other promotional message) in the product title. Remember any changes you make to your unit are instantly updated in the units on your site, so no need to update the code on your webpages.
If you have any other ideas for features that will make your life simpler, please let us know on a support ticket or by message below: