Adding Google analytics to Wordpress

Discussion in 'WordPress' started by Scorpiono, Feb 13, 2007.

  1. #1
    I insert the code between the meta and the style tag, on the header.php of my template, which is Cordobo Green Park v0.9.2 BETA 11.

    The code just ignores my <script>, doesn't save it the right way.
    Permissions are ok, other things can be changed.

    Any ideas? Thanks..
     
    Scorpiono, Feb 13, 2007 IP
  2. cianuro

    cianuro Peon

    Messages:
    1,857
    Likes Received:
    106
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Add it to the footer of each page.
     
    cianuro, Feb 13, 2007 IP
  3. MattD

    MattD Peon

    Messages:
    161
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    MattD, Feb 13, 2007 IP
  4. jhmattern

    jhmattern Illustrious Member

    Messages:
    8,909
    Likes Received:
    794
    Best Answers:
    2
    Trophy Points:
    455
    #4
    I just add it to the footer template as well. It's really quick, and I can't imagine needing a plugin for something that simple.
     
    jhmattern, Feb 13, 2007 IP
  5. Scorpiono

    Scorpiono Well-Known Member

    Messages:
    1,330
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    120
    #5
    What if I would like to add a certain javascript to the sidebar? Since it ignores my <script> hmm.. I might edit locally and upload..
     
    Scorpiono, Feb 14, 2007 IP
  6. jhmattern

    jhmattern Illustrious Member

    Messages:
    8,909
    Likes Received:
    794
    Best Answers:
    2
    Trophy Points:
    455
    #6
    Couldn't you do that directly in the template?
     
    jhmattern, Feb 14, 2007 IP
  7. MattD

    MattD Peon

    Messages:
    161
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #7
    The idea with the plugin is you dont have to keep changing your templates each time you change.
     
    MattD, Feb 14, 2007 IP
  8. jhmattern

    jhmattern Illustrious Member

    Messages:
    8,909
    Likes Received:
    794
    Best Answers:
    2
    Trophy Points:
    455
    #8
    They're asking about Analytics; not Adsense or something where they might want to change it. You just copy / paste and leave it alone. You could do it in less time than it would even take you to install a plugin.

    As for any other javascript, it would depend on how often you plan to change it perhaps. The way I see it is this: either way, you need to add the new code. It's nothing more than deciding which page you feel like pasting it into - a tool from a plugin or right into the template.
     
    jhmattern, Feb 14, 2007 IP
  9. MattD

    MattD Peon

    Messages:
    161
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #9
    You're missing the point. You can install the plugin once then never have to think about it again ever, or you can manually paste the code in and have to keep on doing it every single time you change your site's template.
     
    MattD, Feb 15, 2007 IP
  10. jhmattern

    jhmattern Illustrious Member

    Messages:
    8,909
    Likes Received:
    794
    Best Answers:
    2
    Trophy Points:
    455
    #10
    Gotcha. I guess I just don't see an issue, because I don't go around changing my themes often.
     
    jhmattern, Feb 15, 2007 IP
  11. Scorpiono

    Scorpiono Well-Known Member

    Messages:
    1,330
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    120
    #11
    The whole problem was my theme rejected <script>, html strip tags, but seems like the only place it accepts <script> is by locally change the file (not from admin panel) and upload in sidebar.php - no others places seems to accept my <script> whatsoever, can't figure why, but it's ok for the moment.

    Check http://blog.mylol.net and please tell me what browser you are running and if you see the video in the left. "Today's video" .. Thanks a million
     
    Scorpiono, Mar 1, 2007 IP
  12. browie

    browie Peon

    Messages:
    546
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Mine worked right away.

    I like using Analytics, even if i have poor stats.
     
    browie, Mar 1, 2007 IP