It's clearly marketing. But marketing can be helpful. If GA does conflict with GDPR it is far from unlikely that more countries in the EU will ban or restrict it. This might be insignificant to an American company using GA but it certainly is not for a company operating in Europe.
If you can look at the domain, isgoogleanalyticsillegal.com and tell it's marketing, then good for you. I don't think it's very obvious. Posting it as a "Show HN" with its own domain name is purposely deceptive. Most of the "Show HN" posts are from individuals posting their own small projects. Sometimes a company will post one, but at least they link to their own domain.
After you click to the article, again there's no indication until you scroll to the bottom (after you've already read or skimmed the site). This is deceitful. Furthermore, it doesn't really follow the spirit of ShowHN, which is supposed to link to a tool that people can try out.
You're right that marketing can be helpful, but introducing your company through a bait and switch is a major red flag. This post could've easily been presented honestly: "Show HN: Host your own analytics data to comply with GDPR - posthog.com" or something along those lines.
I assume companies that try stuff like this don't even realize the negative feelings such a campaign can engender. They probably see thousands of new visitors to their bogus site and call it a success, all the while not even seeing the thousands of people who saw this deceptive tactic for what it was and have now filed "PostHog" in their mental file cabinet of dishonest companies.