Skip to content
This repository was archived by the owner on Feb 19, 2026. It is now read-only.

Comments

Add configuration#19

Open
cortopy wants to merge 1 commit intoPostHog:mainfrom
J3A:main
Open

Add configuration#19
cortopy wants to merge 1 commit intoPostHog:mainfrom
J3A:main

Conversation

@cortopy
Copy link

@cortopy cortopy commented Nov 20, 2022

Changes

https://github.com/witty-works/posthog-property-filter-plugin is no longer working for me as it doesn't discard $set and $set_once properties. This PR removes the need to use any extra plugin to remove information from geoip

This PR adds the possibility of configuring which geoip properties are added to the event and the person

Checklist

  • [x ] Tests for new code

@weyert
Copy link

weyert commented Feb 2, 2023

Yeah, I would be interested in this. If I understand @cortopy PR correctly this allows you to discard some of the $geoip-properties such as the gps coordinates or postal code.

@neilkakkar
Copy link
Contributor

This doesn't work, I'm afraid.

We really want this plugin to be stateless as it's used extensively across projects, and gives a significant performance uptick by being stateless.

As such, if you want to do this, you can use the advanced geoIP plugin instead: https://github.com/paolodamico/posthog-app-advanced-geoip (and/or make a PR there for your use case :) )

@weyert
Copy link

weyert commented Feb 2, 2023

Sorry, what do you mean with stateless? I would like to limit the geoip information for all events in my project. As in my case the postal code field is a bit too specific. I am happy to know the broad location e.g. on a city level

@neilkakkar
Copy link
Contributor

As an aside, how are you using the filter out plugin?

This should work, to say, filter out the latitude:

$geoip_latitude
$set.$geoip_latitude
$set_once.$initial_geoip_latitude

@weyert
Copy link

weyert commented Feb 2, 2023

I don't think the advanced geoip would solve my problem. The plugin appears to allow drop all geoip information from an event while I want to limit the information being stored. I would like to drop the properties related to longitude, latitude and postal code.

@neilkakkar
Copy link
Contributor

re: stateless, that is plugins without a config / that don't store data anywhere.

Would you mind trying out the filter out plugin with the config I mentioned above, and see if it works?

The correct place to fix things would be that plugin :)

@weyert
Copy link

weyert commented Feb 2, 2023

re: stateless, that is plugins without a config / that don't store data anywhere.

Ah okay

Would you mind trying out the filter out plugin with the config I mentioned above, and see if it works?

Of course, happy to try it out. The description of this PR does suggest it doesn't work $set, $set-once. But I will do a bit of experimentation and report back.

@neilkakkar
Copy link
Contributor

I'm not sure what the issue is there (and I just realised this PR is from last year, oh no, completely missed it!)

But the way I mentioned in the comment above should work for $set and $set_once

@weyert
Copy link

weyert commented Feb 6, 2023

@neilkakkar I haven't had a chance yet to try it out. I have lost config so a bit too afraid to touch things at the moment (PostHog/posthog#14088)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants