0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-12-01 12:21:02 +01:00
Commit Graph

3416 Commits

Author SHA1 Message Date
Karl-Aksel Puulmann
3a979c0695
Don't force _health endpoint redirect to https (#5007)
Closes https://github.com/PostHog/posthog/issues/4726

Note that this does not work on cloud - we'd need to exclude the
endpoint in the AWS ELB as well.
2021-07-07 09:04:28 +03:00
Kunal
8fc9c90245
Change home default behavior, don't route by default (#5000) 2021-07-07 03:13:47 +02:00
Sam Winslow
ad63386a69
Polyfill Object.fromEntries (for Safari <= 12) (#4999) 2021-07-06 19:47:51 -04:00
Eric Duong
ef0f9afc03
add missin funnel trends param (#5015) 2021-07-06 14:51:15 -04:00
Li Yi Yu
90042024a7
Connect funnel persons (#5013)
* connect funnel persons to the frontend

* fixes

* simplify feature flag call and open persons modal on bar click

* persons dropoff call

* move methods to kea and clean up code

* remove unused imports

* round the percentage down

* pass in correct step number

* type fix

* small fixes

* prettier

* clickhouse enabled check

* fix clickhouse enabled check

Co-authored-by: Li Y Yu <liyi@Lis-MacBook-Pro.local>
2021-07-06 13:56:26 -04:00
Tim Glaser
52994907a2
Revert "Connect funnel persons to the frontend (#4953)" (#5012)
This reverts commit 05418cdd89.
2021-07-06 19:24:36 +02:00
Li Yi Yu
05418cdd89
Connect funnel persons to the frontend (#4953)
* connect funnel persons to the frontend

* fixes

* simplify feature flag call and open persons modal on bar click

* persons dropoff call

* move methods to kea and clean up code

* remove unused imports

* round the percentage down

* pass in correct step number

* type fix

* small fixes

* prettier

* clickhouse enabled check

Co-authored-by: Li Y Yu <liyi@Lis-MacBook-Pro.local>
2021-07-06 12:51:36 -04:00
Eric Duong
708dcbbdf5
Funnel steps breakdown (#4949)
* move breakdown logic to separate class

* working breakdown without limits

* add limit logic

* remove print

* arr to dict

* tests

* fix test

* fix tests

* make suggested change

* remove one of the changes

* addjust again

* make funcs pure

* add limit
2021-07-06 12:37:10 -04:00
PostHog bot
53a2fafd1d
Update plugin server to 1.1.0 (#5008) 2021-07-06 15:58:19 +01:00
Alex Gyujin Kim
b9c8cf142a
Sessions table bug fixes (#4964)
* sessions table bug fixes

* match event icon tweak

* code quality

* feature flag that expand

* single expand/collapse button

* update UI of matching events

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-07-06 16:51:22 +02:00
Tim Glaser
2f88176c46
Display empty values correctly (#4913)
* Display empty values correctly

* fix broken test and I

* handle more cases of empty strings / objects

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-07-06 16:28:07 +02:00
Yakko Majuri
cd5df835b5
Plugin Metrics UI (#4871)
* Plugin Metrics UI

* remove testing code

* update tests

* add feature flag

* fix title

* rename to 1355plugin_metrics

* always refresh
2021-07-06 10:24:21 -03:00
PostHog bot
c7d9803434
Update plugin server to 1.0.3 (#5005) 2021-07-06 13:19:10 +01:00
Yakko Majuri
0cf66ed6c5
Set PISCINA_ATOMICS_TIMEOUT (#4997) 2021-07-06 11:09:13 +02:00
PostHog bot
1764e2ca93
Update plugin server to 1.0.2 (#5002) 2021-07-06 10:01:17 +01:00
Sam Winslow
a743255fdc
Add horizontally scrolling funnel bar graph & incorporate design changes (#4965)
* Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-07-06 09:13:22 +02:00
Sam Winslow
660999f7c7
Fix CSS overflow prop on filters (#4994) 2021-07-05 12:45:42 -04:00
Tim Glaser
d765483c5c
Fix index already exists (#4993)
* Fix index already exists

Adds to #4969

* Remove migration from model
2021-07-05 17:01:17 +02:00
Michael Matloka
d655ca7c8d
Fix some insights query building 500s (#4971)
* Fix handling of cohort without match groups

* Fix bug with CH precalculated cohort query building

* Fix `get_person_ids_by_cohort_id`
2021-07-05 11:49:55 +02:00
Paolo D'Amico
1331ab1679
Add to dashboard button in funnels (#4986) 2021-07-05 11:37:46 +02:00
Michael Matloka
239e197e30
PR template wording update (#4876)
* Update pull_request_template.md

* Update pull_request_template.md
2021-07-02 21:18:24 +02:00
Alex Gyujin Kim
299a1121a1
Allow session filters to be deeplinked properly (#4983) 2021-07-02 11:38:08 -07:00
Marius Andra
7bcd721b52
Replace url instead of pushing when changing properties/filters (#4966)
* replace url instead of pushing when changing properties/filters

* missed one
2021-07-02 17:02:13 +02:00
Michael Matloka
64a7f0fb8e
Fix funnel trends backwards compatibility (#4978)
* Fix funnel trends backwards compatibility

* Don't set funnel_viz_type outside of funnel insight filters

* Reorder conditions for clarity and use null check
2021-07-02 14:26:21 +00:00
Karl-Aksel Puulmann
a1e2f14060
Use redis for axes handler (#4975)
* Use redis for axes handler

Original motivation: axes is running into `InterfaceError: connection already closed`
for database (pg) connections. Not sure what that is caused by, but it's
causing api requests to sporatically fail hence reducing reliability.

Sentry issue: https://sentry.io/organizations/posthog/issues/1905826905/?project=1899813&statsPeriod=14d

This error seems to be only occurring in axes hence making me think
switching out the handler will work wonders.

Switching the handler to redis has other benefits as well. As axes is
hit every request this should speed things up. To quote documentation:

> axes.handlers.cache.AxesCacheHandler only uses the cache for monitoring attempts and does not persist data other than in the cache backend; this data can be purged automatically depending on your cache configuration, so the cache handler is by design less secure than the database backend but offers higher throughput and can perform better with less bottlenecks.

* Disable axes during testing
2021-07-02 14:16:28 +02:00
Karl-Aksel Puulmann
d899ea8373
Return a 512 error if query would be estimated to time out (#4973) 2021-07-02 13:35:18 +03:00
posthog-contributions-bot[bot]
dca80435ff
🤖: Add chidexebere as a contributor 🎉 (#4962) 2021-07-02 10:31:24 +01:00
Michael Matloka
3f1393c6aa
Don't disable Cypress suite for bot PRs (#4974) 2021-07-02 09:15:32 +00:00
Marius Andra
35aface03f
Fix funnel navigation step-merge (#4939)
* fix when new steps in the url get merged with old steps from values (new steps contain actions, old events)

* set default event in funnels

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-07-01 22:58:15 +00:00
Neil Kakkar
22e02537c4
Setup Funnel Option Type, and proper Funnel[Persons] API routes (#4946)
* setup funnel option type, and proper API for persons and usual funnel routes

* update tests, fix bugs

* make insights compulsory

* nvm

* remove insights key

* fix person caching

* revert problems, fix typings

* address comments

* dont use defaults in mixins

* typing

* cleanup and fix TODOs

* update test

* adapt api to 4957

Co-authored-by: eric <eeoneric@gmail.com>
2021-07-01 14:43:44 -04:00
Michael Matloka
2f5266e2cf
Funnel time to convert query (#4947)
* Create funnel_time_to_convert.py

* Create test_funnel_time_to_convert.py

* Remove unused things

* Rework time to convert query to use our own SQL

* Add comments to query

* Fix typo in comment

Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>

* Use feedback

* Only override `ClickhouseFunnelTimeToConvert._format_results`

* Switch test users B and C around

* Fix typo

Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
Co-authored-by: eric <eeoneric@gmail.com>
2021-07-01 13:41:11 -04:00
Michael Matloka
a5cc8d36df
Handle cohort being filtered on not existing (#4961)
* Raise 400 instead of 500 if filter cohort does not exist

* Actually return empty 200 results instead of 400

Co-authored-by: eric <eeoneric@gmail.com>
2021-07-01 13:30:18 -04:00
Neil Kakkar
a5b7b31827
Funnel with Strict Step Ordering (#4890)
* wip: pagination for persons on clickhouse funnels

* wip: added offset support for getting a list of persons; added support for conversion window;

* fixed mypy exception

* helper function to insert data for local testing

* moved generate code into separate class for more functionality later

* corrected person_distinct_id to use the person id from postgres

* minor corrections to generate local class along with addition of data cleanup via destroy() method

* reduce the number of persons who make it to each step

* moved funnel queries to a new folder for better organization; separated funnel_persons and funnel_trends_persons into individual classes;

* funnel persons and tests

* initial implementation

* invoke the funnel or funnel trends class respectively

* add a test

* add breakdown handling and first test

* add test stubs

* remove repeats

* mypy corrections and PR feedback

* run funnel test suite on new query implementation

* remove imports

* corrected tests

* minor test updates

* correct func name

* fix types

* func name change

* move builder functions to funnel base

* add test classe for new funnel

* Handle multiple same events in the funnel (#4863)

* dedup + tests

* deep equality. Tests to come

* write test for entity equality

* finish testing funnels

* clean up comments

* add strict option for funnels

* typing

* use new persons pattern

* persons for funnel strict ordering

Co-authored-by: Buddy Williams <buddy@posthog.com>
Co-authored-by: eric <eeoneric@gmail.com>
2021-07-01 13:14:40 -04:00
Neil Kakkar
e60e3c7964
Setup Funnel Unordered persons and Testing (#4943)
* wip: pagination for persons on clickhouse funnels

* wip: added offset support for getting a list of persons; added support for conversion window;

* fixed mypy exception

* helper function to insert data for local testing

* moved generate code into separate class for more functionality later

* corrected person_distinct_id to use the person id from postgres

* minor corrections to generate local class along with addition of data cleanup via destroy() method

* reduce the number of persons who make it to each step

* moved funnel queries to a new folder for better organization; separated funnel_persons and funnel_trends_persons into individual classes;

* funnel persons and tests

* initial implementation

* invoke the funnel or funnel trends class respectively

* add a test

* add breakdown handling and first test

* add test stubs

* remove repeats

* mypy corrections and PR feedback

* run funnel test suite on new query implementation

* remove imports

* corrected tests

* minor test updates

* correct func name

* fix types

* unordered step and test

* func name change

* move builder functions to funnel base

* add test classe for new funnel

* resolve issues with unordered funnel

* oops

* remove breakdown, fix mypy error

* Handle multiple same events in the funnel (#4863)

* dedup + tests

* deep equality. Tests to come

* write test for entity equality

* finish testing funnels

* clean up comments

* from O(2^N) to O(N)

* add query intuition blurb

* rm todo

* wip persons

* wip persons 2

* address comments

* test things, fix bugs

* match result format to funnel.py

Co-authored-by: Buddy Williams <buddy@posthog.com>
Co-authored-by: eric <eeoneric@gmail.com>
2021-07-01 12:11:54 -04:00
Karl-Aksel Puulmann
ec5d839337
Proposal: Use ValidationError over ValueError in views (#4917)
* Proposal: Use `ValidationError` over `ValueError` in views

This generates a nicer exception for our users (400 response instead of
500) and we cut down on 500 errors for things that are not expected to
work.

* Capitalization

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-07-01 18:48:09 +03:00
Li Yi Yu
ed2f9ce47e
Make funnel persons api call return values structure consistent with others (#4957)
* make funnel persons api call return values consistent with others

* update for regular funnels

* update tests

* black

* fix tests

* test fix

* fix tests

Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
2021-07-01 10:04:40 -04:00
Karl-Aksel Puulmann
089912bfd7
Handle AnonymousUser() in api/team endpoint (#4956)
Sentry error: https://sentry.io/organizations/posthog/issues/2462252497/?project=1899813&query=is%3Aunresolved+is%3Aunassigned
2021-07-01 15:08:56 +03:00
Karl-Aksel Puulmann
a5135c210b
Fix PropertiesVolumeTable issue (#4934)
Sentry:
- https://sentry.io/organizations/posthog/issues/2362813464/?project=1899813&query=is%3Aunassigned+is%3Aunresolved
- https://sentry.io/organizations/posthog/issues/2389010198/?project=1899813&query=is%3Aunassigned+is%3Aunresolved
2021-07-01 11:33:41 +02:00
Karl-Aksel Puulmann
06884e0e1c
Speed up /api/person/properties under clickhouse (#4940)
For our largest teams this currently times out on postgres. Tested and
this query works well on clickhouse.

Sentry issue: https://sentry.io/organizations/posthog/issues/1724065650/events/a038f0a1624e4e68bd47142731f26018/?project=1899813&statsPeriod=14d
2021-07-01 12:31:23 +03:00
Marius Andra
cbcc169384
Add /api/feature_flags/user_status?distinct_id=ID (#4850) 2021-07-01 06:48:03 +02:00
Alex Gyujin Kim
f717d9d126
Better Sessions (Deeplinking, filter matching, expand/collapse options, matching highlights) (#4840)
* eslint

* implement deeplinking on frontend

* highlight matching events

* remove console.logs

* missed a print

* standardize entity to session filter conversion

* add matching events icon

* styling expand column width

* autoscroll, sessions table filtering, action options

* add e2e tests and a few bug fixes

* remove console.logs

* lint rules and typescript fixes
2021-06-30 19:27:36 -07:00
Sam Winslow
11a660f3e6
Funnel step querying UI (#4893) 2021-06-30 21:24:51 -04:00
Kunal
a6af217e34
Track realm on sign up events (#4952)
* track realm on sign up

* fix test

* fix test

* update tests to work across envs

Co-authored-by: kunal <kunal@kunals-MBP.hsd1.ca.comcast.net>
2021-06-30 13:52:40 -07:00
Sam Winslow
c145309d58
Move SortableDragIcon to common icons file (#4951) 2021-06-30 12:30:12 -04:00
Michael Matloka
662e979367
Ignore breakdown in funnel trends (#4948) 2021-06-30 17:36:51 +02:00
Sam Winslow
3fc81bdb42
add custom handle icon && adjust padding (#4944) 2021-06-30 07:51:47 -07:00
Neil Kakkar
28d87acc27
Funnel Unordered Steps (#4868)
* wip: pagination for persons on clickhouse funnels

* wip: added offset support for getting a list of persons; added support for conversion window;

* fixed mypy exception

* helper function to insert data for local testing

* moved generate code into separate class for more functionality later

* corrected person_distinct_id to use the person id from postgres

* minor corrections to generate local class along with addition of data cleanup via destroy() method

* reduce the number of persons who make it to each step

* moved funnel queries to a new folder for better organization; separated funnel_persons and funnel_trends_persons into individual classes;

* funnel persons and tests

* initial implementation

* invoke the funnel or funnel trends class respectively

* add a test

* add breakdown handling and first test

* add test stubs

* remove repeats

* mypy corrections and PR feedback

* run funnel test suite on new query implementation

* remove imports

* corrected tests

* minor test updates

* correct func name

* fix types

* unordered step and test

* func name change

* move builder functions to funnel base

* add test classe for new funnel

* resolve issues with unordered funnel

* oops

* remove breakdown, fix mypy error

* Handle multiple same events in the funnel (#4863)

* dedup + tests

* deep equality. Tests to come

* write test for entity equality

* finish testing funnels

* clean up comments

* from O(2^N) to O(N)

* add query intuition blurb

* rm todo

* address comments

Co-authored-by: Buddy Williams <buddy@posthog.com>
Co-authored-by: eric <eeoneric@gmail.com>
2021-06-30 14:01:59 +02:00
Paolo D'Amico
bcfa2b8f37
Feature flags - UI fixes (#4938) 2021-06-30 13:34:38 +02:00
Li Yi Yu
20a0ceabf5
Persons modal filtering (#4839)
* open person link in new tab

* set up filtering for person modal

* leave basic search with fuse

* allow for property filtering

* clean up UI

* linter

* replace fuse with backend querying because of pagination issues

* lint

* cohort test failure fix

* prettier

* fix bug

* do not open new persons tab

* return unique persons

* reuse filter request method for persons modal search

* fix test and linter failures

* isort

* feature flag it

* don't disappoint mypy

* try to separate persons modal logic

* cleanup component and logic code

* try to make types happy

* more type fixing

* fix count bug

* more fixes

* type with session string instead of string

* sanitize url param

* add or session back

Co-authored-by: Marius Andra <marius.andra@gmail.com>
2021-06-30 12:25:45 +02:00
Eric Duong
628b431b6c
Revert "Revert "Allow specifying from and to steps in funnel trends in API (#4914)" (#4931)" (#4932)
This reverts commit 8c06f9aa72.
2021-06-29 20:16:48 -04:00