Home > Tags > mobile
mobile
Google Analyticsで携帯のアクセス解析をやってみる
- 2010/03/30
- Wordpress関連
以下の記事を参考にモバイルGoogle AnalyticsをWordPressに導入してみました。
でもAnalytics 設定の「トラッキング コードがインストールされていません」というメッセージがぜんぜん消えない。
Yuriko.Net » Ktai Style 2 への Google Analytics 設置方法
Google Analytics携帯版の導入方法まとめ | ke-tai.org
もう眠いからねる!
symfonyでモバイル開発する際に参考になるだろうリンク
- 2009/02/08
- Web開発関連
モバイル開発@symfony :: handsOut.jp がかなり良い感じ。以下コードを引用してみる。
apps/app_name/config/filters.yml
web_debug: ~
security: ~
# generally, you will want to insert your own filters here
mobile:
class: myMobileFilter
cache: ~
common: ~
flash: ~
execution:
apps/app_name/config/autoload.yml
PEAR:
name: PEAR
files:
Net_UserAgent_Mobile: /path/to/Net/UserAgent/Mobile.php
myMobileFilter.class.php (抜粋)
// preFilter
$request = $this->getContext()->getRequest();
$response = $this->getContext()->getResponse();
if ($this->isFirstCall()) {
$agent = @Net_UserAgent_Mobile::singleton();
switch (true) {
case $agent->isDoCoMo():
$carrier = 'docomo';
$response->setContentType('application/xhtml+xml; charset=Shift_JIS'); // 出力ヘッダを指定
$response->addStylesheet('/path/to/docomo.css'); // キャリア別のスタイルシートを指定
break;
case $agent->isEzweb():
$carrier = 'ezweb';
$response->addStylesheet('/path/to/ezweb.css'); // キャリア別のスタイルシートを指定
// 中略
}
$request->setAttribute('agent', $agent);
$request->setAttribute('carrier', $carrier);
// sfPictogramMobilePlugin
$pictogram = sfPictogramMobile::factory($carrier, 'utf8');
$request->setAttribute('pictogram', $pictogram);
}
$filterChain->execute();
// postFilter
$content = $response->getContent();
$content = $request->getAttribute('pictogram')->replace($content);
// 出力前に CSS をインライン展開
if ($request->getAttribute('carrier') == 'docomo') {
$content = HTML_CSS_Mobile::getInstance()->setBaseDir('/path/to/doc_root')->apply($content);
}
$response->setContent($content);
}
apps/app_name/templates/layout.php (抜粋)
<html xmlns="http://www.w3.org/1999 /xhtml" xml:lang="ja" lang="ja">
<head>
apps/app_name/templates/_dtd.php
<?php case 'docomo': ?><?php echo '<'; ?>?xml version="1.0" encoding="Shift_JIS" ?>
<!DOCTYPE html PUBLIC "//imode group (ja)//DTD XHTML iXHTML(Locale/Ver.=ja/1.1) 1.0//EN" "ixhtml_4ja_10.dtd">
<?php break; ?>
<?php case 'ezweb': ?>
<?php echo '<'; ?>?xml version="1.0" encoding="Shift_JIS" ?>
<!DOCTYPE html PUBLIC "//OPENWAVE//DTD XHTML 1.0//EN" "http://www.openwave.com/DTD/xhtmlbasic.dtd">
// 以下略
他にも helper を使って、mailto や input 要素の問題などを吸収する方法や、モバイルのセッションを、SessionStorage を使って解決する方法が書いてある。
以下のファイルを作成、編集
apps/app_name/lib/helper/MobileHelper.php
apps/app_name/lib/myMobileFrontController.class.php
apps/app_name/lib/myMobileSessionStorage.class.php
apps/app_name/config/factories.yml
memokami::楽天テクノロジーカンファレンス「PHPで作る携帯サイト」 :: handsOut.jp もすごくいい感じ。
mod_ktaiは速度が100倍?
- 2007/12/27
- その他
ゆめみが開発した「mod_ktai」。
速度が100倍っていうのは気になるなぁ。
携帯サイト構築簡易化Apacheモジュール『mod_ktai』を開発:携帯サイト構築・株式会社ゆめみ
3キャリア対応サイト作成へ、画像を自動変換をするApacheモジュールをゆめみが開発 - builder by ZDNet Japan
ホーム > タグ > mobile