<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[doppio codice x Google Analytics]]></title><description><![CDATA[<p dir="auto">Salve a tutti,</p>
<p dir="auto">per avere le statistiche con Google Analytics basta mettere in ogni pagina una porzione di codice su ogni pagina del proprio sito.</p>
<p dir="auto">Domanda: è possibile inserire due volte il codice  per  Google Analytics in una pagina web, al fine di monitorare le visite di più utenti (quindi un codice sarà relativo ad un utente e l'altro di un altro account google)?</p>
<p dir="auto">La cosa va vista nell'ottica di un sito sviluppato da più utenti, la mia richiesta servirebbe per dare le statistiche ad ogni utente.</p>
<p dir="auto">Il primo codice Google Analytics sarebbe comune in tutte le pagine del sito (per avere le statistiche totali) mentre il secondo codice Google Analytics sarà relativo al utente che gestisce una parte del sito.</p>
<p dir="auto">Spero di essere stato chiaro</p>
<p dir="auto">Grazie!</p>
]]></description><link>https://dev.connect.gt/topic/67620/doppio-codice-x-google-analytics</link><generator>RSS for Node</generator><lastBuildDate>Fri, 27 Nov 2026 19:12:11 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/67620.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 02 Apr 2008 07:21:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to doppio codice x Google Analytics on Wed, 30 Jun 2010 15:39:53 GMT]]></title><description><![CDATA[<p dir="auto">Ciao a tutti,<br />
come si procede col nuovo codice asincrono per fare la stessa cosa?</p>
<p dir="auto">Ad esempio:</p>
<pre><code>var _gaq = _gaq || [];
 _gaq.push(['_setAccount', 'UA-XXXXXXX-XX']);
 _gaq.push(['_trackPageview']);

 (function() {
   var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
   ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'h t t p:// w w w') + '.google-analytics.com/ga.js';
   var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
 })();
</code></pre>
<p dir="auto">Come diventerà?<br />
Io presumo:</p>
<pre><code>var _gaq1 = _gaq1 || [];
 _gaq1.push(['_setAccount', 'UA-XXXXXXX-XX']);
 _gaq1.push(['_trackPageview']);

var _gaq = _gaq || [];
 _gaq2.push(['_setAccount', 'UA-YYYYYYY-YY']);
 _gaq2.push(['_trackPageview']);

 (function() {
   var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
   ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'h t t p: //w w w') + '.google-analytics.com/ga.js';
   var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
 })();
</code></pre>
<p dir="auto">O sbaglio?</p>
]]></description><link>https://dev.connect.gt/post/699676</link><guid isPermaLink="true">https://dev.connect.gt/post/699676</guid><dc:creator><![CDATA[pier.p]]></dc:creator><pubDate>Wed, 30 Jun 2010 15:39:53 GMT</pubDate></item><item><title><![CDATA[Reply to doppio codice x Google Analytics on Fri, 04 Apr 2008 17:48:10 GMT]]></title><description><![CDATA[<p dir="auto">inizializza due "oggetti tracker" differenti, con due UA (User Account) diversi e spara i dati su due profili</p>
]]></description><link>https://dev.connect.gt/post/699660</link><guid isPermaLink="true">https://dev.connect.gt/post/699660</guid><dc:creator><![CDATA[tambu]]></dc:creator><pubDate>Fri, 04 Apr 2008 17:48:10 GMT</pubDate></item><item><title><![CDATA[Reply to doppio codice x Google Analytics on Fri, 04 Apr 2008 17:36:31 GMT]]></title><description><![CDATA[<p dir="auto">Scusami Tambu,</p>
<p dir="auto">ma il nuovo codice come fa a tracciare le visite sui due account analytics delle  due diverse persone?</p>
]]></description><link>https://dev.connect.gt/post/699665</link><guid isPermaLink="true">https://dev.connect.gt/post/699665</guid><dc:creator><![CDATA[dam]]></dc:creator><pubDate>Fri, 04 Apr 2008 17:36:31 GMT</pubDate></item><item><title><![CDATA[Reply to doppio codice x Google Analytics on Wed, 02 Apr 2008 14:51:05 GMT]]></title><description><![CDATA[<p dir="auto">è possibile farlo, anche se ci sono metodi più eleganti.<br />
Non c'è nemmeno bisogno di incollare due volte tutto il codice, basta inserire un parametro in più.<br />
vecchio codice:</p>
<pre><code>&lt;script src="http://www.google-analytics.com/urchin.js"
type="text/javascript"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
_uacct = "UA-12345-1";
urchinTracker();
_uff = 0; // Reset flag to allow for second account
_uacct = "UA-67890-1";
&lt;/script&gt;
</code></pre>
<p dir="auto">nuovo codice</p>
<pre><code>&lt;script type="text/javascript"&gt;
var gaJsHost = (("https:" == document.location.protocol) ?
"https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost +
"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
&lt;/script&gt;
&lt;script type="text/javascript"&gt;
var firstTracker = _gat._getTracker("UA-12345-1");
firstTracker._initData();
firstTracker._trackPageview();
var secondTracker = _gat._getTracker("UA-67890-1");
secondTracker._initData();
secondTracker._trackPageview();
&lt;/script&gt;
</code></pre>
]]></description><link>https://dev.connect.gt/post/699659</link><guid isPermaLink="true">https://dev.connect.gt/post/699659</guid><dc:creator><![CDATA[tambu]]></dc:creator><pubDate>Wed, 02 Apr 2008 14:51:05 GMT</pubDate></item></channel></rss>