Comments (5)
Are you calling PostHog::init
in the queue job as well?
Sounds like PostHog::init
wasn't called
from posthog-php.
Facing the same problem. I have tested calling PostHog::init
in the queued job as well but still didn't work:
PostHog::init(config()->get('services.posthog.api_key'), [
'host' => config()->get('services.posthog.host'),
]);
PostHog::capture([
'distinctId' => $this->user->getKey(),
'event' => 'user:registered',
'properties' => [
'registered_via' => $this->registerdVia,
],
]);
However it does work when running the job synchronously.
from posthog-php.
batch_size as optional parameter solved my problem (we don't have 100 events in time, that's why we didn't catch events in PostHog)
from posthog-php.
@nwdles could you show an example? I am confused about that parameter. Do yo mean this?
https://posthog.com/docs/api/post-only-endpoints#batch-events
from posthog-php.
https://posthog.com/docs/api/post-only-endpoints#batch-events
I mean this
Posthog::init(config('posthog.api_key'), ['host' => config('posthog.url'), 'batch_size' => 1]);
from posthog-php.
Related Issues (18)
- Deploy the package
- Support feature flags API HOT 3
- TODO HOT 2
- posthog-php does not respect http protocol
- Possibility to "accumulate" properties ? HOT 3
- Unexpected behaviour with "maximumBackOffDuration" in HttpClient HOT 4
- Use PSR-4 for loading dependencies HOT 1
- Message size is larger than 32KB HOT 1
- Slowness in Posthog server response, cause general slowness HOT 2
- PostHog::init crashes when adding a personalAPIKey HOT 1
- Using posthog-php breaks page rendering
- Proposal: add optional cache for feature flags
- FeatureFlags: PHP issues a warning for non-local feature flags that are not enabled for the user HOT 2
- Client::loadFlags() triggers type error when request in localFlags() doesn't return data HOT 1
- Dependabot friendly releases
- PostHog::alias() returns a different type depending on batch_size
- Enable CI/Github Actions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from posthog-php.