Both Google Analytics and Facebook's interest based ads/"shadow" profiles work similarly.
You can opt out of Google's interest based ads via https://adssettings.google.com and Facebook's interest based ads via https://www.facebook.com/ads/settings without having to have an account with either.
I don't believe either "shadow" profiles are every associated with an account or personal details even when you make an account on the associated service.