SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard
    Join Date
    May 2012
    Posts
    1,001
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post What is this script

    HI, I just want to ask about this script ,is this generated in javascript Obfuscator ?,one more thing what is the purpose of this script ?

    Code:
     <script type="text/javascript">
                            var _gaq = _gaq || [];
                            _gaq.push(['_setAccount', 'UA-28871117-1']);
                            _gaq.push(['_setDomainName', 'wrapbootstrap.com']);
                            _gaq.push(['_trackPageview']);
                            (function() {
                                    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                                    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                                    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
                            })();
                    </script>
    Thank you in advance

  2. #2
    Avid Logophile silver trophy
    ParkinT's Avatar
    Join Date
    May 2006
    Location
    Central Florida
    Posts
    2,285
    Mentioned
    181 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by jemz View Post
    one more thing what is the purpose of this script ?
    There are a few big hints



    _gaq.push(['_trackPageview']);
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';


    This is code to load the Google Analytics 'widget' on the page. It uses Javascript to embed ('document.createElement) an HTML element on the page that is in contact with the Google server script (ga.js).
    Don't be yourself. Be someone a little nicer. -Mignon McLaughlin, journalist and author (1913-1983)


    Literally, the best app for readers.
    Make Your P@ssw0rd Secure
    Leveraging SubDomains

  3. #3
    SitePoint Wizard
    Join Date
    May 2012
    Posts
    1,001
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what is the purpose of google analytics?

  4. #4
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Location
    Cambridge, England
    Posts
    2,195
    Mentioned
    71 Post(s)
    Tagged
    3 Thread(s)
    Is the code on one of your sites; if it is you can login and see the output.

    This is the Google analytics website.


Bookmarks

Posting Permissions

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