Results 1 to 6 of 6

How to insert this code in functions_vbseo.php

This is a discussion on How to insert this code in functions_vbseo.php within the Analysis: Traffic & SERPS forums, part of the vBulletin SEO Discussion category; Hello Everyone I want to insert this Code: pageTracker._setDomainName(".domainname.com"); into Google Analytics Code in functions_vbseo.php Code: <script type="text/javascript"><!-- var gaJsHost ...

  1. #1
    Zi5
    Zi5 is offline
    Member
    Real Name
    Kool
    Join Date
    Feb 2007
    Posts
    73
    Liked
    0 times

    How to insert this code in functions_vbseo.php

    Hello Everyone
    I want to insert this
    Code:
    pageTracker._setDomainName(".domainname.com");
    into Google Analytics Code in functions_vbseo.php
    Code:
    <script type="text/javascript"><!--
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src=\'" + gaJsHost + "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E"));
    //-->
    </script>
    <script type="text/javascript"><!--
    try {
    var pageTracker = _gat._getTracker("'.VBSEO_ANALYTICS_CODE.'");
    pageTracker._trackPageview('.($track_url?"'$track_url'":"").');'
    . $more_tracking . $more_tracking2 . '
    } catch(err) {}
    //-->
    </script>
    Thanks ,
    Zi5

  2. #2
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    The easiest thing to do is to make a new plugin under vbseo product with hook, global_complete and execution order of 1 and code:
    Code:
    $more_tracking2 .= '\npageTracker._setDomainName(".domainname.com");\n'

  3. #3
    Zi5
    Zi5 is offline
    Member
    Real Name
    Kool
    Join Date
    Feb 2007
    Posts
    73
    Liked
    0 times
    Could please Brain insert it into functions_vbseo.php and i will copy it to my file .
    Thanks ,
    Zi5

  4. #4
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    You can do the hard-code edit, but every time you upgrade you will need to re-edit the file. The plugin is the better thing to do.

  5. #5
    Zi5
    Zi5 is offline
    Member
    Real Name
    Kool
    Join Date
    Feb 2007
    Posts
    73
    Liked
    0 times
    I don't have a problem to do a hard-code edit every time , so please can you give the instructions .

  6. #6
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    You can simply place it on a new line between:

    . $more_tracking . $more_tracking2 . '
    HERE
    } catch(err) {}

Similar Threads

  1. Insert Analytics code in vbSEO?
    By defkalion in forum General Discussion
    Replies: 23
    Last Post: 02-08-2009, 02:26 PM
  2. Replies: 1
    Last Post: 04-09-2008, 04:46 AM
  3. Insert LinkBack Pulldown
    By Floezen in forum Troubleshooting
    Replies: 1
    Last Post: 01-03-2008, 08:06 PM
  4. Insert a vbSEOed URL?
    By TechGuy in forum Relevant Replacements
    Replies: 2
    Last Post: 12-29-2007, 03:14 PM
  5. Insert php code
    By BetaTesting in forum Pre-Sales Questions
    Replies: 1
    Last Post: 07-30-2007, 04:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •