ciao a tutti,
ho fatto delle prove di monitoraggio partendo dal codice per il mobile fornito da google e poi cercando in internet.
alla fine ho impostato una pagina di prova, per cercare di valutare la costruzione della chiamata alla famosa immagine utm.gif.
Di seguito il codice della pagina php (ovviamente ho tolto i dati personali)
$var_utmac='UA-xxxxxxxx-x'; //enter the new urchin codeF
$var_utmhn=$_SERVER["SERVER_NAME"]; //enter your domain
$var_utmn=getRandomNumber();//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='-'; //enter your own user defined variable
$var_utmp=$_SERVER["REQUEST_URI"]; //this example adds a fake page request to the (fake) rss directory (the viewer IP to check for absolute unique RSS readers)
$city='mycity';
$region='myregion';
$state="mystate";
$utmGifLocation = "......google-analytics.com/__utm.gif";
$urlTrack=$utmGifLocation."?" .
"utmwv=4.8.6d" .
"&utmn=" . getRandomNumber() .
"&utmhn=" . urlencode($var_utmhn) .
"&utmr=" . urlencode($var_referer) .
"&utmp=" . urlencode($var_utmp) .
"&utmac=" . $var_utmac .
"&utmcc=__utma%3D".$var_cookie.".".$var_random.".".$var_today.".".$var_today.".".$var_today.".1%3B%2B__utmb%3D".$var_cookie."%3B%2B__utmc%3D".$var_cookie."%3B%2B__utmz%3D".$var_cookie.".".$var_today.".1.1.utmccn%3D(direct)%7Cutmcsr%3D(direct)%7Cutmcmd%3D(none)%3B%2B__utmv%3D".$var_cookie.".".$var_uservar.'%3B' .
"&utmcs=ISO-8859-1".
"&utmdt=".urlencode("Transazione e-commerce Test").
"&utmhid=".mt_rand(100000000,999999999);
"&utmje=1".
"&utmsc=-".
"&utmsr=-".
"&utmul=it".
"&utmip=" . getIP($_SERVER["REMOTE_ADDR"]).
"&utmt=Transaction".
"&utmtid=00003".
"&utmtst=test%20ServerSide".
"&utmtto=25.00".
"&utmttx=0.20".
"&utmtsp=5.00".
"&utmtci=$city".
"&utmtrg=$region".
"&utmtco=$state";
$urlItem=$utmGifLocation."?" .
"utmwv=4.8.6d" .
"&utmn=" . getRandomNumber() .
"&utmhn=" . urlencode($var_utmhn) .
"&utmr=" . urlencode($var_referer) .
"&utmp=" . urlencode($var_utmp) .
"&utmac=" . $var_utmac .
"&utmcc=__utma%3D".$var_cookie.".".$var_random.".".$var_today.".".$var_today.".".$var_today.".1%3B%2B__utmb%3D".$var_cookie."%3B%2B__utmc%3D".$var_cookie."%3B%2B__utmz%3D".$var_cookie.".".$var_today.".1.1.utmccn%3D(direct)%7Cutmcsr%3D(direct)%7Cutmcmd%3D(none)%3B%2B__utmv%3D".$var_cookie.".".$var_uservar.'%3B' .
"&utmcs=ISO-8859-1".
"&utmdt=".urlencode("Transazione e-commerce Test").
"&utmhid=".mt_rand(100000000,999999999);
"&utmje=1".
"&utmsc=-".
"&utmsr=-".
"&utmul=it".
"&utmip=" . getIP($_SERVER["REMOTE_ADDR"]);
#ordine Transaction / Item
$urlItem .=
"&utmt=Item".
"&utmtid=00003";
#articolo
$urlItem .=
"&utmipc=ID5".
"&utmipn=prova%20prodotto%20maglia".
"&utmipr=15.00".
"&utmiqt=1".
"&utmiva=".urlencode("taglia L").";";
##################################
#open the image for the main transaction
$handle = fopen ($urlTrack, "r");
$test = fgets($handle);
fclose($handle);
the image for the item (each one)
$handle1 = fopen ($urlItem, "r");
$test1 = fgets($handle1);
fclose($handle1);
```PROBLEMA
La pagina viene monitorata come accessi... ma non viene monitorato nulla nei report dell'ecommerce.
Ogni suggerimento è graditissimo :)
Grazie