Hardkap » Pritlog - Blogging made simple

google analytics

(4 posts)
  1. alemao
    Member

    hello all,
    if i install the google analytics code in the main.tpl it disappears. the text is gone only the background is visible. Any help?

    Posted 1 month ago #
  2. Prit
    Pritlogger

    Sorry for the delay in responding. Please try putting the google analytics code inside a javascript file and place it in the javascripts directory (under Pritlog). And you can include this javascript anywhere in your template files like this:
    <script src="{blogPath}/javascripts/analytics.js" type="text/javascript"></script>

    Posted 1 month ago #
  3. alemao
    Member

    Doesnt work. Eevn the site doesnt disappear anymore google cant find the analytics code.
    Maybe i have done something wrong thats the javascript i put into the analytics.js file

    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"));

    try {
    var pageTracker = _gat._getTracker("UA-12480202-1");
    pageTracker._trackPageview();
    } catch(err) {};

    And this snippet i put in the main.tpl

    <script src="{blogPath}/javascripts/analytics.js" type="text/javascript"></script>

    Would like to get this thing working.
    Thanks

    Posted 1 month ago #
  4. Prit
    Pritlogger

    Is your site available for me to look at? Or is this a test site on a local machine?

    Posted 1 month ago #

Important: If you want to be notified for any new post on this thread/topic, please go to your profile, activate favorite notification and then subscribe to this topic.


RSS feed for this topic

Reply

You must log in to post.