+ Reply to Thread
Results 1 to 3 of 3

Thread: JavaScript Code Recognisition

  1. #1
    emailtoarpit is offline x10Hosting Member emailtoarpit is an unknown quantity at this point
    Join Date
    Jul 2009
    Posts
    20

    Question JavaScript Code Recognisition

    What is the code found in many web pages and apparently it is almost the same across such pages.(I believe so)

    <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">
    var pageTracker = _gat._getTracker("UA-3173067-5");
    pageTracker._trackPageview();
    </script>

    Is it the code for Google Analytics, If yes then can u briefly explain the code.
    Morever is the code all by itself or other Javascript code is dependent or associated. Simply put, if I remove the code then does it affect other scripts (Javascript) functionality in the code.

    Thanks,

  2. #2
    lhyman's Avatar
    lhyman is offline x10 Sophmore lhyman is an unknown quantity at this point
    Join Date
    Jun 2009
    Posts
    198

    Re: JavaScript Code Recognisition

    A simple Google search brings up this page:

    http://code.google.com/apis/analytics/docs/

    question: did you place this code in your web pages, if so see the FAQ here:

    http://code.google.com/apis/analytic.../gdataFAQ.html

    If you are planning to remove the code from a page you are leeching, then you are stealing.
    My Name is Larry Hyman from Montreal. I fix computers on site, see my web site for more details:

    http://hyman.sytes.net

  3. #3
    jmcgowan's Avatar
    jmcgowan is offline x10 Sophmore jmcgowan is an unknown quantity at this point
    Join Date
    May 2009
    Posts
    132

    Re: JavaScript Code Recognisition

    As lhyman indirectly pointed out, yes, it is the Google Analytics code. While I agree with lhyman that if you're leeching a page then you're stealing someone else's work, I'll add this... if you're not trying to leech code off of somewhere, then it's perfectly safe to remove just that block of code. It is completely and totally independant of any other scripts that might be on the page.
    Silent Soldiers - A Home For Military Families
    Silent Soldiers Blog - A Blog For Military Families

+ Reply to Thread

Similar Threads

  1. Hybrid's HTML Lessons
    By Hybrid in forum Tutorials
    Replies: 18
    Last Post: 11-28-2009, 02:12 PM
  2. Help with HTML code cleaning (javascript)
    By oracle in forum Programming Help
    Replies: 2
    Last Post: 08-28-2008, 01:59 PM
  3. javascript and external javascript files problem
    By delon in forum Programming Help
    Replies: 6
    Last Post: 04-27-2008, 12:41 AM
  4. BB Code Guide
    By Jober68 in forum Tutorials
    Replies: 1
    Last Post: 01-10-2008, 05:12 PM
  5. Where Can I get a good javascript login code?
    By teamroadkill in forum Off Topic
    Replies: 2
    Last Post: 11-14-2007, 05:51 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers