Archive for Novembre de 2012

5 Ways To Ensure Google Analytics Is Running Perfectly – Analytics Blog


Know What Your Site Sends To Google Analytics

The Google Analytics team built a Chrome extension that is intended to help you debug your implementation. Here is what you will be able to do using the extension and a screenshot of how you will see the data:
This extension loads the debug version of the Google Analytics Javascript for all sites you browse using Google Chrome. It prints useful information to the Javascript console. These messages include error messages and warnings which can tell you when your analytics tracking code is set up incorrectly. In addition, it provides a detailed breakdown of each tracking beacon sent to Google Analytics.

Important tip: this extension can also be used for competitive analysis. If you use it while browsing your competitors’ websites you will learn how they are tracking their customers.


Protecci?? htaccess amb contrasenya htpasswd


$ cd /home/usuario/

$ htpasswd -c .htpasswd usuario
New password:
Re-type new password:

# vi public/.htaccess


AuthUserFile /home/usuario/.htpasswdAuthType BasicAuthName "Private Folder"<LimitExcept POST>    Require valid-user</LimitExcept>


How to add days or months to any date or today in PHP


2 examples.

Add 10 days from today

$tmpdate->add(new DateInterval(‘P’.($days).’D’));


Add 2 months from 13/3/2012 at 12:50 in Madrid

$timeZone = ‘Europe/Madrid’;  // +1 hour
$dateSrc = ‘2012-03-13 12:50’; 
$tmpdate= new DateTime($dateSrc, new DateTimeZone(‘GMT’)); 
$tmpdate->setTimeZone(new DateTimeZone($timeZone)); 
$tmpdate->add(new DateInterval(‘P’.($months).’M’));

More on DateTime and DateInterval creation

Programes electorals eleccions catalanes 2012