Google Analytics

  • Author
  • #13808


    To use Google Analytics there is come <script> code that needs to be placed before the </body> code. How can we do that using WordPress 1.5 via Is it possible?

    Instructions are as follows: Copy the following code block into every webpage you want to track. Click in the box below to select all code. Copy and paste the code segment into the bottom of your content, immediately before the </body> tag of each page you are planning to track. If you use a common include or template, you can enter it there.


    Member uses a version much later (and different to) 1.5

    Google’s code is javascript and although we might trust them we do not permit javascript to run here yet.

    And editing themes is not possible. A text widget could hold code – but not javascript.

    And I know you wanted to hear none of that. Sorry…



    No worries, podz, thanks for answering my question.



    Podz, if I’m not missing something, Google’s code would load from Google’s server into browser, it would execute in browser and interact with Google’s server. It would not interact with WordPress server in any way. So, for WordPress server, Google Analytics code snippet would have same effect as some plain text.

    So why is this an issue?



    If this were to be a feature it would be in the form of a widget into which you would put your GA number. Not the code, just the UA string.

    As for ‘why can’t we use their code’ it’s because it is javascript. Go read the FAQ. There is no javascript here because we prefer security over scripts.

    So when would a GA widget happen? I have no idea. I don’t know if one will even. If it does then it will be announced in the right places. Until then there is no GA facility here.



    Okay, I understand. I hope we will eventualy see it.
    Thanks for answering.



    Any chance of a GA widget where we would only have to input the GA account code and it would add it into the JavaScript itself?

    Sort of a:

    _uacct = $userinput;

    type thing?

    I mean we’re already doing that with the RSS widegets and I’m sure we have security on that and striping out the garbage.

The topic ‘Google Analytics’ is closed to new replies.