Archive for Novembre de 2012

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

30/11/2012

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.

Anuncis

Protecci?? htaccess amb contrasenya htpasswd

27/11/2012

$ 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

13/11/2012

2 examples.

Add 10 days from today

$days=10;
$tmpdate=date_create(‘now’);
$tmpdate->add(new DateInterval(‘P’.($days).’D’));
$more10days=$tmpdate->format(‘Y-m-d’);

 

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

$months=2;
$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’));
$more10days=$tmpdate->format(‘Y-m-d’);

More on DateTime and DateInterval creation

Programes electorals eleccions catalanes 2012

11/11/2012
Media_httpelnostrerac_cyzfl