• Hey guys i just register on google analystics to track my site but they tell me that i have to insert a javascript code but i don’t know excatly where.

    the code is:

    <script type=”text/javascript”>
    var gaJsHost = ((“https:” == document.location.protocol) ? “https://ssl.&#8221; : “http://www.&#8221;);
    document.write(unescape(“%3Cscript src='” + gaJsHost + “google-analytics.com/ga.js’ type=’text/javascript’%3E%3C/script%3E”));
    </script>
    <script type=”text/javascript”>
    try {
    var pageTracker = _gat._getTracker(“UA-12781987-1”);
    pageTracker._trackPageview();
    } catch(err) {}</script>

    can anyone help?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Try editing the footer.php template file in your theme and adding the code block just before </body></html>.

    Thread Starter fabianhartmann

    (@fabianhartmann)

    now my footer.php looks like this

    <?php global $wp_theme_options; ?>
    <div style=”clear: both;”></div>
    <div id=”footer”>

    <?php wp_page_menu(‘menu_class=footernav&depth=1’); ?>

    <?php wp_footer(); //we need this for plugins ?>
    </div><!–end #footer–>

    </div>
    <?php do_action(‘it_footer’); ?>
    <script type=”text/javascript”>
    var gaJsHost = ((“https:” == document.location.protocol) ? “https://ssl.&#8221; : “http://www.&#8221;);
    document.write(unescape(“%3Cscript src='” + gaJsHost + “google-analytics.com/ga.js’ type=’text/javascript’%3E%3C/script%3E”));
    </script>
    <script type=”text/javascript”>
    try {
    var pageTracker = _gat._getTracker(“UA-12781987-1”);
    pageTracker._trackPageview();
    } catch(err) {}</script>
    </body>

    <BODY onLoad=”scrlsts()”>

    <p><center>
    <b><font face=”arial, helvetica” size”-2″>Triple S
    </b>
    <b>by</b> Superior Sprayed Systems Ltd.</font>
    </center><p>

    <!– Script Size: 0.88 KB –>

    </html>

    but it is still not working! why?

    Your theme’s FOOTER.php has a body tag? Huh? What sort of theme is that?!?

    Thread Starter fabianhartmann

    (@fabianhartmann)

    please help me!!!!!!!!!!

    Remove:

    <BODY onLoad="scrlsts()">
    <p><center>
    <b><font face="arial, helvetica" size"-2">Triple S
    </b>
    <b>by</b> Superior Sprayed Systems Ltd.</font>
    </center><p>

    The Google code placement looks fine.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Iinsert Google Analystic code’ is closed to new replies.