gdpr-cli
gdpr-cli copied to clipboard
Google Analytics not detected
Describe the bug Google Analytics is not detected
To Reproduce Steps to reproduce the behavior:
- gdpr scan https://www.ligatus.com/
Expected behavior Google Analytics is detected
Desktop:
- OS: Ubuntu 16.04 LTS
- Node Version v10.3.0
- Version 0.3.4
Additional context
ANALYTICS
No Analytics Tool has been found.
This is because it is in your head and not at the end of body like it should be in theory.
The inline JS parser just looks in the body.
Looking at chrome developer tools, it seems like the Google Analytics code works nevertheless. A tool designed for scanning code for whatever should also detect non-standard implementations of things.
Sure but this tool does not (yet) check global window variables or similar, just does a static analysis of the HTML, CSS and JS (so far).
For checking the real / live window, puppeteer or another solution is needed: https://github.com/DanielRuf/website-stack/blob/master/index.js#L117
@DanielRuf That's not it. It's Issue #10. The HTML head is parsed as well.
@nohn The problem is, that the website uses the legacy ga.js code snippet, which ist deprecated and shouldn't been used anymore. 😏 Version 0.3.4 doesn't support this legacy snippet. But I already fixed it. It works fine in the dev branch and will be publicly available in the next version. In your case it outputs:
ANALYTICS
Google Analytics has been found.
Property ID: UA-27699003-1
Anonymized IP: No
Force SSL: No
Warning! www.ligatus.com uses the legacy ga.js code snippet (deprecated).
Btw. reminder to myself: I have to check »anonymizeIP« for the legacy snippet as well. I didn't know it was even possible 😆