<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mobile SEO &#187; fail</title>
	<atom:link href="http://www.mobile-seo.de/plugin/tag/fail/feed" rel="self" type="application/rss+xml" />
	<link>http://www.mobile-seo.de</link>
	<description>Mobile Suchmaschinenoptimierung - Mobile Marketing - Mobile Technologie</description>
	<lastBuildDate>Tue, 20 Dec 2011 09:52:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Google Analytics Mobile &#8211; Einbau und PHP Bugfix</title>
		<link>http://www.mobile-seo.de/archiv/68-google-analytics-mobile-einbau-und-php-bugfix.html</link>
		<comments>http://www.mobile-seo.de/archiv/68-google-analytics-mobile-einbau-und-php-bugfix.html#comments</comments>
		<pubDate>Mon, 02 Nov 2009 15:20:05 +0000</pubDate>
		<dc:creator>Pelle Boese</dc:creator>
				<category><![CDATA[Mobile SEO]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[fail]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[mobile analytics]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://beta.mobile-seo.de/archiv/68-google-analytics-mobile-einbau-und-php-bugfix.html</guid>
		<description><![CDATA[Ha, den ersten mehr oder weniger Bug im Analytics for Mobile Code gefunden. Böser Google! Aber erst mal zum Einbau. Der geht nämlich &#8211; für PHP &#8211; wie folgt: Bei Analytics eine neues Profil für eine Domain anlegen für das Mobilportal, z.B. m.domain.tld Die Web-Property-ID, z.B. UA-3214567-1 kopieren und das UA durch MO (für MObile) [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Ha, den ersten mehr oder weniger Bug im <a href="http://www.mobile-seo.de/archiv/66-Google-Analytics-Mobile.html">Analytics for Mobile</a> Code gefunden. Böser Google! Aber erst mal zum Einbau. Der geht nämlich &#8211; für PHP &#8211; wie folgt:</p>
<ul>
<li>Bei Analytics eine neues Profil für eine Domain anlegen für das Mobilportal, z.B. m.domain.tld</li>
<li>Die Web-Property-ID, z.B. UA-3214567-1 kopieren und das UA durch MO (für MObile) ersetzen, sodass etwas wie MO-3214567-1 überbleibt</li>
<li>Das <a href="http://www.google.com/analytics/googleanalyticsformobile.zip">ZIP mit den Beispielen für GA Mobile</a> entpacken und in den Ordner <b>php</b> wechseln</li>
<li>In <b>php1.snippet</b> den Text <b>ACCOUNT ID GOES HERE</b> durch die geänderte Web-Property-ID ersetzen</li>
<li><b>ga.php</b> ins Stammverzeichnis eurer Webanwendung kopieren</li>
<li><b>php1.snippet</b> und <b>php2.snippet</b> in ein beliebiges Verzeichnis der Webanwendung kopieren</li>
<li><b>php1.snippet</b> via include oder require am Anfang jeder Seite, die getrackt werden soll einbinden</li>
<li><b>php2.snippet</b> via include oder require am Ende jeder Seite vor dem schließenden </body> Tag einbinden</li>
</ul>
<h5>Achtung, BUG!</h5>
<p>Auf ordentlichen PHP-Umgebungen sind <a href="http://www.mobile-seo.de/archiv/40-Flame-Oh-nein,-PHP-Magazin.html">Short-Tags</a> deaktiviert. Das bedeutet, dass man anstelle von <strong>&lt;?</strong> immer <strong>&lt;?php</strong> als öffnendes Tag nutzen muss. Dummerweise ist in <b>php2.snippet</b> ein Shorttag zum Einsatz gekommen, nämlich um die URL des Tracking-Pixels auszugeben:</p>
<blockquote><p>&lt;img src=&#8221;&lt;?= $googleAnalyticsImageUrl ?&gt;&#8221; /&gt;</p></blockquote>
<p><br/></p>
<p>In gutem und funktionierendem PHP sieht das ganze so aus:</p>
<blockquote><p>&lt;img src=&#8221;&lt;?php echo $googleAnalyticsImageUrl ?&gt;&#8221; /&gt;</p></blockquote>
<p><br/></p>
<p>Also, einfach ändern, dann klappt&#8217;s auch mit dem Tracking auf gut konfigurierten Systemen. Schäm&#8217; Dich, Google!</p>
 <img src="http://www.mobile-seo.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=68" width="1" height="1" style="display: none;" />
<!-- google_ad_section_end -->
<hr />
<p><small>© admin auf <a href="http://www.mobile-seo.de">Mobile SEO</a>, 2009. |
<a href="http://www.mobile-seo.de/archiv/68-google-analytics-mobile-einbau-und-php-bugfix.html">Link zum Artikel</a> |
<a href="http://www.mobile-seo.de/archiv/68-google-analytics-mobile-einbau-und-php-bugfix.html#comments">Keine Kommentare</a> |
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.mobile-seo.de/archiv/68-google-analytics-mobile-einbau-und-php-bugfix.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

