Installing Google Analytics to my website

Discussion in 'Google Analytics' started by maihannijat, Mar 9, 2011.

  1. #1
    Hello,

    My website theme is based on .tpl and I have inserted Google Analytic code in main.tpl file before </head> but it is not working.

    when I view the page source of my website the Google code appears like this:
    <script type="text/javascript">
    
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-9165868-7']);
      _gaq.push(['_trackPageview']);
    
      (function() )();
    
    </script>
    
    Code (markup):
    my page link structure is base on .htaccess.

    website: http://www.afghanjobs.org
     
    maihannijat, Mar 9, 2011 IP
  2. qazu

    qazu Well-Known Member

    Messages:
    1,834
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    165
    #2
    Looks like your Google code is incomplete. Function section is empty. Log on to Google Analytics and make sure the code is complete.
     
    qazu, Mar 9, 2011 IP
  3. maihannijat

    maihannijat Member

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #3
    The code is pasted completely in main.tpl but it appears incomplete in page source.
     
    maihannijat, Mar 9, 2011 IP
  4. Philvault

    Philvault Active Member

    Messages:
    1,284
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    80
    #4
    try enclosing it with <literal> analytics code here </literal>
     
    Philvault, Mar 9, 2011 IP
  5. maihannijat

    maihannijat Member

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #5
    still same problem. not fixed with <literal> tag
     
    maihannijat, Mar 9, 2011 IP
  6. Philvault

    Philvault Active Member

    Messages:
    1,284
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    80
    #6
    What script are you using anyway? .tpl file may not be the right file where
    google analtyics code should go.
     
    Philvault, Mar 9, 2011 IP
  7. maihannijat

    maihannijat Member

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #7
    you can access admin area of the script from here.
    www.smartjobboard.com/demo/admin
    Admin username: admin
    Admin password: admin

    you can aslo edit themes and pages in demo.
     
    maihannijat, Mar 9, 2011 IP
  8. Philvault

    Philvault Active Member

    Messages:
    1,284
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    80
    #8
    have you tried inserting with literal tag in the main.tpl?
     
    Philvault, Mar 9, 2011 IP
  9. maihannijat

    maihannijat Member

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #9
    yes I did but didn't work.
     
    maihannijat, Mar 9, 2011 IP
  10. maihannijat

    maihannijat Member

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #10
    Hello

    I used literal tag {} in this format, and it works.


    Thanks for help
     
    maihannijat, Mar 9, 2011 IP
  11. Atco-maart

    Atco-maart Peon

    Messages:
    435
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Again you generate new code in Google analytic and again submit new code in your website I hope its helpful to you ....
     
    Atco-maart, Mar 9, 2011 IP
  12. signity

    signity Peon

    Messages:
    210
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Copy the complete code of Google analytic and then place it again between your body tag. You can get complete code from Google analytic site by creating your a/c in it.
     
    signity, Mar 11, 2011 IP
  13. buzinessware

    buzinessware Peon

    Messages:
    408
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    buzinessware, Mar 17, 2011 IP
  14. Jesse12

    Jesse12 Member

    Messages:
    360
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #14
    Hello
    Use the complete analytics code and paste it on your every web page of the website. Sure you will able to find out the exact report.......Hope you understand
     
    Jesse12, Mar 17, 2011 IP
  15. maihannijat

    maihannijat Member

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #15
    Thank you all

    my Google Analytic tool is working now. I have inserted code between [literal] tags in main.tpl file.
     
    maihannijat, Mar 18, 2011 IP
  16. dischg

    dischg Active Member

    Messages:
    121
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    73
    #16
    It has to be
    {literal}
    {/literal}

    to work
     
    dischg, Mar 23, 2011 IP