User Controls

Someone tell me the purpose of google analytics isograms.

  1. #1
    Sophie Pedophile Tech Support
    So i was digging through some responses from a website i was spidering and i found something curious. In the response header there was a value for something called Etag it's valua was a hash.


    ETag: "148335b614041c3830e103c2442ceb83:1458548237"


    When i inspected the related code i found this.


    <script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-30742211-82', 'auto');
    ga('create', 'UA-22995010-20', {'name': 'newTracker'});
    ga('send', 'pageview');
    ga('newTracker.send', 'pageview');


    I'm not sure but this looks like an opsec headache to me.
  2. #2
    -SpectraL coward [the spuriously bluish-lilac bushman]
    It's so the federal government can learn more about you and your interests and habits. When the time comes, all that stuff will be invaluable to them, and they'll have it all.
  3. #3
    Sophie Pedophile Tech Support
    It's so the federal government can learn more about you and your interests and habits. When the time comes, all that stuff will be invaluable to them, and they'll have it all.

    Federal government =/= Google. But basically i figured the government would be able to use this if they wanted to but then i noticed that the hash changes for some pages. Also my spider doesn't have a cache besides that cache control is not set in the header or anything. So if they're gonna track me on the basis of an object in my cache instead of an IP adress or something i'd imagine they'd have a hard time.

    Anyway, someone good at javascript should take a look at the code i posted.
  4. #4
    Lanny Bird of Courage
    The etag header and that javascript are unrelated. Etag is used for caching, the value is opaque to the useragent (meaning there is no spec-defined semantics for the value) and generally changes as the relevant resource changes, useragents can request a resource conditional on if its etag has changed. So like for a thread, the etag might change every time someone makes a post but the useragent sends its last cached etag with each request so if the etag hasn't changed between two requests (if no new posts are made) the server returns a response clearing the useragent to serve from the cache.

    The JS is just google analytics' normal loader logic. It loads analytics.js into the page which is a whole other gob of code which defines the `ga` global and then sends a request with a bunch of user data back to GA with the site's id (the 'UA-...' thing) so it knows who to show the data to.
  5. #5
    Sophie Pedophile Tech Support
    The etag header and that javascript are unrelated.

    You tell that to my intercepting proxy.


    Etag is used for caching, the value is opaque to the useragent (meaning there is no spec-defined semantics for the value) and generally changes as the relevant resource changes, useragents can request a resource conditional on if its etag has changed. So like for a thread, the etag might change every time someone makes a post but the useragent sends its last cached etag with each request so if the etag hasn't changed between two requests (if no new posts are made) the server returns a response clearing the useragent to serve from the cache.

    The JS is just google analytics' normal loader logic. It loads analytics.js into the page which is a whole other gob of code which defines the `ga` global and then sends a request with a bunch of user data back to GA with the site's id (the 'UA-…' thing) so it knows who to show the data to.

    Makes sense, but why is the function called isogram? Or is it an argument to the function. I literally have no idea.
  6. #6
    -SpectraL coward [the spuriously bluish-lilac bushman]
    Google, Twitter, Facebook, these are all clever creations of the Central Intelligence Agency, in collaboration with M15/6, ASIS, DGSE and Mossad.
  7. #7
    Lanny Bird of Courage
    Makes sense, but why is the function called isogram? Or is it an argument to the function. I literally have no idea.

    Oh, lol, didn't even notice that. That's not the name of the function, it's the argument list. So this:

    (function(){})()


    Is what is called a self executing anonymous function. It just means a function that's executed as soon as its defined, usually not good for much but because of javascript's closure semantics it's fairly common to see. In this case it's just a minification strategy, a sort of compression strategy. It renames a handful of variables to something shorter, for example the "i" argument is referred to 6 times in the self execution function, "i" is bound to the value of "window" so you save a total of 5(the difference of length between "i" and "window") times 6 (number of uses) bytes in script length. The fact that the argument names spell "isogram" has no semantic significance, it's just a kinda funny pun the author of the minification lib (the program that turns more human readable code into compressed shorter code) came up with, or the human who did the hand-minification (rare). An identifier can only have one referent in a given scope so in minification you have to ensue you never re-use the same var name as you do in isogram construction. Most minifiers start with "a", followed by "b" but whoever minified this had a sense of humor.
  8. #8
    Sophie Pedophile Tech Support
    Oh, lol, didn't even notice that. That's not the name of the function, it's the argument list. So this:

    (function(){})()


    Is what is called a self executing anonymous function. It just means a function that's executed as soon as its defined, usually not good for much but because of javascript's closure semantics it's fairly common to see. In this case it's just a minification strategy, a sort of compression strategy. It renames a handful of variables to something shorter, for example the "i" argument is referred to 6 times in the self execution function, "i" is bound to the value of "window" so you save a total of 5(the difference of length between "i" and "window") times 6 (number of uses) bytes in script length. The fact that the argument names spell "isogram" has no semantic significance, it's just a kinda funny pun the author of the minification lib (the program that turns more human readable code into compressed shorter code) came up with, or the human who did the hand-minification (rare). An identifier can only have one referent in a given scope so in minification you have to ensue you never re-use the same var name as you do in isogram construction. Most minifiers start with "a", followed by "b" but whoever minified this had a sense of humor.

    Heh, that's actually pretty awesome. Thanks for eplaining it Lan <3
Jump to Top