Problem/Motivation

This is now required for the very helpful https://posthog.com/docs/advanced/proxy

See https://posthog.com/docs/advanced/proxy#update-your-posthog-sdk

UI host should be optional and only if set, we should do it like this:

posthog.init('phc_Tw3hEjNSFgaLuZ7vhhVgfujKeHK5TjN7XGgvD2xY1vy', {
  api_host: 'https://yoursubdomain.myapp.com',
  ui_host: 'https://us.posthog.com'
})

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork posthog-3578775

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

anybody created an issue. See original summary.

anybody’s picture

Issue summary: View changes

grevil made their first commit to this issue’s fork.

anybody’s picture

Status: Active » Reviewed & tested by the community

RTBC once it works and the comments are resolved. Should we add a short test for the value to be present in JS if set?

  • anybody committed e9d703b7 on 2.x authored by grevil
    feat: #3578775 Add optional "Posthog UI Host" and rename "Posthog Host"...
grevil’s picture

Assigned: grevil » Unassigned
Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.