Page 1 of 1

RESUELTO: ANALYTICS

Posted: Tue Sep 18, 2012 5:32 pm
by rohanny
Saludos.

Planteo de nuevo la pregunta porque creo que borré involuntariamente el post donde anteriormente formulé mi duda.

1. Deseo dar seguimiento con Google Analytics al sitio.
http://www.costarica.elmaestroencasa.com/

2. En Google Analytics obtuve el siguiente código de seguimiento:

<__script__ type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-34777290-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</__script>

3. Pegué el código anterior en las plantillas del sitio antes del </head>, pues así lo pide Google Analytics.


4. Sin embargo, alguien en el foro me hizo ver que el código estaba incompleto. Efectivamente, parece que por alguna razón se borra una parte del código. Queda así

<__script__ type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-34777290-1']);
_gaq.push(['_trackPageview']);

(function() )();

</__script>

5. ¿Alguna idea o sugerencia? No sé cómo hacer para que no se borre parte del código. Tampoco entiendo por qué ocurre.

6. Si alguien responde, le agradeceré considere que no soy informático, ni muy ducho en CMSMS.

Muchas gracias de antemano.

- - - - - -

Thanks for your reply. It really helped me.
Now I study my site with Analytics.

Thank you very much.

Re: ANALYTICS

Posted: Tue Sep 18, 2012 7:06 pm
by Dr.CSS
Any script that uses { } needs to be wrapped in {literal} your code with { } {/literal}...

Re: ANALYTICS

Posted: Thu Sep 20, 2012 8:25 pm
by rohanny
Thank you very much for the answer.

I'll try with {literal}. It's a new tag form me :)

Thanks anyway.