Showing posts with label WML. Show all posts
Showing posts with label WML. Show all posts

Tuesday, September 2, 2008

Enable Google Analytics without javascript


Site counter tracker has been a very important component for us to trace popularity of a web portal. Luckily, a lot of web site counter we can use freely. All these time I count on two site counter to track my pages. StatCounter.com offer a easy to manage and weekly reporting statistic tracker. Simply sign up and add new project to the account, and paste snippet to your HTML template. StatCounter free edition has limitation of storing last 500 records only for analysis.

Google analytics (GA) offer a more complete service, and advanced reporting tools. But so far I searched across the net, found nothing we can do to implement GA in pages (rss or widget) that not support JavaScript. With such limitation, we can't track images loadings, email reads, pdf files, and the most important to me : WML pages.

Got inspired from LinkLove, which is run smoothly on my server but lack of User Agent info, I try to alter some point. Instead of using fopen remote file, I use CUrl function. With CUrl function, we can send set HTTP header to GA to simulate the actual hit by handset to the GA Server. To know more, simply download and try it on your web server. This script is totally standalone, no external 3rd function needed.

On WML/RSS pages, instead of copying GA Urchin JS snippet, simply add a
<img src="http://yourserver.com/ga.php" alt="" /> tag like this :

<img src="http://yourserver.com/ga.php?t=UrchinCode&amp;d=your-original-domain" alt="GA" />

Sunday, May 4, 2008

Use firefox to open wap site


Firefox is now about to take over the position of most popular browser. Due to lack of customization and security reason, now more and more user are turning using Firefox rather than other browser.

For wap developer like me, everyday involve with hundreds of trial-and-fail page load using all available browser, I found it's very useful for you all to have this plugin. WMLBrowser is essential for firefox to determine the content type text/vnd.wap.wml file.

To install, simply go to Tools -> Add Ons. On extensions tab, click "Get Extensions". Your firefox will open a new tab. Just type wml in the search box. Or you can go to WMLBrowser direct link. Once installed now you can open any WML site as it display on phone browser. All plugins above work for Firefox 1.5, Firefox 2 and Firefox 3 both on Windows or Linux.

Another utility that complementary to this plugin is User Agent Switcher, to let you pretend that you really a mobile handset to wap server. This trick very useful to mask yahoo and gmail site to serve us as mobile user, as well as to download contents that should serve mobile user only.