Google Analytics

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rezapci
    Senior Member
    • May 2004
    • 146
    • 3.6.x

    Google Analytics

    Instructions for adding tracking
    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 https://www.google.com/support/analy...26908&hl=en_US

    <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
    </script>
    <script type="text/javascript">
    _uacct = "UA-670027-1";
    urchinTracker();
    </script>
    how can I add this in which template and where?

    thanks so much
    Last edited by rezapci; Tue 7 Nov '06, 1:52am.
    AlShiaTalk Where Experience Meets Innovation
  • Colin F
    Senior Member
    • May 2004
    • 17689

    #2
    I'd recommend adding this near the bottom of your footer template.
    Best Regards
    Colin Frei

    Please don't contact me per PM.

    Comment

    • rezapci
      Senior Member
      • May 2004
      • 146
      • 3.6.x

      #3
      Originally posted by Colin F
      I'd recommend adding this near the bottom of your footer template.
      where in footer? dosn't matter any where?
      AlShiaTalk Where Experience Meets Innovation

      Comment

      • Colin F
        Senior Member
        • May 2004
        • 17689

        #4
        Try adding it all the way at the bottom.
        Best Regards
        Colin Frei

        Please don't contact me per PM.

        Comment

        • rezapci
          Senior Member
          • May 2004
          • 146
          • 3.6.x

          #5
          Originally posted by Colin F
          Try adding it all the way at the bottom.
          check it, see if i add it in right pleace

          [code]<br />
          <div class="smallfont" align="center">$vbphrase[all_times_are_gmt_x_time_now_is_y]</div>
          <br />
          $spacer_close
          <!-- /content area table -->
          <form action="$vboptions[forumhome].php" method="get">

          <table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="$stylevar[outertablewidth]" class="page" align="center">
          <tr>
          <if condition="$show['quickchooser']">
          <td class="tfoot">
          <select name="styleid" onchange="switch_id(this, 'style')">
          <optgroup label="$vbphrase[quick_style_chooser]">
          $quickchooserbits
          </optgroup>
          </select>
          </td>
          </if>
          <if condition="$show['languagechooser']">
          <td class="tfoot">
          <select name="langid" onchange="switch_id(this, 'lang')">
          <optgroup label="$vbphrase[quick_language_chooser]">
          $languagechooserbits
          </optgroup>
          </select>
          </td>
          </if>
          <td class="tfoot" align="$stylevar[right]" width="100%">
          <div class="smallfont">
          <strong>
          <if condition="$show['contactus']"><a href="$vboptions[contactuslink]" rel="nofollow">$vbphrase[contact_us]</a> -</if>
          <if condition="$vboptions['hometitle']"><a href="$vboptions[homeurl]">$vboptions[hometitle]</a> -</if>
          <if condition="$show['admincplink']"><a href="$admincpdir/index.php$session[sessionurl_q]">$vbphrase[admin]</a> -</if>
          <if condition="$show['modcplink']"><a href="$modcpdir/index.php$session[sessionurl_q]">$vbphrase[mod]</a> -</if>
          <if condition="$vboptions['archiveenabled']"><a href="archive/index.php">$vbphrase[archive]</a> -</if>
          <if condition="$vboptions[privacyurl]"><a href="$vboptions[privacyurl]">$vbphrase[privacy_statement]</a> -</if>
          <a href="#top" onclick="self.scrollTo(0, 0); return false;">$vbphrase[top]</a>
          </strong>
          </div>
          </td>
          </tr>
          </table>
          <br />
          <div align="center">
          <div class="smallfont" align="center">
          <!-- Do not remove this copyright notice -->
          $vbphrase[powered_by_vbulletin]
          <!-- Do not remove this copyright notice -->
          </div>

          <div class="smallfont" align="center">
          <!-- Do not remove $cronimage or your scheduled tasks will cease to function -->
          $cronimage
          <!-- Do not remove $cronimage or your scheduled tasks will cease to function -->

          $vboptions[copyrighttext]
          </div>
          </div>
          </form>
          <if condition="$show['dst_correction']">
          <!-- auto DST correction code -->
          <form action="profile.php?do=dst" method="post" name="dstform">
          <input type="hidden" name="s" value="$session[sessionhash]" />
          <input type="hidden" name="do" value="dst" />
          </form>
          <script type="text/javascript">
          <!--
          var tzOffset = $bbuserinfo[timezoneoffset] + $bbuserinfo[dstonoff];
          var utcOffset = new Date().getTimezoneOffset() / 60;
          if (Math.abs(tzOffset + utcOffset) == 1)
          { // Dst offset is 1 so its changed
          document.forms.dstform.submit();
          }
          //-->
          </script>
          <!-- / auto DST correction code -->
          </if>
          <script type="text/javascript">
          <!--
          // Main vBulletin Javascript Initialization
          vBulletin_init();
          //-->
          </script>
          <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
          </script>
          <script type="text/javascript">
          _uacct = "UA-670027-1";
          urchinTracker();
          </script>[/
          CODE]
          Last edited by rezapci; Tue 7 Nov '06, 1:52am.
          AlShiaTalk Where Experience Meets Innovation

          Comment

          • Colin F
            Senior Member
            • May 2004
            • 17689

            #6
            That looks perfect
            Best Regards
            Colin Frei

            Please don't contact me per PM.

            Comment

            • rezapci
              Senior Member
              • May 2004
              • 146
              • 3.6.x

              #7
              Originally posted by Colin F
              That looks perfect
              thanks for your help
              Last edited by rezapci; Tue 7 Nov '06, 1:51am.
              AlShiaTalk Where Experience Meets Innovation

              Comment

              • forteanajones
                Senior Member
                • Aug 2002
                • 138
                • 3.6.x

                #8
                Somewhere else once, I read a suggestion to place it at the top of the headinclude template. Which is better, and why?

                Comment

                • Colin F
                  Senior Member
                  • May 2004
                  • 17689

                  #9
                  I recommend adding it in the footer, as it could cause the whole page to load slowly if it's at the top of the page.
                  Best Regards
                  Colin Frei

                  Please don't contact me per PM.

                  Comment

                  • forteanajones
                    Senior Member
                    • Aug 2002
                    • 138
                    • 3.6.x

                    #10
                    Sure glad I saw this thread!

                    Comment

                    • joomlajon
                      Senior Member
                      • Aug 2006
                      • 129
                      • 3.8.x

                      #11
                      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.
                      this is what google says about where the code should go. and below is how it looks when you browse your forum. Can't be better


                      Code:
                      //-->
                      </script>
                      
                      <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
                      </script>
                      <script type="text/javascript">
                      _uacct = "UA-779106-1";
                      urchinTracker();
                      </script>
                      </body>
                      </html>
                      Splendid

                      Comment

                      • Niels84
                        New Member
                        • Nov 2006
                        • 4
                        • 3.5.x

                        #12
                        Hi guys,

                        I'm completely new to vBulletin. The Google Analytics was a major part of my old (phpBB) board. Now I'd like to integrate this on our new vBulletin board.

                        Could you please tell me in which file I have to add the javascript code? I'm looking at all files, but can't find the place...

                        TIA !

                        Regards,
                        Niels

                        Comment

                        • Colin F
                          Senior Member
                          • May 2004
                          • 17689

                          #13
                          You'd need to add the code to the templates, probably the footer template.
                          You can edit templates in your
                          AdminCP -> Styles & Templates -> Style Manager -> Edit Templates
                          Best Regards
                          Colin Frei

                          Please don't contact me per PM.

                          Comment

                          • Niels84
                            New Member
                            • Nov 2006
                            • 4
                            • 3.5.x

                            #14
                            Thanks for the fast reply ! Followed your guidelines, and it works great now !

                            Comment

                            • forumrating
                              New Member
                              • Aug 2005
                              • 11
                              • 3.6.x

                              #15
                              im using it in the footer from like a month now its quite fine .
                              Forum Directory

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...