gdpr-cli icon indicating copy to clipboard operation
gdpr-cli copied to clipboard

Google Analytics not detected

Open nohn opened this issue 7 years ago • 5 comments
trafficstars

Describe the bug Google Analytics is not detected

To Reproduce Steps to reproduce the behavior:

  1. 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.

nohn avatar Jun 04 '18 08:06 nohn

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.

DanielRuf avatar Jun 04 '18 08:06 DanielRuf

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.

nohn avatar Jun 04 '18 08:06 nohn

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 avatar Jun 04 '18 08:06 DanielRuf

@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).

mirkoschubert avatar Jun 04 '18 16:06 mirkoschubert

Btw. reminder to myself: I have to check »anonymizeIP« for the legacy snippet as well. I didn't know it was even possible 😆

mirkoschubert avatar Jun 04 '18 16:06 mirkoschubert