Giter VIP home page Giter VIP logo

Comments (3)

pauldambra avatar pauldambra commented on July 18, 2024

Hi Allan,

Do the properties need to remain only in state on the client?

Could you call

PostHog::identify(array(
  'distinctId' => 'user:123',
  'properties' => array(
    'theInformation' => 'I want to save',
  )
));

And then call the API to query for events by property

e.g. to find events where a custom person is as above you would call

https://app.posthog.com/api/projects/2/events/?properties=[{"key":"theInformation","value":["I want to save"],"operator":"exact","type":"person"}]&orderBy=["-timestamp"]

Would that work for you?

from posthog-php.

allan-simon avatar allan-simon commented on July 18, 2024

thanks your remark permitted me to refine my problem

the main problem i face is I may call PostHog::capture in some place where having the user:123 is not easily accessible so regardless if i was able to do identify with most of properties set at this moment. I would be missing the "distinctId" that permits to link the event to that user

so yes my problem is more "Could it be possible to tell posthog to keep a 'current distinct id' "

from posthog-php.

pauldambra avatar pauldambra commented on July 18, 2024

Hmm, that's how the JS SDK works...

If I make a call to identify and then on the same device make a call to capture

Screenshot 2021-11-04 at 22 46 06

I can see that the captured event is from an identified user

Screenshot 2021-11-04 at 22 47 45

We link the two together so we know the event comes from the user

I'm completely new to the PHP library, and don't know symfony at all.

Is the problem that Symfony is stopping that happening, or that the PHP library doesn't do it?

from posthog-php.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.