Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use get_initial_props to get initial referrer path #1469

Open
CahidArda opened this issue Oct 15, 2024 · 0 comments
Open

Unable to use get_initial_props to get initial referrer path #1469

CahidArda opened this issue Oct 15, 2024 · 0 comments

Comments

@CahidArda
Copy link

CahidArda commented Oct 15, 2024

I want to access the initial referrer path name (not domain). This information is available in the Posthog cookie as far as I can tell in $initial_person_info.r:

{
  "$initial_person_info": {
    "r": "http://localhost:3001/refering/page/path",
    "u": "http://localhost:3000/"
  },
}

Looking at the code, it looks like it should have been possible with posthog.sessionPersistence?.get_initial_props() method but it returns empty object {}.

I eventually did it with posthog.get_property("$initial_person_info").r.

@CahidArda CahidArda changed the title Unable to get full initial referrer path Unable to use get_initial_props to get initial referrer path Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant