This script tries to get related domains and/or 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 and hackertarget with the ID.
Note: This is a fork of the original project at github.com/Josue87/AnalyticsRelationships
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+"
Install Golang, then run:
go install -v github.com/topscoder/analyticsrelationships@latest
This tool can be used in different ways:
- Pass a single URL using the
-url
flag:
analyticsrelationships -url https://www.example.com
- You can also pass URL's as input via STDIN
cat urls.txt | analyticsrelationships
- Or a single URL via STDIN
echo https://www.example.com | analyticsrelationships
- Or for the leet users, add to your chains:
cat domains.txt | httpx -silent | analyticsrelationships -silent | anew related.txt
-url
: URL of the website to scan the Analytics code from-silent
: Don't print shizzle. Only what matters.
Contributions are welcome! If you find a bug or want to suggest a new feature, please open an issue or submit a pull request.
AnalyticsRelationships is released under the GNU license