Some fixes to the Custom Props feature (#3241)

* rename Properties to Custom Properties in Site Settings

* fix docs link for custom props

* add back the external links for special goal URLs and 404 paths

* grandfathering note
pull/3245/head^2 r2023.08.07-163
RobertJoonas 3 years ago committed by GitHub
parent 9e26ea2cdf
commit eeca63ff4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -24,6 +24,14 @@ function SpecialPropBreakdown(props) {
return api.get(url.apiPath(site, `/custom-prop-values/${prop}`), query)
}
function externalLinkDest() {
if (prop === 'path') {
return (listItem) => url.externalLinkForPage(site.domain, listItem.name)
} else {
return (listItem) => listItem.name
}
}
const getFilterFor = (listItem) => { return {'props': JSON.stringify({[prop]: listItem['name']})} }
return (
@ -37,6 +45,7 @@ function SpecialPropBreakdown(props) {
CR_METRIC
]}
detailsLink={url.sitePath(site, `/custom-prop-values/${prop}`)}
externalLinkDest={externalLinkDest()}
maybeHideDetails={true}
query={query}
color="bg-red-50"

@ -1,8 +1,9 @@
<section class="shadow bg-white dark:bg-gray-800 sm:rounded-md sm:overflow-hidden">
<PlausibleWeb.Components.Generic.notice class="rounded-t-md rounded-b-none">
Properties is an upcoming premium feature that's free-to-use during the
private preview. Pricing will be announced soon. See examples and learn
more in <.link
private preview. Pricing will be announced soon. Existing subscribers will
be grandfathered and will keep having access to custom properties without
any change to their plan. See examples and learn more in <.link
class="font-medium text-yellow underline hover:text-yellow-600"
href="https://plausible.io/docs/custom-pageview-props"
target="_blank"
@ -14,7 +15,7 @@
<header class="w-full flex">
<span class="flex-1">
<h1 class="text-lg leading-6 font-medium text-gray-900 dark:text-gray-100">
Properties
Custom Properties
</h1>
<h2 class="mt-1 text-sm leading-5 text-gray-500 dark:text-gray-400">
@ -24,7 +25,7 @@
</span>
<.link
href="https://plausible.io/docs/custom-pageview-props"
href="https://plausible.io/docs/custom-props/introduction"
target="_blank"
rel="noreferrer"
>

@ -31,7 +31,7 @@ defmodule PlausibleWeb.LayoutView do
[key: "Funnels", value: "funnels"]
end,
if Plausible.Props.enabled_for?(conn.assigns[:current_user]) do
[key: "Properties", value: "properties"]
[key: "Custom Properties", value: "properties"]
end,
[key: "Search Console", value: "search-console"],
[key: "Email reports", value: "email-reports"],

Loading…
Cancel
Save