AnalyticsRelationships – Get Related Domains / Subdomains By Looking At Google Analytics IDs
![AnalyticsRelationships - Get Related Domains / Subdomains By Looking At Google Analytics IDs 1 AnalyticsRelationships 5](https://www.redpacketsecurity.com/wp-content/uploads/2021/05/AnalyticsRelationships_5.png)
> Get related domains / subdomains by looking at Google Analytics IDs
> Python/GO versions
> By @JosueEncinar
This script try to get related domains / subdomains by looking at Google Analytics IDs from a URL. First search for ID of Google Analytics in the webpage and then request to builtwith with the ID.
Note: It does not work with all websites.It is searched by the following expressions:
-> "www.googletagmanager.com/ns.html?id=[A-Z0-9-]+"
-> GTM-[A-Z0-9]+
-> "UA-d+-d+"
Available versions:
- Python
- GO
Installation:
Installation according to language.
Python
> git clone https://github.com/Josue87/AnalyticsRelationships.git
> cd AnalyticsRelationships/Python
> sudo pip3 install -r requirements.txt
GO
> git clone https://github.com/Josue87/AnalyticsRelationships.git
> cd AnalyticsRelationships/GO
> go build -ldflags "-s -w"
Usage
Usage according to language
Python
> python3 analyticsrelationships.py -u https://www.example.com
Or redirect output to a file (banner or information messages are sent to the error output):
python3 analyticsrelationships.py -u https://www.example.com > /tmp/example.txt
GO
> ./analyticsrelationships --url https://www.example.com
Or redirect output to a file (banner or information messages are sent to the error output):
> ./analyticsrelationships --url https://www.example.com > /tmp/example.txt
Examples
Python
Output redirection to file /tmp/example.txt:
![AnalyticsRelationships - Get Related Domains / Subdomains By Looking At Google Analytics IDs 2 AnalyticsRelationships 4](https://www.redpacketsecurity.com/wp-content/uploads/2021/05/AnalyticsRelationships_4.png)
Without redirection:
![AnalyticsRelationships - Get Related Domains / Subdomains By Looking At Google Analytics IDs 3 AnalyticsRelationships 5 1](https://www.redpacketsecurity.com/wp-content/uploads/2021/05/AnalyticsRelationships_5-1.png)
GO
Without redirection:
![AnalyticsRelationships - Get Related Domains / Subdomains By Looking At Google Analytics IDs 4 AnalyticsRelationships 6](https://www.redpacketsecurity.com/wp-content/uploads/2021/05/AnalyticsRelationships_6.png)
Working with file redirection works just like in Python.
Author
This project has been developed by:
- Josué Encinar García — @JosueEncinar
Disclaimer!
This is a PoC. The author is not responsible for any illegitimate use.
If you like the site, please consider joining the telegram channel or supporting us on Patreon using the button below.