Announcement

Collapse
No announcement yet.

how to insert code in Google Analytics tracking system vB?

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

  • markwein
    replied
    Thanks! I just had to put my code back into a template and I was curious about this.

    Leave a comment:


  • Maurd
    replied
    Originally posted by gotmud View Post
    Does anyone know if the php should be checked and then the code added to a tracking.php file?
    Originally posted by markwein View Post
    good question.
    No. It does not have to be checked.

    For the record, I add the code to the headinclude_bottom template. That's the best location, IMO.

    Leave a comment:


  • markwein
    replied
    Originally posted by gotmud View Post
    Does anyone know if the php should be checked and then the code added to a tracking.php file?
    good question.

    Leave a comment:


  • gotmud
    replied
    Does anyone know if the php should be checked and then the code added to a tracking.php file?

    Leave a comment:


  • tChristine
    replied
    Here's what I don't get....

    Google Analytics states this in the dashboard:

    The Google Analytics tracking code has not been detected on your website's home page. For Analytics to function, you or your web administrator must add the code to each page of your website.

    By adding it in the Footer, does that satisfy the "to each page" direction? It doesn't on Wordpress, which uses a universal (site wide) Footer like VB - so that's why I'm asking.

    Just place it once in the footer, and it covers the entire suite as if it were covering each page?

    Thanks

    Edit: Also, since the pages are PHP, should this be checked?

    Click image for larger version

Name:	tracking.png
Views:	1
Size:	54.3 KB
ID:	3682884
    Last edited by tChristine; Tue 19th Jul '11, 1:56pm.

    Leave a comment:


  • Steve038
    replied
    Thanks Trevor, much appreciated.

    Leave a comment:


  • Trevor Hannant
    replied
    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.

    Leave a comment:


  • Steve038
    replied
    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?

    Leave a comment:


  • Steve038
    replied
    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, 8:58pm.

    Leave a comment:


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

    Leave a comment:


  • Steve038
    replied
    Thanks Steve, so after the final </div> ?

    Leave a comment:


  • Steve Machol
    replied
    At the very bottom.

    Leave a comment:


  • Steve038
    replied
    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>

    Leave a comment:


  • Steve Machol
    replied
    Admin CP -> Styles & Templates -> Style Manager -> Edit Templates -> footer

    Leave a comment:


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

    - Edie Newbee

    Leave a comment:

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