• Dutch
  • English

Investigating the source code of a website

Did you know that in some cases information is "hidden" in the source code of a website? And, for example, you can find out if a website is linked to other websites? We will explain this to you in more detail.

The source code of a website can be seen as the readable text written by a programmer in a programming language. Simply said, the source code consists of a variety of code lines, which together ensure that a website ' works ' and that a website looks a certain way.

How a piece of the source code of the Aware Online website looks like:

Why is the source code so much fun?

The good thing for you as an OSINT practitioner (but also for hackers) is that interesting information can be "hidden" in the source code. For example, you can see how a website is built and what programs are running on a website. Often relevant information the piece of code from Google Analytics. With Google Analytics installed, a website administrator can track who visited the website, how long it took, what web pages were viewed, et cetera. The interesting thing is that website administrators sometimes manage multiple websites, using just one Google Analytics account. And it is precisely this piece of code that you as an investigator might be looking for. This code allows you to identify other websites related to your target website.

How to find the Google Analytics code?

If a website uses Google Analytics, the Google Analytics code will appear somewhere in the source code of a website. The Google Analytics code looks like "UA-xxxxxxx-xx". And you can find this code as follows:

Step 1: go to your target website. As an example we use the Dutch website of Marktplaats.nl.

Step 2: right-click on a 'blank' part of the page (not on a photo or a link), and then click ' View page source '. Click here for an example.

Step 3: you will now see the source code of the website. If Google Analytics is used on the website, the Google Analytics code is somewhere in the source code. Use to quickly search the 'find' function (CTRL-F on Windows) to go directly to the code. Type in the following: UA- to search for the code. Click here for an example.

Step 4: You may have found multiple results with the search function. It is therefore important that you look for the correct piece of code, which looks like this: UA-xxxxxx-xx. If you have found the code, please read below how you can use the code. Click here for an example.

Using the Google Analytics code

Step 5: copy the 'UA-digit series' section (without the last indent with the digit) and paste the code into a website like www.spyonweb.com. Click here for an example.

Step 6: If you click 'Go!' you will see if the Google Analytics code you entered is used on other websites than on the website where you extracted the code from. Click here for an example.

Additional notes

The source code can of course also be used to find other interesting information. Therefore it is important that you understand what you are looking at so that you can also apply the source code for finding other (hidden) information.

* Aware Online has no interest in the website Spyonweb.com. Since there are multiple websites that offer the same services, we recommend that you use all the services to see if it yields you other results. In addition, using multiple services ensures that you always have an alternative, should a website will be shut down (which unfortunately happens regularly).

More information?

Want to know more about how you can use the source code in your investigations? Or do you have any comments to this article? Please let us know!