Skip to content

Commit

Permalink
fix: links and migrate to js-lite new major (#20854)
Browse files Browse the repository at this point in the history
  • Loading branch information
marandaneto authored Mar 18, 2024
1 parent 144b1fe commit 48d9c70
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ PostHog brings all the tools and data you need to build better products.

### Analytics and optimization tools

- **Event-based analytics:** Capture your product's usage [automatically](https://posthog.com/docs/integrate/client/js#autocapture), or [customize](https://posthog.com/docs/integrate) it to your needs
- **Event-based analytics:** Capture your product's usage [automatically](https://posthog.com/docs/libraries/js#autocapture), or [customize](https://posthog.com/docs/getting-started/install) it to your needs
- **User and group tracking:** Understand the [people](https://posthog.com/manual/persons) and [groups](https://posthog.com/manual/group-analytics) behind the events and track properties about them
- **Data visualizations:** Create and share [graphs](https://posthog.com/docs/features/trends), [funnels](https://posthog.com/docs/features/funnels), [paths](https://posthog.com/docs/features/paths), [retention](https://posthog.com/docs/features/retention), and [dashboards](https://posthog.com/docs/features/dashboards)
- **SQL access:** Use [SQL](https://posthog.com/docs/product-analytics/sql) to get a deeper understanding of your users, breakdown information and create completely tailored visualizations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,7 @@ export function EditSubscription({
help={
<>
Private channels are only shown if you have{' '}
<Link
to="https://posthog.com/docs/integrate/third-party/slack"
target="_blank"
>
<Link to="https://posthog.com/docs/webhooks/slack" target="_blank">
added the PostHog Slack App
</Link>{' '}
to them
Expand Down Expand Up @@ -300,7 +297,7 @@ export function EditSubscription({
to the channel otherwise Subscriptions will fail to be
delivered.{' '}
<Link
to="https://posthog.com/docs/integrate/third-party/slack"
to="https://posthog.com/docs/webhooks/slack"
target="_blank"
>
See the Docs for more information
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/scenes/actions/ActionEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export function ActionEdit({ action: loadedAction, id }: ActionEditLogicProps):
/>
<small>
<Link
to="https://posthog.com/docs/integrate/webhooks/message-formatting"
to="https://posthog.com/docs/webhooks#message-formatting"
target="_blank"
>
See documentation on how to format webhook messages.
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/scenes/experiments/Experiment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ export function Experiment(): JSX.Element {
sure you manually send feature flag information for server-side
libraries if necessary.{' '}
<Link
to="https://posthog.com/docs/integrate/server/python#capture"
to="https://posthog.com/docs/libraries/python#capture"
target="_blank"
>
{' '}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,49 +19,49 @@ interface ExperimentImplementationDetailsProps {
}

const UTM_TAGS = '?utm_medium=in-product&utm_campaign=experiment'
const DOC_BASE_URL = 'https://posthog.com/docs/integrate/'
const DOC_BASE_URL = 'https://posthog.com/docs/'
const FF_ANCHOR = '#feature-flags'

const OPTIONS = [
{
value: 'JavaScript',
documentationLink: `${DOC_BASE_URL}client/js${UTM_TAGS}${FF_ANCHOR}`,
documentationLink: `${DOC_BASE_URL}libraries/js${UTM_TAGS}${FF_ANCHOR}`,
Icon: IconJavascript,
Snippet: JSSnippet,
},
{
value: 'ReactNative',
documentationLink: `${DOC_BASE_URL}client/react-native${UTM_TAGS}${FF_ANCHOR}`,
documentationLink: `${DOC_BASE_URL}libraries/react-native${UTM_TAGS}${FF_ANCHOR}`,
Icon: IconJavascript,
Snippet: RNSnippet,
},
{
value: 'Node.js',
documentationLink: `${DOC_BASE_URL}server/node${UTM_TAGS}${FF_ANCHOR}`,
documentationLink: `${DOC_BASE_URL}libraries/node${UTM_TAGS}${FF_ANCHOR}`,
Icon: IconNodeJS,
Snippet: NodeJSSnippet,
},
{
value: 'PHP',
documentationLink: `${DOC_BASE_URL}server/php${UTM_TAGS}${FF_ANCHOR}`,
documentationLink: `${DOC_BASE_URL}libraries/php${UTM_TAGS}${FF_ANCHOR}`,
Icon: IconPHP,
Snippet: PHPSnippet,
},
{
value: 'Ruby',
documentationLink: `${DOC_BASE_URL}server/ruby${UTM_TAGS}${FF_ANCHOR}`,
documentationLink: `${DOC_BASE_URL}libraries/ruby${UTM_TAGS}${FF_ANCHOR}`,
Icon: IconRuby,
Snippet: RubySnippet,
},
{
value: 'Golang',
documentationLink: `${DOC_BASE_URL}server/go${UTM_TAGS}${FF_ANCHOR}`,
documentationLink: `${DOC_BASE_URL}libraries/go${UTM_TAGS}${FF_ANCHOR}`,
Icon: IconGolang,
Snippet: GolangSnippet,
},
{
value: 'Python',
documentationLink: `${DOC_BASE_URL}server/python${UTM_TAGS}${FF_ANCHOR}`,
documentationLink: `${DOC_BASE_URL}libraries/python${UTM_TAGS}${FF_ANCHOR}`,
Icon: IconPython,
Snippet: PythonSnippet,
},
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/scenes/feature-flags/FeatureFlagCodeOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,14 @@ export const PAYLOAD_LIBRARIES: string[] = [
export const BOOTSTRAPPING_OPTIONS: InstructionOption[] = [
{
value: 'JavaScript',
documentationLink: `${DOC_BASE_URL}integrations/js-integration${UTM_TAGS}${BOOTSTRAPPING_ANCHOR}`,
documentationLink: `${DOC_BASE_URL}libraries/js${UTM_TAGS}${BOOTSTRAPPING_ANCHOR}`,
Snippet: JSBootstrappingSnippet,
type: LibraryType.Client,
key: SDKKey.JS_WEB,
},
{
value: 'React Native',
documentationLink: `${DOC_BASE_URL}integrate/client/react-native${UTM_TAGS}${BOOTSTRAPPING_ANCHOR}`,
documentationLink: `${DOC_BASE_URL}libraries/react-native${UTM_TAGS}${BOOTSTRAPPING_ANCHOR}`,
Snippet: JSBootstrappingSnippet,
type: LibraryType.Client,
key: SDKKey.REACT_NATIVE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export function FeatureFlagReleaseConditions({
These properties aren't immediately available on first page load for unidentified persons.
This feature flag requires that at least one event is sent prior to becoming available to
your product or website.{' '}
<Link to="https://posthog.com/docs/integrate/client/js#bootstrapping-flags" target="_blank">
<Link to="https://posthog.com/docs/libraries/js#bootstrapping-flags" target="_blank">
{' '}
Learn more about how to make feature flags available instantly.
</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function NodeCaptureSnippet(): JSX.Element {
// Send queued events immediately. Use for example in a serverless environment
// where the program may terminate before everything is sent.
// Use \`client.flush()\` instead if you still need to send more events or fetch feature flags.
client.shutdownAsync()`}
client.shutdown()`}
</CodeSnippet>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pod install`}
<p>
PostHog is most easily used via the <code>PostHogProvider</code> component but if you need to
instantiate it directly,{' '}
<Link to="https://posthog.com/docs/integrate/client/react-native#without-the-posthogprovider">
<Link to="https://posthog.com/docs/libraries/react-native#without-the-posthogprovider">
check out the docs
</Link>{' '}
which explain how to do this correctly.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function WebhookIntegration(): JSX.Element {
Send notifications when selected actions are performed by users.
<br />
Guidance on integrating with webhooks available in our docs,{' '}
<Link to="https://posthog.com/docs/integrate/third-party/slack">for Slack</Link> and{' '}
<Link to="https://posthog.com/docs/webhooks/slack">for Slack</Link> and{' '}
<Link to="https://posthog.com/docs/webhooks/microsoft-teams">for Microsoft Teams</Link>. Discord is also
supported.
</p>
Expand Down
4 changes: 2 additions & 2 deletions posthog/api/person.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def get_funnel_actor_class(filter: Filter) -> Callable:

class PersonViewSet(TeamAndOrgViewSetMixin, viewsets.ModelViewSet):
"""
To create or update persons, use a PostHog library of your choice and [use an identify call](/docs/integrate/identifying-users). This API endpoint is only for reading and deleting.
To create or update persons, use a PostHog library of your choice and [use an identify call](/product-analytics/identify). This API endpoint is only for reading and deleting.
"""

scope_object = "person"
Expand Down Expand Up @@ -646,7 +646,7 @@ def update(self, request, *args, **kwargs):
def create(self, *args, **kwargs):
raise MethodNotAllowed(
method="POST",
detail="Creating persons via this API is not allowed. Please create persons by sending an $identify event. See https://posthog.com/docs/integrate/identifying-user for details.",
detail="Creating persons via this API is not allowed. Please create persons by sending an $identify event. See https://posthog.com/docs/product-analytics/identify for details.",
)

def _set_properties(self, properties, user):
Expand Down

0 comments on commit 48d9c70

Please sign in to comment.