Use Livezilla AND Keep Your Site Moving Fast
We use Livezilla on our site and have for some time. It’s a great tool, with a free version available to boot. However, we did end up tracing a rather significant site performance issue back to the software. We weren’t going to let the 1-2 second delay our users were suffering keep us from our favorite live chat software, so we set out to solve the problem once and for all.
After some debugging, we discovered that the cause is the loading of some Javascript and a callback to the server.
So, we decided to try to modify the code so that the Livezilla Javascript loads after the rest of the page has finished loading. Voila, the delay is gone!
Here’s how we did it:
First an example of the “Before” API code (only the relevant part).
<!— LiveZilla Tracking Code (ALWAYS PLACE IN BODY ELEMENT) —>
[removed]
var script = document.createElement(“script”);
script.type=”text/javascript”;
var src = “http://www.presto-changeo.com/livezilla/server.php?request=track&output=jcrpt&nse;=”+Math.random();
setTimeout(“script.src=src;document.getElementById(‘livezilla_tracking’).appendChild(script)”,1);[removed]
<!— http://www.LiveZilla.net Tracking Code —>
And here is the “After” version:
<!— LiveZilla Tracking Code (ALWAYS PLACE IN BODY ELEMENT) —>
[removed]
var script = document.createElement(“script”);
script.type=”text/javascript”;
var src = “http://www.presto-changeo.com/livezilla/server.php?request=track&output=jcrpt&nse;=”+Math.random();
$(document).ready(function (){setTimeout(“script.src=src;document.getElementById(‘livezilla_tracking’).appendChild(script)”,1);});
[removed]<!— http://www.LiveZilla.net Tracking Code —>
Note: If you apply this fix to a. tpl file directly, add {literal}{/literal} tags around the code.
There are a couple of other things to look out for when it comes to Livezilla and site performance.
First, we were using a VPS at one point and received a usage warning because of Livezilla. It seems that by default, Livezilla is set to refresh the connection list every 4 seconds, I recommend changing it to 15+ seconds. Just go to Server Configuration > Server and find the Client Poll Frequency setting.
Lastly, our site began running extremely slowly one day and the database was not responding well. After some investigation, we found around 20+ Livezilla queries trying to run, and Mysql using over 300% CPU.
It turned out that due to some, how shall we say, not so efficient queries and database indexes that Livezilla uses, almost 500K rows of data had been written to the following tables: visitor_browsers and visitor_browser_urls.
Naturally we emptied those tables, and everything went back to normal.
We highly recommend doing the same, probably about once a month. You can do so by running the following command on your livezilla database
TRUNCATE `visitor_browsers`;
TRUNCATE `visitor_browsers_url`;
360 Degree Social Media Integration - Part 2
In 360 Degree Social Media Integration - Part 1 we looked at what Social Media means to an e-commerce brand and how to use social networks to market both to current and potential new customers. Today we’ll offer some examples of how to maximize the ROI from Social Media.

How and When does Social Media Work Best?
Social media provides the most value when taking a 360 degree marketing approach. That means taking a campaign and promoting it on Facebook and Twitter, on your blog and in a YouTube video, and in newsletters and even on counter, to hit your audience on different mediums as well as throughout all of the social networks. Each medium provides different opportunities for engaging with the brand in different ways.
A 360 degree approach means asking your biggest advocates, whether by tweeting them or simply sending a quick email, to help increase engagement and awareness. These advocates might be loyal customers, partners or even vendors. And don’t forget to enlist your employees to do the same, asking them to share your programs on their own Facebook wall and with their friends and family.
Depending on your industry, there can be a valuable opportunity to connect the offline and online presences of your brand to boost your social value and grow your bottom line. For example, if you are running a Facebook promotion, contest or giveaway, promote it on a sign at the point of sale, and even on the receipt or invoice. Display signage of your social media handles around the store or as a decal at an entrance to encourage customers to participate. These are simple ideas often overlooked.
There are also opportunities to create targeted and/or localized campaigns using networks like Foursquare to encourage consumers to ‘check in’ while visiting your store location and to share purchases and stories with their friends and your followers.
Lastly, partnering with like-minded brands with similar demographics is an excellent opportunity to leverage their subscriber networks and social media followers to help boost awareness around your brand and theirs. After all, sharing is caring!
To recap, the best ways to optimize your social media presence are to:
- Create a 360 degree activation plan connecting each of your social channels to each other and to your e-commerce activities
- Enlist brand advocates, employees and contacts from other networks to help increase engagement and awareness
- Connect the offline and online experience
- Partner with like-minded brands (ideally those with larger social media presences than your own) to capitalize on each other’s following and user base
We were asked to hold a workshop on Social Media at PrestaShop’s Barcamp 5 in NYC yesterday - it was a fantastic event and people enjoyed our perspective on social, so we’re sharing it with you here! Part 2 will follow.

