Announcement

Collapse
No announcement yet.

how to insert code in Google Analytics tracking system vB?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Forum] how to insert code in Google Analytics tracking system vB?

    The instructions in Google Analytics says:

    insert this code: (code tracking)
    before </head> on every page that you want to follow.

    the case is that I find or do not know where to place that code to track the entire forum.

    Greetings.

  • #2
    Go to your footer template (Styles & Templates - footer.php) and insert it there. It should go to entire site.
    Check my site and don't worry if it's all Greek to you
    It's all Greek to everybody

    Comment


    • #3
      Originally posted by GRE View Post
      Go to your footer template (Styles & Templates - footer.php) and insert it there. It should go to entire site.
      where in the insert before: </vb:if>
      before the last end tag around the code of the footer?

      Comment


      • #4
        Yes.
        Check my site and don't worry if it's all Greek to you
        It's all Greek to everybody

        Comment


        • #5
          There, Thanks GRE

          Comment


          • #6
            where do I find the footer template?
            I went to Styles & Templates, but could not find the "footer" template.
            Thank you!

            - Edie Newbee

            Comment


            • #7
              Admin CP -> Styles & Templates -> Style Manager -> Edit Templates -> footer
              Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
              Change CKEditor Colors to Match Style (for 4.1.4 and above)

              Steve Machol Photography


              Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


              Comment


              • #8
                Guys, if this is my footer code, exactly where in here do I insert the Google Analytics code?

                {vb:raw ad_location.ad_footer_start}
                {vb:raw ad_location.global_above_footer}
                <div id="footer" class="floatcontainer footer">

                <form action="{vb:link forumhome|nosession}" method="get" id="footer_select" class="footer_select">


                <vb:if condition="$show['quickchooser']">
                <select name="styleid" onchange="switch_id(this, 'style')">
                <optgroup label="{vb:rawphrase quick_style_chooser}">
                {vb:raw quickchooserbits}
                </optgroup>
                </select>
                </vb:if>

                <vb:if condition="$show['languagechooser']">
                <select name="langid" onchange="switch_id(this, 'lang')">
                <optgroup label="{vb:rawphrase quick_language_chooser}">
                {vb:raw languagechooserbits}
                </optgroup>
                </select>
                </vb:if>
                </form>

                <ul id="footer_links" class="footer_links">
                <vb:if condition="$show['contactus']"><li><a href="{vb:raw vboptions.contactuslink}" rel="nofollow" accesskey="9">{vb:rawphrase contact_us}</a></li></vb:if>
                <vb:if condition="$vboptions['hometitle']"><li><a href="{vb:raw vboptions.homeurl}">{vb:raw vboptions.hometitle}</a></li></vb:if>
                <vb:if condition="$show['admincplink']"><li><a href="{vb:raw admincpdir}/index.php{vb:raw session.sessionurl_q}">{vb:rawphrase admin}</a></li></vb:if>
                <vb:if condition="$show['modcplink']"><li><a href="{vb:raw modcpdir}/index.php{vb:raw session.sessionurl_q}">{vb:rawphrase mod}</a></li></vb:if>
                <vb:if condition="$vboptions['archiveenabled']"><li><a href="archive/index.php{vb:raw session.sessionurl_q}">{vb:rawphrase archive}</a></li></vb:if>
                {vb:raw template_hook.footer_links}
                <vb:if condition="$vboptions['privacyurl']"><li><a href="{vb:raw vboptions.privacyurl}">{vb:rawphrase privacy_statement}</a></li></vb:if>
                <vb:if condition="$vboptions['tosurl']"><li><a href="{vb:raw vboptions.tosurl}">{vb:rawphrase terms_of_service}</a></li></vb:if>
                <li><a href="{vb:raw relpath}#top" onclick="document.location.hash='top'; return false;">{vb:rawphrase top}</a></li>
                </ul>


                <vb: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="{vb:raw session.sessionhash}" />
                <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
                <input type="hidden" name="do" value="dst" />
                </form>
                <script type="text/javascript">
                <!--
                var tzOffset = {vb:raw bbuserinfo.timezoneoffset} + {vb:raw 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 -->
                </vb:if>

                <script type="text/javascript">
                <!--
                // Main vBulletin Javascript Initialization
                vBulletin_init();
                //-->
                </script>
                {vb:raw template_hook.footer_javascript}
                </div>
                </div> <!-- closing div for body_wrapper -->

                <div class="below_body">
                <div id="footer_time" class="shade footer_time">{vb:rawphrase all_times_are_gmt_x_time_now_is_y}</div>

                <div id="footer_copyright" class="shade footer_copyright">
                <!-- Do not remove this copyright notice -->
                {vb:rawphrase powered_by_vbulletin}
                <!-- Do not remove this copyright notice -->
                </div>
                <div id="footer_morecopyright" class="shade footer_morecopyright">
                <!-- Do not remove cronimage or your scheduled tasks will cease to function -->
                {vb:raw cronimage}
                <!-- Do not remove cronimage or your scheduled tasks will cease to function -->
                {vb:raw vboptions.copyrighttext}
                </div>
                <vb:if condition="$vboptions['enablefacebookconnect']">
                {vb:raw facebook_footer}
                </vb:if>
                </div>

                Comment


                • #9
                  At the very bottom.
                  Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                  Change CKEditor Colors to Match Style (for 4.1.4 and above)

                  Steve Machol Photography


                  Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                  Comment


                  • #10
                    Thanks Steve, so after the final </div> ?

                    Comment


                    • #11
                      Originally posted by Steve038 View Post
                      Thanks Steve, so after the final </div> ?
                      yes

                      Comment


                      • #12
                        Thanks again guys. Just one more question, is it normal for my report to read 0 for everything to begin with?
                        Last edited by Steve038; Tue 12th Jul '11, 9:58pm.

                        Comment


                        • #13
                          Sorry, make that two more questions. I note on another thread a member said they added <vb:literal> to the beginning and </vb:literal> to the end of the Google Analytics code. Is this required for it to work correctly?

                          Comment


                          • #14
                            Yes, it takes time for the info to be processed within Google Analytics - it's not real time.

                            And yes, you should add it between those tags.
                            Vote for:

                            - *Admin Settable Paid Subscription Reminder Timeframe*
                            -
                            *PM - Add ability to reply to originator only*
                            - Add Admin ability to auto-subscribe users to specific channel(s)
                            - Highlight the correct navigation tab when you are on a custom page
                            - "Quick Route" Interface...
                            - Allow to use custom icons for individual forums

                            Comment


                            • #15
                              Thanks Trevor, much appreciated.

                              Comment

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