360 Degree Social Media Integration
Social Media is more than Facebook and Twitter; it’s every online engagement tool we use to connect consumers to each other and to your brand in order to enhance the brand’s presence online. It’s Pinterest, Instagram, Foursquare, LinkedIn, Google+, Pose, Fancy, Yelp, online forums, your company blog and even newsletters. The complete landscape of opportunities should allow you to:
- Engage with users, customers, vendors, partners and the public
- Create a ‘social culture’ around your brand - humans are social creatures after all
- Develop and share unique content - content is king!
- Grow your user base and increase your brand awareness
- Use a group of your biggest advocates as a mini focus group to test ideas - make Social Media an integral part of your Research and Development to impact ROI and adjust your product pipeline and marketing programs
- Connect the offline and online experience to increase engagement and further promote your brand and existing activations
Support your brand by engaging with:
FUTURE CUSTOMERS:
- In 2012 your Social Media presence IS your brand; use your profiles to tell potential customers what they need to know about you, how to find you when they need you, and of course the benefits to engaging with you on Social Media
- Use Social Media to distribute offers aimed at converting new customers
- Find and engage with potential customers using twitter hash tags, participation in groups and chats, by running ads or holding contests and sweepstakes
- Encourage current customers to invite their friends and family to follow you - consider using an incentive
CURRENT CUSTOMERS:
- Integrate Social Media into every phase of the buying cycle
- Encourage authentic conversation - engage with users in a sincere way. Ask questions, answer concerns and be supportive. But most importantly, Listen.
- Reward customer loyalty with offers exclusive to some or all social media channels
- Provide real-time customer service - for some brands Social Media becomes the #1 customer service channel - harness this opportunity to show the world how important your customers are to you
Part 2 of 360 Degree Social Media Integration coming soon!
And in the spirit of social media, don’t forget to SHARE THIS POST!
To Upgrade, or Not to Upgrade, That is the Question.
The Short Answer:
Chances are you’re better off not upgrading.
The Rule:
Back when I began working with computers and networks, I was always told the following rule about the network server: “If it’s not broken, don’t fix it.”
This is true about a lot of things in life, and especially true about the server or software that run your business.
If your website (Prestashop or other) is working the way you want and need it to, there is no need to upgrade to a newer version of the software just because it was released. The potential for gain is rarely great enough to offset the potential for loss.
Lets say you have a successful e-commerce website with a large customer base, and your average daily sales are at $1,000. You notice that a new version of the software that runs your site is available, and you decide to try an upgrade.
Mr. Murphy decides to pay you a visit (as he always does in these cases), and before you know it, your website is down, or even worse, it’s still up, but people cannot register or checkout.
You can easily lose thousands of dollars in sales, not to mention the indirect losses related to brand reputation and loyalty, whereas the gain you might have enjoyed from upgrading to the latest version would likely be marginal at best.
The Exceptions:
There are a few cases where upgrading to the latest version is not only recommended, it is essential.
First, security updates that prevent vulnerabilities and exploits should always be applied, as you are even more vulnerable to attacks once an exploit is reported and fixed, as hackers would be more likely to try and abuse those.
Second, updates involving major functionality improvements, bug fixes or the addition of new features that will enhance the customer experience and improve conversions and sales in a meaningful way should be considered. Even in this scenario though, a feature might sound enticing but if it is not one that your particular shop and customers are going to take advantage of, the update still may not be necessary.
The Right Way to Upgrade:
If you take all possible precautions and follow the proper procedures, you will minimize the chances of causing damage to your site and minimize the risk of downtime or lost sales.
1) Make a backup of your website (Database & Files). If you use Prestashop, see our Automatic Prestashop Backup module.
And just as importantly as the upgrade itself, make sure that you know how to restore it and confirm that everything is functioning as it should.
There too many cases where site owners make a backup, and only when they need to restore it do they realize something went wrong and the backup is unusable.
2) Create a test / development copy of your site (Database & files) IE www.your-site.com/test/ where you would run the upgrade process first.
This will ensure that your live site is not affected in any way if the upgrade is not successful, and will give you plenty of time to evaluate the upgrade, make any corrections or fixes and test it properly, without any downtime.
* Make sure to keep notes of any changes or tweaks that you make, as you will need to do them again when upgrading the live site.
3) Test, re-test and then test again! Go over all the important features of the site to make sure they are working. Register as a new customer, add items to the cart (with and without attributes if applicable), start the checkout process and make sure you can update the cart, and use guest checkout if you offer it.
Try using all your payment modules to complete the transaction, just as if you were a customer. Put yourself in your customer’s shoes and test anything they could possibly interact with.
4) Once you’ve tested, and tested again, and made sure that everything works correctly, it is time to repeat the process on the live site.
Switch your site to maintenance mode, and repeat the same upgrade steps that you did on the test site.
5) Do a final round of testing on the upgraded live site, and turn off maintenance mode.
Summary:
Don’t rush to upgrade your site just because a new version is available.
The disadvantages and damage that can be caused by an upgrade gone bad are usually much greater than the potential gain.
Carefully review the new version and determine if there is anything that you must have and that will add real value to your site (or fix security issues).
If you decide to upgrade, follow the proper procedure to ensure you do not damage your site and lose sales.
Understanding php.ini - How and Why You Need One
What is php.ini anyway?
A php.ini file lets you define specific settings that PHP will use when it runs on your server.
Settings such as the amount of memory PHP can use, maximum file size that can be uploaded, amount of time a script can run, error reporting and much more.
Most hosting companies will let you create a php.ini file in the home folder of your website. From there you can define your own settings, but there are some hosts who don’t let you do that and we’ll show you how to find out if your hosting company does a little later.
How do I know what the current settings are?
PHP has a command that displays a table with all the current settings, and general information
Create a new file called info.php, inside type the following 3 lines:
<?php
phpinfo();
?>
Place the file in the home (root) folder on your site, open a browser and go to yoursite.com/info.php.
You now see all of the PHP settings defined on your site. (Example: Here, and lower down are settings we can change, here.)
What are the most important settings to consider?
memory_limit = Amount of memory PHP can use. Use a minimum of 64MB (at least when running Prestashop).
max_execution_time = Maximum number of seconds a PHP script can run. By default it is 30 seconds, but you should consider changing it to a high number if you run processes that take a long time, such as a database backup, regenerating image thumbnails, importing information from a 3rd party site, etc.
max_input_type = Maximum time a script will wait for a single command. It’s easiest to set this to -1 to ignore the setting and only use max_execution_time to control script timeout.
upload_max_filesize = Maximum file size that can be uploaded to the server.
post_max_size = Maximum data size that can be submitted to a page using a <form> tag. This must be equal to or higher than upload_max_filesize.
suhosin.post.max_vars = Maximum form elements that can be submitted in a page. In Prestashop this is important for the Tools->Translations page which can have thousands of textbox’s in which to enter translations, so make sure this is set high enough (10,000 should do the trick).
suhosin.get.max_vars = Same as above, but for form request type = GET.
max_input_vars = Same as above, this was added to more recent versions of PHP and does not require the suhosin plugin.
Implement what we’ve learned.
First, Create a file called php.ini in the home folder of your site (ie. /home/username/public_html/php.ini). Now add the following seven lines to it.
memory_limit = 64M
max_execution_time = 1000;
max_input_time = -1;
post_max_size = 20M;
upload_max_filesize = 20M;
max_input_vars = 10000;
suhosin.get.max_vars = 10000;
suhosin.post.max_vars = 10000;
Save the file, and browse to the info.php URL that we created earlier.
You should now see the new values you entered.
If you still see the old values, it means that your hosting company does not allow you to override those settings, instead loading them from a central file.
You can see which file is being used to load the PHP settings here.
Summary
The PHP.ini file lets you override the default settings of the server and define values that meet the needs of your site.
It can often be the solution to common website problems (timeouts, out-of-memory errors, and trouble uploading files to the server). These can all be easily solved by adding your own values in this simple file.
And since most modern hosting companies will let you use you own php.ini file, especially on a VPS or Dedicated server, chances are you won’t have any issues.
See a list of all available php.ini settings at http://www.php.net/manual/en/ini.list.php.
Easy SEO Boost: Clean up After Yourself
You have set your site up to use SEO friendly URL’s, made sure all the links are valid, and that every page in the site is linked to from other pages.
This is all good and well, but what happens when you start moving pages around, or deleting them?
It’s very easy to forgot about those old pages: they’re not linked to anymore, so problem solved, right?
Well, no…
Search Engines have an elephant like memory, they will not “forget” a page unless they are specifically told to do so.
They will keep crawling your site for those pages, and either get a 404 error, or see a generic message saying the page doesn’t exist.
This can hurt your SEO rank, because search engines tend to frown on too many 404 error, or different URLs that return the same content.
It is important to make sure that whatever platform you use for your site, it can handle those changes properly.
If a page moves, the old URL should return a 301 redirect to the new URL. This will preserve the page rank and avoid having duplicate data.
If you delete a page, you should tell search engines about it, and do a 301 redirect to a new URL (preferably the homepage). This will tell search engines that the old page does not exist anymore, and that they should stop crawling it.
If you’re using Prestashop, see our Duplicate URL Redirect module, which implements all the tips above.