From b5e940b0b83b81d33cf928f9869398fdd3ef6a4d Mon Sep 17 00:00:00 2001 From: Bijan Date: Wed, 11 Dec 2024 16:02:33 -0500 Subject: [PATCH 01/29] Initial draft of alerts post --- contents/blog/10-alerts.mdx | 68 +++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 contents/blog/10-alerts.mdx diff --git a/contents/blog/10-alerts.mdx b/contents/blog/10-alerts.mdx new file mode 100644 index 000000000000..709637453398 --- /dev/null +++ b/contents/blog/10-alerts.mdx @@ -0,0 +1,68 @@ +--- +title: "10 ways to use alerts" +date: 2024-12-11 +author: + - bijan-boustani +rootpage: /blog +featuredImage: >- + https://i.redd.it/n037ua69mteb1.gif +featuredImageType: full +category: General +tags: + - Alerts +--- + +# 10 ways to use alerts + +PostHog's new alert features allow you to receive notifications based on thresholds. Here is how to get started and some examples of how they can be useful. + +## How to create an alert + +- Select an insight. +- Create an alert. +- Set a threshold. + +Threshold alerts, percentage change, and trends with breakdowns. + +## Practical examples + +### Traffic spike alert + +High website traffic alert (e.g. notify if this page gets more than x views in a day) + +### Conversion rate + +> When the conversion rate drops below a certain threshold + +### Error alerts + +- If errors today > X +- 404s surpass a threshold +- rage clicks and dead clicks + +### Monitoring Deploys + +> "This would be useful as a simple canary to catch misconfigured deployments" + +### Billing Check + +Test the absence of something happening: If no transactional billing emails are sent, alert the growth team. + +### Alert on breakdown in referral sources + +Alert on major changes in breakdowns. "For example, I have a graph showing traffic to my site by day broken down by referrer - if there's a major change in who's referring traffic (a bunch of new traffic from a new source, or a previous major source of traffic disappearing) I'd love to be able to get alerts about that, even if the overall traffic total doesn't shift. + +## Upcoming features + +Currently alerts are available for Trends. But they're also in the works for funnels, which will make conversion alerts better. + +## Suggestions? + +Any other features you'd like to see? Or interesting use cases to share? + +## Notes + +- Come up with a much better title +- Use the examples to ensure all the useful features are shared. +- For example, notifying the growth team is a good example to show how you can notify multiple people for a single alert. +- What examples do other services show for their alert features? \ No newline at end of file From 8c978d6a10a6baec9c14ed8c64c94056fc566f78 Mon Sep 17 00:00:00 2001 From: Bijan Date: Mon, 16 Dec 2024 10:14:30 -0500 Subject: [PATCH 02/29] Alerts blog post draft --- contents/blog/10-alerts.mdx | 166 ++++++++++++++++++++---- contents/founders/posthog-first-five.md | 2 +- 2 files changed, 143 insertions(+), 25 deletions(-) diff --git a/contents/blog/10-alerts.mdx b/contents/blog/10-alerts.mdx index 709637453398..492ac9164a6d 100644 --- a/contents/blog/10-alerts.mdx +++ b/contents/blog/10-alerts.mdx @@ -1,68 +1,186 @@ --- -title: "10 ways to use alerts" -date: 2024-12-11 +title: "7 practical uses for PostHog alerts" +date: 2024-12-16 author: - bijan-boustani rootpage: /blog -featuredImage: >- - https://i.redd.it/n037ua69mteb1.gif -featuredImageType: full category: General tags: - Alerts + - Product updates --- -# 10 ways to use alerts +To keep life interesting, it's important to live in a state of perpetual ignorance. When things are going well, there's no need to find out why. When things go south, let anxiety run its course. -PostHog's new alert features allow you to receive notifications based on thresholds. Here is how to get started and some examples of how they can be useful. +![Homer covers his eyes while driving]() -## How to create an alert +> "Ignorance is bliss." +> – Not Sun Tzu, probably -- Select an insight. -- Create an alert. -- Set a threshold. +An alternative, less exciting, approach to life is to become aware as things change. For example, you can use PostHog's new alert features to receive notifications based on your [insights](/docs/product-analytics/insights). -Threshold alerts, percentage change, and trends with breakdowns. +You can track important metrics, and get email notifications if they cross threshold you specify. The threshold can be an absolute value (e.g. pageviews exceeded 1,000) or a relative amount (e.g. conversion rate increased by 10%). + +So, instead of having to remember to check in on the status of a project, a feature, or a metric; you can receive an email alert as soon as changes happen. + +Let's get started with how to create alerts, and then we can dive into some practical examples of how alerts can be helpful. + +## How to create alerts + +Alerts are based on your [insights](/docs/product-analytics/insights). You can select from your existing [trends](/docs/product-analytics/trends/overview), or create a new one. + +To create an alert, click the **Alerts** button on the top right of the insight page. And then click **New alert**. + + + +To configure an alert, we'll set all of the following: + +- **Name:** this is the name you'll see when the alert fires. +- **Series:** these are the data points you're showing in the graph. For example, you could have a trend insight that tracks the number of pageviews and signups. And you can use either of these series as the basis for the alert threshold. +- **Alert Type:** + - Absolute value: check if the series is more than or less than a specified amount. + - Relative value: check if the series has increased or decreased by a specified amount. These can also be configured with a percentage instead of a static value (signups increased by 10%). + + + +Then, we can configure the notification settings: + +- **Frequency:** how often we want to check the alert threshold (hourly, daily, weekly, monthly) +- **Who to notify:** who to notify. The alert will send an email to everyone in this list when the alert is triggered. + + + +Lastly, you click **Create alert**, and you're all set. + + + +If the alert threshold is met, you'll get an email that looks like this: + +![Alert email](https://res.cloudinary.com/dmukukwp6/image/upload/posthog_alert_df58e89828.png) ## Practical examples -### Traffic spike alert +Now that we can create alerts, let's take a look at a handful of practical examples. -High website traffic alert (e.g. notify if this page gets more than x views in a day) +### 1. Get an alert when traffic spikes -### Conversion rate +Want to get a notification when traffic spikes? -> When the conversion rate drops below a certain threshold +For example, you can get an alert when the number of pageviews for your pricing page rises above 8,000 views for the week. -### Error alerts +1. Create a new Trend insight. +2. Set up a "Pageview" series and filter for where "Path Name" equals "/pricing". Year to date, group by week. +3. Create an alert. Name "Pricing pageviews exceeded 8K" when pageview has value > 8000. Check weekly and notify. + +This can be useful for testing marketing campaigns and seeing if they trigger the expected spikes in traffic. + +This allows you to investigate the source of the traffic spike. We often see this at PostHog when we're featured in a popular email newsletter. + +### 2. Get notified for 404 page anomalies + +Track the number of visits to your 404 page. If a user visits `posthog.com/some-nonexistent-url` then it will take them to the 404 page. Some number of visits to this page are expected. + +But if the number of visits to this page suddenly spikes, it could mean there's an important broken link somewhere. Or perhaps you moved a page, and need to set up a redirect to prevent users from missing it. -- If errors today > X -- 404s surpass a threshold -- rage clicks and dead clicks +Graph the number of 404s. Find spikes. Click the graph to view instances. View session replay recording. Great success. -### Monitoring Deploys +I actually found a 404 in our [first five](/founders/posthog-first-five) article while writing this! + +In addition to 404s, this same logic can be applied to other things like rageclick events. "A user has rapidly and repeatedly clicked in a single place" "Rageclicks are triggered only when a user clicks three or more times (maximum 1s between each click) without moving their mouse." + +### 3. Alert if billing emails are not sent + +Alerts can also be used to check for the _absence_ of something happening. + +PostHog tracks the number of transactional billing emails that get sent out every day. If these emails aren't getting sent, it would be a big deal. + +1. Trigger events when you send transactional emails. +2. Create a `transactional_email` event. +3. Create an insight. +4. Create your alert. + +Alerts also have the ability to notify multiple team members. For critical insights like this one, you can configure the alert with the emails for everyone on your billing team instead of a single individual. + +### 4. Monitor deploys and new features > "This would be useful as a simple canary to catch misconfigured deployments" -### Billing Check +https://posthog.com/tutorials/canary-release + +Shipped a new page with a new CTA, but no one is clicking it. You can set an if less than 100 people click the CTA over the next week. + +### Error alerts + +![Simpson you've got a 513](https://frinkiac.com/video/S08E23/XOUcScbq8W_7yoA6nti16cCC31A=.gif) -Test the absence of something happening: If no transactional billing emails are sent, alert the growth team. +### 5. Conversion rate + +> When the conversion rate drops below a certain threshold ### Alert on breakdown in referral sources Alert on major changes in breakdowns. "For example, I have a graph showing traffic to my site by day broken down by referrer - if there's a major change in who's referring traffic (a bunch of new traffic from a new source, or a previous major source of traffic disappearing) I'd love to be able to get alerts about that, even if the overall traffic total doesn't shift. +> Note: For trends with breakdown, the alert will fire if any of the breakdown values breaches the threshold. + +### Support contact rate + +What percentage of users are contacting support? Early adopters may be willing to figure things out on their own. + +Let's say you have 5,000 users, and 100 of them reach out every week. + +If your product spikes in popularity, the number of support requests will also increase. But at what rate? And what is sustainable? + +Now you have 50,000 users, and 100 + ## Upcoming features Currently alerts are available for Trends. But they're also in the works for funnels, which will make conversion alerts better. +Funnel example: Pricing page to signup conversion rate. + +Send PostHog event data to Slack webhooks: +https://posthog.com/docs/cdp/destinations/slack + ## Suggestions? Any other features you'd like to see? Or interesting use cases to share? +## Outro + +Check out our docs for Alerts: +https://posthog.com/docs/alerts + ## Notes - Come up with a much better title - Use the examples to ensure all the useful features are shared. - For example, notifying the growth team is a good example to show how you can notify multiple people for a single alert. -- What examples do other services show for their alert features? \ No newline at end of file +- What examples do other services show for their alert features? +- a state of careful watching and readiness especially for danger or opportunity +- Memes + - Marge Simpson catlike readiness + - Ross Unagi: "I sensed it was you." + - Homer Simpson 513 + - The frogurt is cursed + - Someone set this to evil diff --git a/contents/founders/posthog-first-five.md b/contents/founders/posthog-first-five.md index 484b684638ff..608f2d25d1be 100644 --- a/contents/founders/posthog-first-five.md +++ b/contents/founders/posthog-first-five.md @@ -64,7 +64,7 @@ Eric has worn many hats since joining PostHog, building many of our user-facing ![James](https://res.cloudinary.com/dmukukwp6/image/upload/v1710055416/posthog.com/contents/images/blog/posthog-first-five/james.png) -In the early days, James would check out people who starred the GitHub repo and sometimes get in touch to gather feedback. One day, he spied a data engineer at Uber, [James Greenhill](/community/profiles/90) (aka Jams), had left a star and this piqued his interest. +In the early days, James would check out people who starred the GitHub repo and sometimes get in touch to gather feedback. One day, he spied a data engineer at Uber, [James Greenhill](/community/profiles/30174) (aka Jams), had left a star and this piqued his interest. On a call, Jams explained Uber had built a bunch of internal tools like PostHog for data control reasons. He found the project interesting and wanted to work on it, so he did a SuperWeek like Eric and Marius. From ef3c56a7eac5a069aabebe6eeef12910f0f9491c Mon Sep 17 00:00:00 2001 From: Bijan Date: Mon, 16 Dec 2024 10:37:40 -0500 Subject: [PATCH 03/29] Rename post, starting rewrites --- .../{10-alerts.mdx => practical-alerts.mdx} | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) rename contents/blog/{10-alerts.mdx => practical-alerts.mdx} (86%) diff --git a/contents/blog/10-alerts.mdx b/contents/blog/practical-alerts.mdx similarity index 86% rename from contents/blog/10-alerts.mdx rename to contents/blog/practical-alerts.mdx index 492ac9164a6d..b31734bc2f30 100644 --- a/contents/blog/10-alerts.mdx +++ b/contents/blog/practical-alerts.mdx @@ -1,5 +1,5 @@ --- -title: "7 practical uses for PostHog alerts" +title: '7 practical uses for PostHog alerts' date: 2024-12-16 author: - bijan-boustani @@ -12,24 +12,21 @@ tags: To keep life interesting, it's important to live in a state of perpetual ignorance. When things are going well, there's no need to find out why. When things go south, let anxiety run its course. -![Homer covers his eyes while driving]() - -> "Ignorance is bliss." -> – Not Sun Tzu, probably +![Homer covers his eyes](https://res.cloudinary.com/dmukukwp6/image/upload/319051_c8e072f85e.gif) An alternative, less exciting, approach to life is to become aware as things change. For example, you can use PostHog's new alert features to receive notifications based on your [insights](/docs/product-analytics/insights). -You can track important metrics, and get email notifications if they cross threshold you specify. The threshold can be an absolute value (e.g. pageviews exceeded 1,000) or a relative amount (e.g. conversion rate increased by 10%). +You can track important metrics, and get email notifications if they cross threshold that you specify. The threshold can be an absolute value (e.g. pageviews exceeded 1,000) or a relative amount (e.g. conversion rate increased by 10%). -So, instead of having to remember to check in on the status of a project, a feature, or a metric; you can receive an email alert as soon as changes happen. +So, instead of having to remember to check in on the status of a a metric or feature; you can receive an email alert when changes occur. Let's get started with how to create alerts, and then we can dive into some practical examples of how alerts can be helpful. ## How to create alerts -Alerts are based on your [insights](/docs/product-analytics/insights). You can select from your existing [trends](/docs/product-analytics/trends/overview), or create a new one. +Alerts are based on your [insights](/docs/product-analytics/insights). You can select from your existing trends, or create a new one. -To create an alert, click the **Alerts** button on the top right of the insight page. And then click **New alert**. +To create an alert, click the **Alerts** button on the top right of the insight page. -To configure an alert, we'll set all of the following: +To configure a new alert, we'll set all of the following: - **Name:** this is the name you'll see when the alert fires. -- **Series:** these are the data points you're showing in the graph. For example, you could have a trend insight that tracks the number of pageviews and signups. And you can use either of these series as the basis for the alert threshold. -- **Alert Type:** - - Absolute value: check if the series is more than or less than a specified amount. - - Relative value: check if the series has increased or decreased by a specified amount. These can also be configured with a percentage instead of a static value (signups increased by 10%). +- **When:** select the data points the alert will be based on. The drop-down contains a list of all the series your insight's graph. For example, if you have an insight that tracks the number of pageviews and signups, you can use either of these series as the basis for the alert threshold. +- **Type:** + - **Absolute value:** check if the series is more than or less than a specified amount. + - **Relative value:** check if the series has increased or decreased by a specified amount. These can also be configured with a percentage instead of a static value (signups increased by 10%). Date: Mon, 16 Dec 2024 10:55:10 -0500 Subject: [PATCH 04/29] Cleaning up alerts blog --- contents/blog/practical-alerts.mdx | 70 ++++++++---------------------- 1 file changed, 17 insertions(+), 53 deletions(-) diff --git a/contents/blog/practical-alerts.mdx b/contents/blog/practical-alerts.mdx index b31734bc2f30..a69a70e3a342 100644 --- a/contents/blog/practical-alerts.mdx +++ b/contents/blog/practical-alerts.mdx @@ -1,5 +1,5 @@ --- -title: '7 practical uses for PostHog alerts' +title: '6 practical uses for PostHog alerts' date: 2024-12-16 author: - bijan-boustani @@ -35,13 +35,13 @@ To create an alert, click the **Alerts** button on the top right of the insight classes="rounded" /> -To configure a new alert, we'll set all of the following: +To configure a new alert, we'll set the following: - **Name:** this is the name you'll see when the alert fires. - **When:** select the data points the alert will be based on. The drop-down contains a list of all the series your insight's graph. For example, if you have an insight that tracks the number of pageviews and signups, you can use either of these series as the basis for the alert threshold. - **Type:** - - **Absolute value:** check if the series is more than or less than a specified amount. - - **Relative value:** check if the series has increased or decreased by a specified amount. These can also be configured with a percentage instead of a static value (signups increased by 10%). + - absolute value: check if the series is more than or less than a specified amount. + - relative value: check if the series has increased or decreased by a specified amount. These can also be configured with a percentage instead of a static value (signups increased by 10%). 8000. Check weekly and notify. -This can be useful for testing marketing campaigns and seeing if they trigger the expected spikes in traffic. - -This allows you to investigate the source of the traffic spike. We often see this at PostHog when we're featured in a popular email newsletter. - ### 2. Get notified for 404 page anomalies Track the number of visits to your 404 page. If a user visits `posthog.com/some-nonexistent-url` then it will take them to the 404 page. Some number of visits to this page are expected. @@ -126,58 +126,22 @@ https://posthog.com/tutorials/canary-release Shipped a new page with a new CTA, but no one is clicking it. You can set an if less than 100 people click the CTA over the next week. -### Error alerts - ![Simpson you've got a 513](https://frinkiac.com/video/S08E23/XOUcScbq8W_7yoA6nti16cCC31A=.gif) -### 5. Conversion rate +### 5. Conversion rates > When the conversion rate drops below a certain threshold -### Alert on breakdown in referral sources +### 6. Alert on breakdown in referral sources Alert on major changes in breakdowns. "For example, I have a graph showing traffic to my site by day broken down by referrer - if there's a major change in who's referring traffic (a bunch of new traffic from a new source, or a previous major source of traffic disappearing) I'd love to be able to get alerts about that, even if the overall traffic total doesn't shift. > Note: For trends with breakdown, the alert will fire if any of the breakdown values breaches the threshold. -### Support contact rate - -What percentage of users are contacting support? Early adopters may be willing to figure things out on their own. - -Let's say you have 5,000 users, and 100 of them reach out every week. - -If your product spikes in popularity, the number of support requests will also increase. But at what rate? And what is sustainable? +## Suggestions and upcoming improvements -Now you have 50,000 users, and 100 +Alerts are email-based, but PostHog also has features for [sending your event data to Slack](https://posthog.com/docs/cdp/destinations/slack). -## Upcoming features - -Currently alerts are available for Trends. But they're also in the works for funnels, which will make conversion alerts better. - -Funnel example: Pricing page to signup conversion rate. - -Send PostHog event data to Slack webhooks: -https://posthog.com/docs/cdp/destinations/slack - -## Suggestions? +Alerts are currently available for trends insights. But they're also in the works for funnels, which will make tracking conversion rates easier. For example, we can create a funnel to see how many users are following through and signing up after visiting our pricing page. Any other features you'd like to see? Or interesting use cases to share? - -## Outro - -Check out our docs for Alerts: -https://posthog.com/docs/alerts - -## Notes - -- Come up with a much better title -- Use the examples to ensure all the useful features are shared. -- For example, notifying the growth team is a good example to show how you can notify multiple people for a single alert. -- What examples do other services show for their alert features? -- a state of careful watching and readiness especially for danger or opportunity -- Memes - - Marge Simpson catlike readiness - - Ross Unagi: "I sensed it was you." - - Homer Simpson 513 - - The frogurt is cursed - - Someone set this to evil From 02797a5f8cd92ff93c6b34708213329d4ed18c62 Mon Sep 17 00:00:00 2001 From: Bijan Date: Mon, 16 Dec 2024 13:28:48 -0500 Subject: [PATCH 05/29] Rewrite intro sections --- contents/blog/practical-alerts.mdx | 34 ++++++++++-------------------- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/contents/blog/practical-alerts.mdx b/contents/blog/practical-alerts.mdx index a69a70e3a342..142c1c417a81 100644 --- a/contents/blog/practical-alerts.mdx +++ b/contents/blog/practical-alerts.mdx @@ -16,15 +16,15 @@ To keep life interesting, it's important to live in a state of perpetual ignoran An alternative, less exciting, approach to life is to become aware as things change. For example, you can use PostHog's new alert features to receive notifications based on your [insights](/docs/product-analytics/insights). -You can track important metrics, and get email notifications if they cross threshold that you specify. The threshold can be an absolute value (e.g. pageviews exceeded 1,000) or a relative amount (e.g. conversion rate increased by 10%). +You can track important metrics and get email notifications when they cross threshold that you specify. The threshold can be an absolute value (e.g. pageviews exceeded 1,000) or a relative amount (e.g. conversion rate increased by 10%). So, instead of having to remember to check in on the status of a a metric or feature; you can receive an email alert when changes occur. -Let's get started with how to create alerts, and then we can dive into some practical examples of how alerts can be helpful. +Let's get started with how to create alerts, and then we can dive into some practical examples of how they can be helpful. ## How to create alerts -Alerts are based on your [insights](/docs/product-analytics/insights). You can select from your existing trends, or create a new one. +Alerts are based on your insights. You can select from your existing [trends](/docs/product-analytics/trends/overview), or create a new one. To create an alert, click the **Alerts** button on the top right of the insight page. @@ -35,25 +35,13 @@ To create an alert, click the **Alerts** button on the top right of the insight classes="rounded" /> -To configure a new alert, we'll set the following: +To configure the alert, we'll set the following: -- **Name:** this is the name you'll see when the alert fires. -- **When:** select the data points the alert will be based on. The drop-down contains a list of all the series your insight's graph. For example, if you have an insight that tracks the number of pageviews and signups, you can use either of these series as the basis for the alert threshold. -- **Type:** - - absolute value: check if the series is more than or less than a specified amount. - - relative value: check if the series has increased or decreased by a specified amount. These can also be configured with a percentage instead of a static value (signups increased by 10%). - - - -Then, we can configure the notification settings: - -- **Frequency:** how often we want to check the alert threshold (hourly, daily, weekly, monthly) -- **Who to notify:** who should receive an email when the alert is triggered +- **Name:** the name you'll see when the alert is triggered. +- **When:** the data points the alert will be based on. The drop-down contains a list of all the series in your insight's graph. For example, if you have an insight that tracks the number of pageviews and signups, you can use either of these series as the basis for the alert threshold. +- **Type:** select "has value" to check if the series is more or less than an absolute amount. Or, select "increases by/decreases by" to check if the series increased or decreased by a relative amount. These can also be configured with a percentage instead of a static value (e.g. signups increased by 10%). +- **Frequency:** set how often you want to check the alert threshold (hourly, daily, weekly, monthly). +- **Who to notify:** select who should receive an email when the alert is triggered. -Lastly, you click **Create alert**, and you're all set. +Then, you can click **Create alert**, and you're all set. Date: Mon, 16 Dec 2024 13:59:41 -0500 Subject: [PATCH 06/29] Updates and improvements to first few examples --- contents/blog/practical-alerts.mdx | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/contents/blog/practical-alerts.mdx b/contents/blog/practical-alerts.mdx index 142c1c417a81..e30244332f32 100644 --- a/contents/blog/practical-alerts.mdx +++ b/contents/blog/practical-alerts.mdx @@ -59,10 +59,6 @@ Then, you can click **Create alert**, and you're all set. classes="rounded" /> -If the alert threshold is met, you'll get an email that looks like this: - -![Alert email](https://res.cloudinary.com/dmukukwp6/image/upload/posthog_alert_df58e89828.png) - For a more detailed walkthrough, you can also check out our our [Alerts docs](https://posthog.com/docs/alerts), which we'll also update as new alerting features get added. ## Practical uses for alerts @@ -71,27 +67,29 @@ Now that we can create alerts, let's take a look at a handful of practical examp ### 1. Get an alert when traffic spikes -Want to investigate when traffic spikes for your website? This can be useful for testing marketing campaigns to see if they trigger the expected spikes in traffic. +Want to investigate spikes in traffic to your website? This can be useful when testing marketing campaigns to see if they trigger the expected spikes in traffic. -But these kinds of alerts can also be useful to investigate an _unexpected_ spike in traffic. We often see this at PostHog when our content gets featured in a popular email newsletter. +But these kinds of alerts can also be useful to investigate an _unexpected_ spike in traffic. We often see this at PostHog when our content gets featured in a popular email newsletter or shared on Hacker News. When we notice an influx of new signups, it can be interesting to dig in and try to figure out where they came from. -For example, we can get an alert when the number of pageviews for the pricing page rises above 8,000 views for the week. +For example, we can get an alert when the number of pageviews for our [pricing page](/pricing) rises above 8,000 views for the week. First, you can [create a new trend insight](/docs/product-analytics/trends/overview#1-creating-a-new-trend) to track pageviews where "Path Name" equals "/pricing". Then, filter by the year to date and group by week. -1. Create a new Trend insight. -2. Set up a "Pageview" series and filter for where "Path Name" equals "/pricing". Year to date, group by week. -3. Create an alert. Name "Pricing pageviews exceeded 8K" when pageview has value > 8000. Check weekly and notify. +Then, set up an alert using the steps above to trigger a notification when the number of pageviews rises above 8,000. When the threshold is crossed, this is what the email looks like: + +![Pricing pageviews alert](https://res.cloudinary.com/dmukukwp6/image/upload/posthog_alert_df58e89828.png) ### 2. Get notified for 404 page anomalies -Track the number of visits to your 404 page. If a user visits `posthog.com/some-nonexistent-url` then it will take them to the 404 page. Some number of visits to this page are expected. +You can also use alerts to track down errors. For example, you can track the number of visits to your 404 page. If someone visits `posthog.com/some-nonexistent-url` they will land on our 404 page, and some number of these kinds of visits to this page is to be expected. Anyone that misspells a URL or finds a dead link is bound to land here at some point. + +But what about anomalous spikes in 404s? It might mean you deployed a broken link somewhere. Or perhaps you moved a page and need to set up a redirect to prevent users from missing it. -But if the number of visits to this page suddenly spikes, it could mean there's an important broken link somewhere. Or perhaps you moved a page, and need to set up a redirect to prevent users from missing it. +In this case, you can set up another trend insight to graph the number of pageviews for your 404 page. You can examine the graph to establish a baseline for a standard amount of traffic to the 404 page. Then, set up an alert to check when 404s are significantly higher than this baseline. -Graph the number of 404s. Find spikes. Click the graph to view instances. View session replay recording. Great success. +![Graph of 404s](https://res.cloudinary.com/dmukukwp6/image/upload/404_graph_79107f52bb.png) -I actually found a 404 in our [first five](/founders/posthog-first-five) article while writing this! +One of the great things about these graphs is you can click the graph where you see a spike and it will display a list of all the users effected. And if you have [session replay](/session-replay) enabled, you can go through and watch the session where the 404 occurred and figure out exactly which link is broken. -In addition to 404s, this same logic can be applied to other things like rageclick events. "A user has rapidly and repeatedly clicked in a single place" "Rageclicks are triggered only when a user clicks three or more times (maximum 1s between each click) without moving their mouse." +In addition to 404s, this same logic can be applied to other anomalous events like "rageclicks." Rageclick events are when a user has rapidly and repeatedly clicked in a single place. It could be an indicator that there is some visual affordance that looks like it should be interactive, but users are surprised to find out it does nothing. You can use the same process we used for the 404 visits to hunt down rageclicks as well. ### 3. Alert if billing emails are not sent From 91b8ee6fc03c95f8e5032c5570b7198617f17940 Mon Sep 17 00:00:00 2001 From: Bijan Date: Mon, 16 Dec 2024 15:15:52 -0500 Subject: [PATCH 07/29] Wrapping up practical alert examples --- contents/blog/practical-alerts.mdx | 40 +++++++++++++++++------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/contents/blog/practical-alerts.mdx b/contents/blog/practical-alerts.mdx index e30244332f32..b2a027417dfe 100644 --- a/contents/blog/practical-alerts.mdx +++ b/contents/blog/practical-alerts.mdx @@ -95,28 +95,36 @@ In addition to 404s, this same logic can be applied to other anomalous events li Alerts can also be used to check for the _absence_ of something happening. -PostHog tracks the number of transactional billing emails that get sent out every day. If these emails aren't getting sent, it would be a big deal. +For example, PostHog tracks the number of transactional billing emails that get sent out every day. If these emails aren't getting sent, it would be a big deal. -1. Trigger events when you send transactional emails. -2. Create a `transactional_email` event. -3. Create an insight. -4. Create your alert. +To do something similar, you can track events when you trigger these transactional emails. Then, create an insight to track the number of transactional emails sent every day. -Alerts also have the ability to notify multiple team members. For critical insights like this one, you can configure the alert with the emails for everyone on your billing team instead of a single individual. +Then, we can set up an alert called "No billing events sent" that gets triggered when the transactional emails have a value less than 1. + +We can set the frequency to check this daily. And for critical alerts like this, you can add more than one email to the notification list and ensure the entire billing team gets the alert. ### 4. Monitor deploys and new features -> "This would be useful as a simple canary to catch misconfigured deployments" +With feature flags, you can set up [canary releases](/tutorials/canary-release) to slowly roll out changes and make sure your new features work well before they're released to all your users. + +But you still want to monitor deploys and new features to verify that they're having the intended effect and not triggering unexpected errors. + +![Simpson, you've got a 513](https://frinkiac.com/meme/S08E23/385084.jpg?b64lines=U0lNUFNPTiwgWU9VJ1ZFIEdPVCBBIDUxMyE=) +![That got it](https://frinkiac.com/video/S08E23/XOUcScbq8W_7yoA6nti16cCC31A=.gif) -https://posthog.com/tutorials/canary-release +For example, you could track error events and trigger an alert if the error rate rises above a particular threshold after a new feature launch. -Shipped a new page with a new CTA, but no one is clicking it. You can set an if less than 100 people click the CTA over the next week. +But there are more subtle issues that aren't necessarily bugs or errors. For example, you could launch a big redesign for the product pages on your marketing website. Or change the copy on some of your CTAs. Those won't necessarily trigger errors, but they could still have a drastic impact on engagement. -![Simpson you've got a 513](https://frinkiac.com/video/S08E23/XOUcScbq8W_7yoA6nti16cCC31A=.gif) +So you can set up an alert that coincides with the launch of your redesigned pages, and verify that the number of clicks for the CTAs on those pages should be increasing, not decreasing. -### 5. Conversion rates +### 5. Alert on changes in conversion rates -> When the conversion rate drops below a certain threshold +To set alerts on changes in your conversion rate, you can set up an insight that tracks visits to your pricing page as well as user signups. For example, we can create a trend insight and filter for pageviews where "Path Name" equals "/pricing". And then add a filter for our `user_signed_up` event. So this insight will display a graph with a line for the number of pageviews for the pricing page as well as a separate line for the number of users that signed up. + +![Conversions](https://res.cloudinary.com/dmukukwp6/image/upload/conversion_graph_d4ac533adf.png) + +To find out if the conversion rate is increasing or decreasing by a specified percentage, we can set up multiple alerts. We can set up one alert for when the `user_sign_up` event is increasing by 5% and a separate alert for when the `user_sign_up` event is decreasing by 5%. ### 6. Alert on breakdown in referral sources @@ -124,10 +132,8 @@ Alert on major changes in breakdowns. "For example, I have a graph showing traff > Note: For trends with breakdown, the alert will fire if any of the breakdown values breaches the threshold. -## Suggestions and upcoming improvements - -Alerts are email-based, but PostHog also has features for [sending your event data to Slack](https://posthog.com/docs/cdp/destinations/slack). +## Upcoming improvements and suggestions -Alerts are currently available for trends insights. But they're also in the works for funnels, which will make tracking conversion rates easier. For example, we can create a funnel to see how many users are following through and signing up after visiting our pricing page. +Alerts are currently available for trends insights. But we're currently working on adding alerts for [funnels](/docs/product-analytics/funnels), which will make it easier to track conversions across various stages. For example, we can create a funnel to see how many users are following through and signing up after visiting our pricing page. -Any other features you'd like to see? Or interesting use cases to share? +Thanks to [Anirudh](/community/profiles/30974) for making this much-requested feature a reality. The idea for threshold-based alerts started as a [GitHub Issue](https://github.com/PostHog/posthog/issues/14331), so if you have other interesting use cases and suggestions for how to improve the features be sure to let us know! From 2b95890bdf35994b75baf1af67765eb7c923d450 Mon Sep 17 00:00:00 2001 From: Bijan Date: Wed, 18 Dec 2024 11:59:19 -0500 Subject: [PATCH 08/29] Fixes and updates --- contents/blog/practical-alerts.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/contents/blog/practical-alerts.mdx b/contents/blog/practical-alerts.mdx index b2a027417dfe..1de5b2808e3f 100644 --- a/contents/blog/practical-alerts.mdx +++ b/contents/blog/practical-alerts.mdx @@ -18,9 +18,9 @@ An alternative, less exciting, approach to life is to become aware as things cha You can track important metrics and get email notifications when they cross threshold that you specify. The threshold can be an absolute value (e.g. pageviews exceeded 1,000) or a relative amount (e.g. conversion rate increased by 10%). -So, instead of having to remember to check in on the status of a a metric or feature; you can receive an email alert when changes occur. +So, instead of having to remember to check in on a metric or feature; you can receive an email alert when changes occur. -Let's get started with how to create alerts, and then we can dive into some practical examples of how they can be helpful. +Let's get started with how to create alerts, and then we'll dive into some practical examples of how they can be helpful. ## How to create alerts @@ -35,7 +35,7 @@ To create an alert, click the **Alerts** button on the top right of the insight classes="rounded" /> -To configure the alert, we'll set the following: +To configure the alert, set the following: - **Name:** the name you'll see when the alert is triggered. - **When:** the data points the alert will be based on. The drop-down contains a list of all the series in your insight's graph. For example, if you have an insight that tracks the number of pageviews and signups, you can use either of these series as the basis for the alert threshold. @@ -59,7 +59,7 @@ Then, you can click **Create alert**, and you're all set. classes="rounded" /> -For a more detailed walkthrough, you can also check out our our [Alerts docs](https://posthog.com/docs/alerts), which we'll also update as new alerting features get added. +For a more detailed walkthrough, you can also check out our [Alerts docs](https://posthog.com/docs/alerts), which we'll also update as new alerting features get added. ## Practical uses for alerts @@ -69,9 +69,9 @@ Now that we can create alerts, let's take a look at a handful of practical examp Want to investigate spikes in traffic to your website? This can be useful when testing marketing campaigns to see if they trigger the expected spikes in traffic. -But these kinds of alerts can also be useful to investigate an _unexpected_ spike in traffic. We often see this at PostHog when our content gets featured in a popular email newsletter or shared on Hacker News. When we notice an influx of new signups, it can be interesting to dig in and try to figure out where they came from. +These kinds of alerts can also be useful to investigate unexpected spikes in traffic. We often see this at PostHog when our content gets featured in a popular email newsletter or shared on Hacker News. When we notice an influx of new signups, it can be fun to dig in and try to figure out where they came from. -For example, we can get an alert when the number of pageviews for our [pricing page](/pricing) rises above 8,000 views for the week. First, you can [create a new trend insight](/docs/product-analytics/trends/overview#1-creating-a-new-trend) to track pageviews where "Path Name" equals "/pricing". Then, filter by the year to date and group by week. +For example, we can get an alert when the number of pageviews for our [pricing page](/pricing) rises above 8,000 views for the week. First, we can [create a new trend insight](/docs/product-analytics/trends/overview#1-creating-a-new-trend) to track pageviews where "Path Name" equals "/pricing". Then, filter by the year-to-date and group by week. Then, set up an alert using the steps above to trigger a notification when the number of pageviews rises above 8,000. When the threshold is crossed, this is what the email looks like: From 9a77bf440331143a8084e89fda646babcbddb247 Mon Sep 17 00:00:00 2001 From: Bijan Date: Thu, 19 Dec 2024 08:56:37 -0500 Subject: [PATCH 09/29] More edits and clarifications --- contents/blog/practical-alerts.mdx | 34 +++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/contents/blog/practical-alerts.mdx b/contents/blog/practical-alerts.mdx index 1de5b2808e3f..8894a6eef3f0 100644 --- a/contents/blog/practical-alerts.mdx +++ b/contents/blog/practical-alerts.mdx @@ -10,13 +10,13 @@ tags: - Product updates --- -To keep life interesting, it's important to live in a state of perpetual ignorance. When things are going well, there's no need to find out why. When things go south, let anxiety run its course. +To keep life interesting, it's important to live in a state of perpetual ignorance. When things are going well, there's no need to find out why. When things go downhill, let anxiety run its course. ![Homer covers his eyes](https://res.cloudinary.com/dmukukwp6/image/upload/319051_c8e072f85e.gif) An alternative, less exciting, approach to life is to become aware as things change. For example, you can use PostHog's new alert features to receive notifications based on your [insights](/docs/product-analytics/insights). -You can track important metrics and get email notifications when they cross threshold that you specify. The threshold can be an absolute value (e.g. pageviews exceeded 1,000) or a relative amount (e.g. conversion rate increased by 10%). +You can track important metrics and get email notifications when they cross a threshold that you specify. The threshold can be an absolute value (e.g. pageviews exceeded 1,000) or a relative amount (e.g. conversion rate increased by 10%). So, instead of having to remember to check in on a metric or feature; you can receive an email alert when changes occur. @@ -50,7 +50,7 @@ To configure the alert, set the following: classes="rounded" /> -Then, you can click **Create alert**, and you're all set. +Then, click **Create alert** and you'll see the new alert: -For a more detailed walkthrough, you can also check out our [Alerts docs](https://posthog.com/docs/alerts), which we'll also update as new alerting features get added. +For a more detailed walkthrough, you can also check out our [Alerts docs](https://posthog.com/docs/alerts), which we'll update as we add new features. ## Practical uses for alerts @@ -67,19 +67,19 @@ Now that we can create alerts, let's take a look at a handful of practical examp ### 1. Get an alert when traffic spikes -Want to investigate spikes in traffic to your website? This can be useful when testing marketing campaigns to see if they trigger the expected spikes in traffic. +Want to investigate spikes in traffic to your website? Monitoring the traffic to your website can help you measure the success of marketing campaigns and understand which activities drive the most visitors to your site. -These kinds of alerts can also be useful to investigate unexpected spikes in traffic. We often see this at PostHog when our content gets featured in a popular email newsletter or shared on Hacker News. When we notice an influx of new signups, it can be fun to dig in and try to figure out where they came from. +These kinds of alerts can also be useful when traffic spikes are unexpected. We often see this at PostHog when our content gets featured in a popular email newsletter or shared on Hacker News. When we notice an influx of new signups, it can be fun to dig in and try to figure out where they came from. -For example, we can get an alert when the number of pageviews for our [pricing page](/pricing) rises above 8,000 views for the week. First, we can [create a new trend insight](/docs/product-analytics/trends/overview#1-creating-a-new-trend) to track pageviews where "Path Name" equals "/pricing". Then, filter by the year-to-date and group by week. +For example, we can set up an alert when the number of pageviews for our [pricing page](/pricing) rises above 8,000 views for the week. First, we [create a new trend insight](/docs/product-analytics/trends/overview#1-creating-a-new-trend) to track pageviews where "Path Name" equals "/pricing". Then, filter by the year-to-date and group by week. -Then, set up an alert using the steps above to trigger a notification when the number of pageviews rises above 8,000. When the threshold is crossed, this is what the email looks like: +Then, set up an alert using the steps above to trigger a notification when the number of pageviews rises above 8,000. When the threshold is crossed, this is what the email alert looks like: ![Pricing pageviews alert](https://res.cloudinary.com/dmukukwp6/image/upload/posthog_alert_df58e89828.png) ### 2. Get notified for 404 page anomalies -You can also use alerts to track down errors. For example, you can track the number of visits to your 404 page. If someone visits `posthog.com/some-nonexistent-url` they will land on our 404 page, and some number of these kinds of visits to this page is to be expected. Anyone that misspells a URL or finds a dead link is bound to land here at some point. +You can also use alerts to track down errors. For example, you can track the number of visits to your 404 page. If someone visits `posthog.com/some-nonexistent-url`, they will land on our 404 page. Some number of these kinds of visits to this page is to be expected. Anyone that misspells a URL or finds a dead link is bound to land here at some point. But what about anomalous spikes in 404s? It might mean you deployed a broken link somewhere. Or perhaps you moved a page and need to set up a redirect to prevent users from missing it. @@ -87,9 +87,9 @@ In this case, you can set up another trend insight to graph the number of pagevi ![Graph of 404s](https://res.cloudinary.com/dmukukwp6/image/upload/404_graph_79107f52bb.png) -One of the great things about these graphs is you can click the graph where you see a spike and it will display a list of all the users effected. And if you have [session replay](/session-replay) enabled, you can go through and watch the session where the 404 occurred and figure out exactly which link is broken. +You can also click the graph where you see a spike and it will display a list of all the users effected. If you have [session replay](/session-replay) enabled, you can watch the session where the 404 occurred and figure out exactly which link is broken. -In addition to 404s, this same logic can be applied to other anomalous events like "rageclicks." Rageclick events are when a user has rapidly and repeatedly clicked in a single place. It could be an indicator that there is some visual affordance that looks like it should be interactive, but users are surprised to find out it does nothing. You can use the same process we used for the 404 visits to hunt down rageclicks as well. +In addition to 404s, this same logic can be applied to other events like "rageclicks." Rageclick events are when a user has rapidly and repeatedly clicked in a single place. It could be an indicator that there is some visual affordance that looks like it should be interactive, but users are surprised to find out it does nothing. You can use the same process we used for the 404 visits to hunt down rageclicks as well. ### 3. Alert if billing emails are not sent @@ -97,15 +97,15 @@ Alerts can also be used to check for the _absence_ of something happening. For example, PostHog tracks the number of transactional billing emails that get sent out every day. If these emails aren't getting sent, it would be a big deal. -To do something similar, you can track events when you trigger these transactional emails. Then, create an insight to track the number of transactional emails sent every day. +To do something similar, you can track events when you trigger transactional emails. Then, create an insight to track the number of emails sent every day. -Then, we can set up an alert called "No billing events sent" that gets triggered when the transactional emails have a value less than 1. +Then, we can set up an alert called "No billing events sent" that gets triggered when the transactional emails have a value less than 1. In other words, it will trigger the alert if no emails get sent. -We can set the frequency to check this daily. And for critical alerts like this, you can add more than one email to the notification list and ensure the entire billing team gets the alert. +We can set the frequency to check this daily. For critical alerts like this, you can add more than one email to the notification list and ensure the entire billing team receives the alert. ### 4. Monitor deploys and new features -With feature flags, you can set up [canary releases](/tutorials/canary-release) to slowly roll out changes and make sure your new features work well before they're released to all your users. +With feature flags, you can set up [canary releases](/tutorials/canary-release) to safely roll out changes and make sure your new features work well before they're released to all your users. But you still want to monitor deploys and new features to verify that they're having the intended effect and not triggering unexpected errors. @@ -116,7 +116,7 @@ For example, you could track error events and trigger an alert if the error rate But there are more subtle issues that aren't necessarily bugs or errors. For example, you could launch a big redesign for the product pages on your marketing website. Or change the copy on some of your CTAs. Those won't necessarily trigger errors, but they could still have a drastic impact on engagement. -So you can set up an alert that coincides with the launch of your redesigned pages, and verify that the number of clicks for the CTAs on those pages should be increasing, not decreasing. +So you can set up an alert that coincides with the launch of a redesigned page and verify that the number of CTA clicks should hopefully be increasing, not decreasing. ### 5. Alert on changes in conversion rates @@ -136,4 +136,4 @@ Alert on major changes in breakdowns. "For example, I have a graph showing traff Alerts are currently available for trends insights. But we're currently working on adding alerts for [funnels](/docs/product-analytics/funnels), which will make it easier to track conversions across various stages. For example, we can create a funnel to see how many users are following through and signing up after visiting our pricing page. -Thanks to [Anirudh](/community/profiles/30974) for making this much-requested feature a reality. The idea for threshold-based alerts started as a [GitHub Issue](https://github.com/PostHog/posthog/issues/14331), so if you have other interesting use cases and suggestions for how to improve the features be sure to let us know! +Thanks to [Anirudh](/community/profiles/30974) for making this much-requested feature a reality. The idea for threshold-based alerts started as a [GitHub Issue](https://github.com/PostHog/posthog/issues/14331), so if you have other interesting use cases and suggestions for how to improve the features, be sure to let us know! From 9c8919affda7156e0cd06a41f9e662238d945c14 Mon Sep 17 00:00:00 2001 From: Bijan Date: Thu, 19 Dec 2024 09:21:38 -0500 Subject: [PATCH 10/29] Add more screenshots --- contents/blog/practical-alerts.mdx | 40 +++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/contents/blog/practical-alerts.mdx b/contents/blog/practical-alerts.mdx index 8894a6eef3f0..e825f13054b3 100644 --- a/contents/blog/practical-alerts.mdx +++ b/contents/blog/practical-alerts.mdx @@ -85,7 +85,12 @@ But what about anomalous spikes in 404s? It might mean you deployed a broken lin In this case, you can set up another trend insight to graph the number of pageviews for your 404 page. You can examine the graph to establish a baseline for a standard amount of traffic to the 404 page. Then, set up an alert to check when 404s are significantly higher than this baseline. -![Graph of 404s](https://res.cloudinary.com/dmukukwp6/image/upload/404_graph_79107f52bb.png) + You can also click the graph where you see a spike and it will display a list of all the users effected. If you have [session replay](/session-replay) enabled, you can watch the session where the 404 occurred and figure out exactly which link is broken. @@ -120,17 +125,40 @@ So you can set up an alert that coincides with the launch of a redesigned page a ### 5. Alert on changes in conversion rates -To set alerts on changes in your conversion rate, you can set up an insight that tracks visits to your pricing page as well as user signups. For example, we can create a trend insight and filter for pageviews where "Path Name" equals "/pricing". And then add a filter for our `user_signed_up` event. So this insight will display a graph with a line for the number of pageviews for the pricing page as well as a separate line for the number of users that signed up. +To set alerts on changes in your conversion rate, you can set up an insight that tracks visits to your pricing page and signups. For example, we can create a trend insight and filter for pageviews where "Path Name" equals "/pricing". And then add a filter for our `user_signed_up` event. So this insight will display a graph with a line for the number of pageviews for the pricing page as well as a separate line for the number of users that signed up. + + -![Conversions](https://res.cloudinary.com/dmukukwp6/image/upload/conversion_graph_d4ac533adf.png) +If we want to find out when the conversion rate increases or decreases by 10%, we can set up multiple alerts. We can set up one alert for when the `user_sign_up` event is increasing by 10% and a separate alert for when the `user_sign_up` event is decreasing by 10%. -To find out if the conversion rate is increasing or decreasing by a specified percentage, we can set up multiple alerts. We can set up one alert for when the `user_sign_up` event is increasing by 5% and a separate alert for when the `user_sign_up` event is decreasing by 5%. + ### 6. Alert on breakdown in referral sources -Alert on major changes in breakdowns. "For example, I have a graph showing traffic to my site by day broken down by referrer - if there's a major change in who's referring traffic (a bunch of new traffic from a new source, or a previous major source of traffic disappearing) I'd love to be able to get alerts about that, even if the overall traffic total doesn't shift. +We also have the ability to trigger alerts on trends with breakdowns. For example, you can track all the traffic to your website broken down by the referral source (e.g. google, substack, direct). + +If there's a major change in where the traffic is coming from, we want to trigger an alert. Traffic could surge from a new source, or an existing source of traffic could disappear, even if the overall traffic remains the same. + +Here's an example where we set up an alert when any of those breakdown values increases by 10% or more: + + -> Note: For trends with breakdown, the alert will fire if any of the breakdown values breaches the threshold. +> 📝 Note: For trends with a breakdown, the alert will fire if _any_ of the breakdown values breaches the threshold. ## Upcoming improvements and suggestions From fbe8b9571dba301f010deaff4b1acb1748d76898 Mon Sep 17 00:00:00 2001 From: Bijan Boustani Date: Thu, 19 Dec 2024 15:52:42 -0500 Subject: [PATCH 11/29] Update contents/blog/practical-alerts.mdx Co-authored-by: Ian Vanagas <34755028+ivanagas@users.noreply.github.com> --- contents/blog/practical-alerts.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contents/blog/practical-alerts.mdx b/contents/blog/practical-alerts.mdx index e825f13054b3..94627bb58bcf 100644 --- a/contents/blog/practical-alerts.mdx +++ b/contents/blog/practical-alerts.mdx @@ -14,7 +14,7 @@ To keep life interesting, it's important to live in a state of perpetual ignoran ![Homer covers his eyes](https://res.cloudinary.com/dmukukwp6/image/upload/319051_c8e072f85e.gif) -An alternative, less exciting, approach to life is to become aware as things change. For example, you can use PostHog's new alert features to receive notifications based on your [insights](/docs/product-analytics/insights). +An alternative, less exciting, approach to life is to be aware of change. A great first step in this approach is using PostHog's new alert features to receive notifications based on your data and [insights](/docs/product-analytics/insights). You can track important metrics and get email notifications when they cross a threshold that you specify. The threshold can be an absolute value (e.g. pageviews exceeded 1,000) or a relative amount (e.g. conversion rate increased by 10%). From 4c95c8ac4aa3a575f2bb9dfc98a008d20b0e2507 Mon Sep 17 00:00:00 2001 From: Bijan Boustani Date: Thu, 19 Dec 2024 15:53:18 -0500 Subject: [PATCH 12/29] Update contents/blog/practical-alerts.mdx Co-authored-by: Ian Vanagas <34755028+ivanagas@users.noreply.github.com> --- contents/blog/practical-alerts.mdx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/contents/blog/practical-alerts.mdx b/contents/blog/practical-alerts.mdx index 94627bb58bcf..e5123a965e42 100644 --- a/contents/blog/practical-alerts.mdx +++ b/contents/blog/practical-alerts.mdx @@ -16,9 +16,7 @@ To keep life interesting, it's important to live in a state of perpetual ignoran An alternative, less exciting, approach to life is to be aware of change. A great first step in this approach is using PostHog's new alert features to receive notifications based on your data and [insights](/docs/product-analytics/insights). -You can track important metrics and get email notifications when they cross a threshold that you specify. The threshold can be an absolute value (e.g. pageviews exceeded 1,000) or a relative amount (e.g. conversion rate increased by 10%). - -So, instead of having to remember to check in on a metric or feature; you can receive an email alert when changes occur. +Instead of needing to manually check insights, you can track important metrics and get email notifications when they cross a threshold that you specify. The threshold can be an absolute value (e.g. pageviews exceeded 1,000) or a relative amount (e.g. conversion rate increased by 10%). Let's get started with how to create alerts, and then we'll dive into some practical examples of how they can be helpful. From 02017f7cc154f14c8ade05dd3e7923e71863315e Mon Sep 17 00:00:00 2001 From: Bijan Boustani Date: Thu, 19 Dec 2024 15:53:31 -0500 Subject: [PATCH 13/29] Update contents/blog/practical-alerts.mdx Co-authored-by: Ian Vanagas <34755028+ivanagas@users.noreply.github.com> --- contents/blog/practical-alerts.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contents/blog/practical-alerts.mdx b/contents/blog/practical-alerts.mdx index e5123a965e42..0c05a0126478 100644 --- a/contents/blog/practical-alerts.mdx +++ b/contents/blog/practical-alerts.mdx @@ -18,7 +18,7 @@ An alternative, less exciting, approach to life is to be aware of change. A grea Instead of needing to manually check insights, you can track important metrics and get email notifications when they cross a threshold that you specify. The threshold can be an absolute value (e.g. pageviews exceeded 1,000) or a relative amount (e.g. conversion rate increased by 10%). -Let's get started with how to create alerts, and then we'll dive into some practical examples of how they can be helpful. +To show you how you can use alerts, we'll start by showing how to create an alert and then dive into practical examples and use cases. ## How to create alerts From b69b2c1bcc20b3b4b5f2eec5d50a28c4a30366f6 Mon Sep 17 00:00:00 2001 From: Bijan Boustani Date: Thu, 19 Dec 2024 15:54:28 -0500 Subject: [PATCH 14/29] Update contents/blog/practical-alerts.mdx Co-authored-by: Ian Vanagas <34755028+ivanagas@users.noreply.github.com> --- contents/blog/practical-alerts.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contents/blog/practical-alerts.mdx b/contents/blog/practical-alerts.mdx index 0c05a0126478..f3d30c80143f 100644 --- a/contents/blog/practical-alerts.mdx +++ b/contents/blog/practical-alerts.mdx @@ -22,7 +22,7 @@ To show you how you can use alerts, we'll start by showing how to create an aler ## How to create alerts -Alerts are based on your insights. You can select from your existing [trends](/docs/product-analytics/trends/overview), or create a new one. +Alerts are based on your insights. You can set them on your existing [trends](/docs/product-analytics/trends/overview) or after creating a new one. To create an alert, click the **Alerts** button on the top right of the insight page. From 6c879f3486e91de96f77acdcd34819d755a67b9a Mon Sep 17 00:00:00 2001 From: Bijan Boustani Date: Thu, 19 Dec 2024 15:55:19 -0500 Subject: [PATCH 15/29] Update contents/blog/practical-alerts.mdx Co-authored-by: Ian Vanagas <34755028+ivanagas@users.noreply.github.com> --- contents/blog/practical-alerts.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contents/blog/practical-alerts.mdx b/contents/blog/practical-alerts.mdx index f3d30c80143f..5ac6f980823b 100644 --- a/contents/blog/practical-alerts.mdx +++ b/contents/blog/practical-alerts.mdx @@ -162,4 +162,4 @@ Here's an example where we set up an alert when any of those breakdown values in Alerts are currently available for trends insights. But we're currently working on adding alerts for [funnels](/docs/product-analytics/funnels), which will make it easier to track conversions across various stages. For example, we can create a funnel to see how many users are following through and signing up after visiting our pricing page. -Thanks to [Anirudh](/community/profiles/30974) for making this much-requested feature a reality. The idea for threshold-based alerts started as a [GitHub Issue](https://github.com/PostHog/posthog/issues/14331), so if you have other interesting use cases and suggestions for how to improve the features, be sure to let us know! +Thanks to [Anirudh](/community/profiles/30974) for making this much-requested feature a reality. The idea for threshold-based alerts started as a [GitHub issue](https://github.com/PostHog/posthog/issues/14331), so if you have other interesting use cases and suggestions for how to improve the features, be sure to let us know! From 07f5b41af426db97aacc0a39cb8c40c9f57e4ebd Mon Sep 17 00:00:00 2001 From: Bijan Boustani Date: Fri, 20 Dec 2024 08:45:43 -0500 Subject: [PATCH 16/29] Update contents/blog/practical-alerts.mdx Co-authored-by: Ian Vanagas <34755028+ivanagas@users.noreply.github.com> --- contents/blog/practical-alerts.mdx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/contents/blog/practical-alerts.mdx b/contents/blog/practical-alerts.mdx index 5ac6f980823b..aa95ddb3dc27 100644 --- a/contents/blog/practical-alerts.mdx +++ b/contents/blog/practical-alerts.mdx @@ -35,11 +35,15 @@ To create an alert, click the **Alerts** button on the top right of the insight To configure the alert, set the following: -- **Name:** the name you'll see when the alert is triggered. -- **When:** the data points the alert will be based on. The drop-down contains a list of all the series in your insight's graph. For example, if you have an insight that tracks the number of pageviews and signups, you can use either of these series as the basis for the alert threshold. -- **Type:** select "has value" to check if the series is more or less than an absolute amount. Or, select "increases by/decreases by" to check if the series increased or decreased by a relative amount. These can also be configured with a percentage instead of a static value (e.g. signups increased by 10%). -- **Frequency:** set how often you want to check the alert threshold (hourly, daily, weekly, monthly). -- **Who to notify:** select who should receive an email when the alert is triggered. +- **Name:** The name you'll see when the alert is triggered. + +- **When:** The data points the alert will be based on. The drop-down contains a list of all the series in your insight's graph. For example, if you have an insight that tracks the number of pageviews and signups, you can use either of these series as the basis for the alert threshold. + +- **Type:** Select "has value" to check if the series is more or less than an absolute amount. Or, select "increases by/decreases by" to check if the series increased or decreased by a relative amount. These can also be configured with a percentage instead of a static value (e.g. signups increased by 10%). + +- **Frequency:** Set how often you want to check the alert threshold (hourly, daily, weekly, monthly). + +- **Who to notify:** Select who should receive an email when the alert is triggered. Date: Fri, 20 Dec 2024 08:46:26 -0500 Subject: [PATCH 17/29] Update contents/blog/practical-alerts.mdx Co-authored-by: Andy Vandervell <92976667+andyvan-ph@users.noreply.github.com> --- contents/blog/practical-alerts.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contents/blog/practical-alerts.mdx b/contents/blog/practical-alerts.mdx index aa95ddb3dc27..0b1375279f84 100644 --- a/contents/blog/practical-alerts.mdx +++ b/contents/blog/practical-alerts.mdx @@ -14,7 +14,7 @@ To keep life interesting, it's important to live in a state of perpetual ignoran ![Homer covers his eyes](https://res.cloudinary.com/dmukukwp6/image/upload/319051_c8e072f85e.gif) -An alternative, less exciting, approach to life is to be aware of change. A great first step in this approach is using PostHog's new alert features to receive notifications based on your data and [insights](/docs/product-analytics/insights). +An alternative, more effective, approach to life is to use [PostHog alerts](/docs/alerts) to inform you of when important metrics change. Instead of needing to manually check insights, you can track important metrics and get email notifications when they cross a threshold that you specify. The threshold can be an absolute value (e.g. pageviews exceeded 1,000) or a relative amount (e.g. conversion rate increased by 10%). From eb1927a6c8252a45fc86290158513c968d2d321f Mon Sep 17 00:00:00 2001 From: Bijan Boustani Date: Fri, 20 Dec 2024 08:46:43 -0500 Subject: [PATCH 18/29] Update contents/blog/practical-alerts.mdx Co-authored-by: Andy Vandervell <92976667+andyvan-ph@users.noreply.github.com> --- contents/blog/practical-alerts.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contents/blog/practical-alerts.mdx b/contents/blog/practical-alerts.mdx index 0b1375279f84..beec6ae2f253 100644 --- a/contents/blog/practical-alerts.mdx +++ b/contents/blog/practical-alerts.mdx @@ -16,7 +16,7 @@ To keep life interesting, it's important to live in a state of perpetual ignoran An alternative, more effective, approach to life is to use [PostHog alerts](/docs/alerts) to inform you of when important metrics change. -Instead of needing to manually check insights, you can track important metrics and get email notifications when they cross a threshold that you specify. The threshold can be an absolute value (e.g. pageviews exceeded 1,000) or a relative amount (e.g. conversion rate increased by 10%). +Alerts will send you an email notification when an insight crosses a threshold you specific, such as an absolute value (e.g. pageviews exceeded 1,000), or a relative amount (e.g. conversion rate increased by 10%). To show you how you can use alerts, we'll start by showing how to create an alert and then dive into practical examples and use cases. From bd4c2eb5019300eaebf2e789e9f9d0b392525ab6 Mon Sep 17 00:00:00 2001 From: Bijan Boustani Date: Fri, 20 Dec 2024 08:47:09 -0500 Subject: [PATCH 19/29] Update contents/blog/practical-alerts.mdx Co-authored-by: Andy Vandervell <92976667+andyvan-ph@users.noreply.github.com> --- contents/blog/practical-alerts.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contents/blog/practical-alerts.mdx b/contents/blog/practical-alerts.mdx index beec6ae2f253..5a5288b5794e 100644 --- a/contents/blog/practical-alerts.mdx +++ b/contents/blog/practical-alerts.mdx @@ -22,7 +22,7 @@ To show you how you can use alerts, we'll start by showing how to create an aler ## How to create alerts -Alerts are based on your insights. You can set them on your existing [trends](/docs/product-analytics/trends/overview) or after creating a new one. +Alerts are based on your insights. You can set them on your existing [trends](/docs/product-analytics/trends/overview), or after creating a new one. To create an alert, click the **Alerts** button on the top right of the insight page. From ba574a41e1fcdf3ea50dfeb4af3efc62c9aa7758 Mon Sep 17 00:00:00 2001 From: Bijan Date: Tue, 7 Jan 2025 23:05:55 -0500 Subject: [PATCH 20/29] Rewrite for alerts blog post --- ...actical-alerts.mdx => alerts-examples.mdx} | 100 +++++++++++------- contents/docs/alerts/index.mdx | 3 + 2 files changed, 65 insertions(+), 38 deletions(-) rename contents/blog/{practical-alerts.mdx => alerts-examples.mdx} (59%) diff --git a/contents/blog/practical-alerts.mdx b/contents/blog/alerts-examples.mdx similarity index 59% rename from contents/blog/practical-alerts.mdx rename to contents/blog/alerts-examples.mdx index 5a5288b5794e..ccfdc3d135eb 100644 --- a/contents/blog/practical-alerts.mdx +++ b/contents/blog/alerts-examples.mdx @@ -1,6 +1,6 @@ --- -title: '6 practical uses for PostHog alerts' -date: 2024-12-16 +title: 'Never miss changes to your key metrics: 5 alerts you can use' +date: 2025-01-07 author: - bijan-boustani rootpage: /blog @@ -10,19 +10,19 @@ tags: - Product updates --- -To keep life interesting, it's important to live in a state of perpetual ignorance. When things are going well, there's no need to find out why. When things go downhill, let anxiety run its course. +To keep life interesting, it's important to live in a state of perpetual ignorance. When things are going well, there's no need to find out why. When things go downhill, let anxiety run its course. After all, who needs data and insights when you have hope? -![Homer covers his eyes](https://res.cloudinary.com/dmukukwp6/image/upload/319051_c8e072f85e.gif) +![Driving blind](https://res.cloudinary.com/dmukukwp6/image/upload/319051_c8e072f85e.gif) -An alternative, more effective, approach to life is to use [PostHog alerts](/docs/alerts) to inform you of when important metrics change. +An alternative, more effective approach is to use [PostHog alerts](/docs/alerts) to get notified when important metrics change. -Alerts will send you an email notification when an insight crosses a threshold you specific, such as an absolute value (e.g. pageviews exceeded 1,000), or a relative amount (e.g. conversion rate increased by 10%). +Alerts will send you an email notification when an insight crosses a threshold that you specify, such as an absolute value (e.g. pageviews exceeded 1,000), or a relative amount (e.g. conversion rate increased by 10%). -To show you how you can use alerts, we'll start by showing how to create an alert and then dive into practical examples and use cases. +To show you how you can use alerts, we'll start by creating an alert and then dive into practical examples and use cases. ## How to create alerts -Alerts are based on your insights. You can set them on your existing [trends](/docs/product-analytics/trends/overview), or after creating a new one. +Alerts are based on your insights. You can set them with your existing [trends](/docs/product-analytics/trends/overview), or create a new one. To create an alert, click the **Alerts** button on the top right of the insight page. @@ -61,31 +61,45 @@ Then, click **Create alert** and you'll see the new alert: classes="rounded" /> -For a more detailed walkthrough, you can also check out our [Alerts docs](https://posthog.com/docs/alerts), which we'll update as we add new features. +For a more detailed walkthrough, you can also check out our [Alerts docs](/docs/alerts), which we'll update as we add new features. ## Practical uses for alerts Now that we can create alerts, let's take a look at a handful of practical examples. -### 1. Get an alert when traffic spikes +### 1. Get alerts when traffic spikes Want to investigate spikes in traffic to your website? Monitoring the traffic to your website can help you measure the success of marketing campaigns and understand which activities drive the most visitors to your site. These kinds of alerts can also be useful when traffic spikes are unexpected. We often see this at PostHog when our content gets featured in a popular email newsletter or shared on Hacker News. When we notice an influx of new signups, it can be fun to dig in and try to figure out where they came from. -For example, we can set up an alert when the number of pageviews for our [pricing page](/pricing) rises above 8,000 views for the week. First, we [create a new trend insight](/docs/product-analytics/trends/overview#1-creating-a-new-trend) to track pageviews where "Path Name" equals "/pricing". Then, filter by the year-to-date and group by week. +For example, we can set up an alert when the number of pageviews for our [pricing page](/pricing) rises above 8,000 views for the week. First, we [create a new trend](/docs/product-analytics/trends/overview#1-creating-a-new-trend) insight to track pageviews where "Path Name" equals "/pricing". To get a good baseline for comparison, we'll filter the data to show the year-to-date and group it by week to see weekly patterns in our pricing page traffic. -Then, set up an alert using the steps above to trigger a notification when the number of pageviews rises above 8,000. When the threshold is crossed, this is what the email alert looks like: +Then, set up an alert using the steps listed above to trigger a notification when the number of pageviews rises above 8,000. -![Pricing pageviews alert](https://res.cloudinary.com/dmukukwp6/image/upload/posthog_alert_df58e89828.png) + + +When the threshold is crossed, we'll receive an email email alert like this: -### 2. Get notified for 404 page anomalies + + +### 2. Get notified for errors and 404s You can also use alerts to track down errors. For example, you can track the number of visits to your 404 page. If someone visits `posthog.com/some-nonexistent-url`, they will land on our 404 page. Some number of these kinds of visits to this page is to be expected. Anyone that misspells a URL or finds a dead link is bound to land here at some point. -But what about anomalous spikes in 404s? It might mean you deployed a broken link somewhere. Or perhaps you moved a page and need to set up a redirect to prevent users from missing it. +But what about anomalous spikes in 404s? It might mean you accidentally deployed a broken link. Or a page has been moved and you need to set up a redirect to prevent users from missing it. -In this case, you can set up another trend insight to graph the number of pageviews for your 404 page. You can examine the graph to establish a baseline for a standard amount of traffic to the 404 page. Then, set up an alert to check when 404s are significantly higher than this baseline. +In this case, you can set up another trend insight to graph the number of pageviews for your 404 page. You can examine the graph to establish a baseline for a standard amount of traffic to the 404 page. You can click the graph where you see a spike and it will display a list of all the users effected. If you have [session replay](/session-replay) enabled, you can even watch the session where the 404 occurred and figure out exactly which link is broken. -You can also click the graph where you see a spike and it will display a list of all the users effected. If you have [session replay](/session-replay) enabled, you can watch the session where the 404 occurred and figure out exactly which link is broken. +Now, we can set up an alert to check when 404s are significantly higher than this baseline. -In addition to 404s, this same logic can be applied to other events like "rageclicks." Rageclick events are when a user has rapidly and repeatedly clicked in a single place. It could be an indicator that there is some visual affordance that looks like it should be interactive, but users are surprised to find out it does nothing. You can use the same process we used for the 404 visits to hunt down rageclicks as well. + -### 3. Alert if billing emails are not sent +### 3. Alert if important emails are not delivered Alerts can also be used to check for the _absence_ of something happening. For example, PostHog tracks the number of transactional billing emails that get sent out every day. If these emails aren't getting sent, it would be a big deal. +![Ignoring warnings](https://frinkiac.com/video/S08E23/XOUcScbq8W_7yoA6nti16cCC31A=.gif) + To do something similar, you can track events when you trigger transactional emails. Then, create an insight to track the number of emails sent every day. Then, we can set up an alert called "No billing events sent" that gets triggered when the transactional emails have a value less than 1. In other words, it will trigger the alert if no emails get sent. -We can set the frequency to check this daily. For critical alerts like this, you can add more than one email to the notification list and ensure the entire billing team receives the alert. - -### 4. Monitor deploys and new features - -With feature flags, you can set up [canary releases](/tutorials/canary-release) to safely roll out changes and make sure your new features work well before they're released to all your users. - -But you still want to monitor deploys and new features to verify that they're having the intended effect and not triggering unexpected errors. - -![Simpson, you've got a 513](https://frinkiac.com/meme/S08E23/385084.jpg?b64lines=U0lNUFNPTiwgWU9VJ1ZFIEdPVCBBIDUxMyE=) -![That got it](https://frinkiac.com/video/S08E23/XOUcScbq8W_7yoA6nti16cCC31A=.gif) - -For example, you could track error events and trigger an alert if the error rate rises above a particular threshold after a new feature launch. - -But there are more subtle issues that aren't necessarily bugs or errors. For example, you could launch a big redesign for the product pages on your marketing website. Or change the copy on some of your CTAs. Those won't necessarily trigger errors, but they could still have a drastic impact on engagement. + -So you can set up an alert that coincides with the launch of a redesigned page and verify that the number of CTA clicks should hopefully be increasing, not decreasing. +We can set the frequency to check this daily. And for critical alerts like this, you can add more than one email to the notification list and ensure the entire billing team receives the alert. -### 5. Alert on changes in conversion rates +### 4. Alert on changes in conversion rates -To set alerts on changes in your conversion rate, you can set up an insight that tracks visits to your pricing page and signups. For example, we can create a trend insight and filter for pageviews where "Path Name" equals "/pricing". And then add a filter for our `user_signed_up` event. So this insight will display a graph with a line for the number of pageviews for the pricing page as well as a separate line for the number of users that signed up. +To set alerts when your conversion rate changes, you can set up an insight that tracks signups on your pricing page. +For example, we can create a trend insight filtered for our pricing pageviews and our [`user_signed_up` event](/docs/getting-started/send-events#2-capture-custom-events), which is triggered whenever a user completes our signup flow and creates their account. +So this insight will display a graph with a line for the number of pageviews for the pricing page as well as a separate line for the number of users that signed up. -If we want to find out when the conversion rate increases or decreases by 10%, we can set up multiple alerts. We can set up one alert for when the `user_sign_up` event is increasing by 10% and a separate alert for when the `user_sign_up` event is decreasing by 10%. +If we want to find out when the conversion rate increases or decreases by 10%, we can set up multiple alerts. We can set up one alert for when the `user_sign_up` event increases by 10% and a separate alert for when the event decreases by 10%. -### 6. Alert on breakdown in referral sources +### 5. Alert on breakdown in referral sources We also have the ability to trigger alerts on trends with breakdowns. For example, you can track all the traffic to your website broken down by the referral source (e.g. google, substack, direct). @@ -162,6 +177,15 @@ Here's an example where we set up an alert when any of those breakdown values in > 📝 Note: For trends with a breakdown, the alert will fire if _any_ of the breakdown values breaches the threshold. +When there's a change in the breakdown of the referral sources, we'll get an email that looks like this: + + + ## Upcoming improvements and suggestions Alerts are currently available for trends insights. But we're currently working on adding alerts for [funnels](/docs/product-analytics/funnels), which will make it easier to track conversions across various stages. For example, we can create a funnel to see how many users are following through and signing up after visiting our pricing page. diff --git a/contents/docs/alerts/index.mdx b/contents/docs/alerts/index.mdx index f97daf5ab4c9..d5a050dd7fff 100644 --- a/contents/docs/alerts/index.mdx +++ b/contents/docs/alerts/index.mdx @@ -132,3 +132,6 @@ When you set an alert on a trend with a breakdown, the alert will be triggered w alt="alert on breakdown" classes="rounded" /> + +## Further reading +For more ideas on how to get started with Alerts, check out our [alerts examples](/blog/alerts-examples). From f5064e6302f59fc3a7e7a8fc1eef15714373433a Mon Sep 17 00:00:00 2001 From: Bijan Date: Tue, 7 Jan 2025 23:36:31 -0500 Subject: [PATCH 21/29] Simplify 404 section, address feedback --- contents/blog/alerts-examples.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contents/blog/alerts-examples.mdx b/contents/blog/alerts-examples.mdx index ccfdc3d135eb..64ab27ca4887 100644 --- a/contents/blog/alerts-examples.mdx +++ b/contents/blog/alerts-examples.mdx @@ -18,7 +18,7 @@ An alternative, more effective approach is to use [PostHog alerts](/docs/alerts) Alerts will send you an email notification when an insight crosses a threshold that you specify, such as an absolute value (e.g. pageviews exceeded 1,000), or a relative amount (e.g. conversion rate increased by 10%). -To show you how you can use alerts, we'll start by creating an alert and then dive into practical examples and use cases. +We'll start with how to set up a new alert. And then we'll share some ideas for how you can use alerts, so you're never caught out again. ## How to create alerts @@ -99,7 +99,7 @@ You can also use alerts to track down errors. For example, you can track the num But what about anomalous spikes in 404s? It might mean you accidentally deployed a broken link. Or a page has been moved and you need to set up a redirect to prevent users from missing it. -In this case, you can set up another trend insight to graph the number of pageviews for your 404 page. You can examine the graph to establish a baseline for a standard amount of traffic to the 404 page. You can click the graph where you see a spike and it will display a list of all the users effected. If you have [session replay](/session-replay) enabled, you can even watch the session where the 404 occurred and figure out exactly which link is broken. +In this case, you can set up another trend insight to graph the number of pageviews for your 404 page. You can examine the graph to establish a baseline for a standard amount of traffic to the 404 page. Date: Wed, 8 Jan 2025 16:17:43 -0500 Subject: [PATCH 22/29] Update contents/blog/alerts-examples.mdx Co-authored-by: Ian Vanagas <34755028+ivanagas@users.noreply.github.com> --- contents/blog/alerts-examples.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contents/blog/alerts-examples.mdx b/contents/blog/alerts-examples.mdx index 64ab27ca4887..94d844a1f254 100644 --- a/contents/blog/alerts-examples.mdx +++ b/contents/blog/alerts-examples.mdx @@ -18,7 +18,7 @@ An alternative, more effective approach is to use [PostHog alerts](/docs/alerts) Alerts will send you an email notification when an insight crosses a threshold that you specify, such as an absolute value (e.g. pageviews exceeded 1,000), or a relative amount (e.g. conversion rate increased by 10%). -We'll start with how to set up a new alert. And then we'll share some ideas for how you can use alerts, so you're never caught out again. +We'll start with how to set up a new alert and then we'll share some ideas for how you can use alerts, so you're never caught out again. ## How to create alerts From f3670d7d64bbd02c46054b5bfbd92741a961d11f Mon Sep 17 00:00:00 2001 From: Bijan Boustani Date: Wed, 8 Jan 2025 16:20:41 -0500 Subject: [PATCH 23/29] Update contents/blog/alerts-examples.mdx Co-authored-by: Ian Vanagas <34755028+ivanagas@users.noreply.github.com> --- contents/blog/alerts-examples.mdx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/contents/blog/alerts-examples.mdx b/contents/blog/alerts-examples.mdx index 94d844a1f254..be3929ac299d 100644 --- a/contents/blog/alerts-examples.mdx +++ b/contents/blog/alerts-examples.mdx @@ -69,9 +69,7 @@ Now that we can create alerts, let's take a look at a handful of practical examp ### 1. Get alerts when traffic spikes -Want to investigate spikes in traffic to your website? Monitoring the traffic to your website can help you measure the success of marketing campaigns and understand which activities drive the most visitors to your site. - -These kinds of alerts can also be useful when traffic spikes are unexpected. We often see this at PostHog when our content gets featured in a popular email newsletter or shared on Hacker News. When we notice an influx of new signups, it can be fun to dig in and try to figure out where they came from. +Traffic spike alerts are useful when this happens unexpectedly. We often see this at PostHog when our content gets featured in a popular email newsletter or shared on Hacker News. When we notice an influx of new signups, it can be fun to dig in and try to figure out where they came from. For example, we can set up an alert when the number of pageviews for our [pricing page](/pricing) rises above 8,000 views for the week. First, we [create a new trend](/docs/product-analytics/trends/overview#1-creating-a-new-trend) insight to track pageviews where "Path Name" equals "/pricing". To get a good baseline for comparison, we'll filter the data to show the year-to-date and group it by week to see weekly patterns in our pricing page traffic. From 37bf35d2bc6159acf0d613d5b6ffba9954ded5a6 Mon Sep 17 00:00:00 2001 From: Bijan Boustani Date: Wed, 8 Jan 2025 16:21:07 -0500 Subject: [PATCH 24/29] Update contents/blog/alerts-examples.mdx Co-authored-by: Ian Vanagas <34755028+ivanagas@users.noreply.github.com> --- contents/blog/alerts-examples.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contents/blog/alerts-examples.mdx b/contents/blog/alerts-examples.mdx index be3929ac299d..b013c54eb1b6 100644 --- a/contents/blog/alerts-examples.mdx +++ b/contents/blog/alerts-examples.mdx @@ -139,7 +139,9 @@ We can set the frequency to check this daily. And for critical alerts like this, ### 4. Alert on changes in conversion rates To set alerts when your conversion rate changes, you can set up an insight that tracks signups on your pricing page. + For example, we can create a trend insight filtered for our pricing pageviews and our [`user_signed_up` event](/docs/getting-started/send-events#2-capture-custom-events), which is triggered whenever a user completes our signup flow and creates their account. + So this insight will display a graph with a line for the number of pageviews for the pricing page as well as a separate line for the number of users that signed up. Date: Wed, 8 Jan 2025 16:21:25 -0500 Subject: [PATCH 25/29] Update contents/blog/alerts-examples.mdx Co-authored-by: Ian Vanagas <34755028+ivanagas@users.noreply.github.com> --- contents/blog/alerts-examples.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contents/blog/alerts-examples.mdx b/contents/blog/alerts-examples.mdx index b013c54eb1b6..8b2b20ccc934 100644 --- a/contents/blog/alerts-examples.mdx +++ b/contents/blog/alerts-examples.mdx @@ -175,7 +175,7 @@ Here's an example where we set up an alert when any of those breakdown values in classes="rounded" /> -> 📝 Note: For trends with a breakdown, the alert will fire if _any_ of the breakdown values breaches the threshold. +> 📝 **Note:** For trends with a breakdown, the alert will fire if _any_ of the breakdown values breaches the threshold. When there's a change in the breakdown of the referral sources, we'll get an email that looks like this: From 00c1ab6f0d45c68b8527ac2dd1bf4018cd8594ad Mon Sep 17 00:00:00 2001 From: Bijan Date: Thu, 9 Jan 2025 13:26:15 -0500 Subject: [PATCH 26/29] Add backlink in product analytics tutorials --- contents/docs/product-analytics/tutorials.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/contents/docs/product-analytics/tutorials.mdx b/contents/docs/product-analytics/tutorials.mdx index 980863f8faeb..f11b2b934fbf 100644 --- a/contents/docs/product-analytics/tutorials.mdx +++ b/contents/docs/product-analytics/tutorials.mdx @@ -89,3 +89,4 @@ Learn more about analytics best practices from our blogs below: - [Product metrics to track for LLM apps](/product-engineers/llm-product-metrics) - [25 mobile app metrics and KPIs you should track](/blog/mobile-app-metrics-kpis) - [How we found our activation metric (and how you can too)](/product-engineers/activation-metrics) +- [Use alerts to avoid missing changes to key metrics](/blog/alerts-examples) From 50051b110cdd3e839de9d2f93ca09e08a21d56cb Mon Sep 17 00:00:00 2001 From: Bijan Date: Thu, 9 Jan 2025 13:35:26 -0500 Subject: [PATCH 27/29] Replace markdown links with ProductScreenshot --- contents/blog/alerts-examples.mdx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/contents/blog/alerts-examples.mdx b/contents/blog/alerts-examples.mdx index 8b2b20ccc934..0a1070e2ed2a 100644 --- a/contents/blog/alerts-examples.mdx +++ b/contents/blog/alerts-examples.mdx @@ -1,6 +1,6 @@ --- title: 'Never miss changes to your key metrics: 5 alerts you can use' -date: 2025-01-07 +date: 2025-01-09 author: - bijan-boustani rootpage: /blog @@ -12,7 +12,12 @@ tags: To keep life interesting, it's important to live in a state of perpetual ignorance. When things are going well, there's no need to find out why. When things go downhill, let anxiety run its course. After all, who needs data and insights when you have hope? -![Driving blind](https://res.cloudinary.com/dmukukwp6/image/upload/319051_c8e072f85e.gif) + An alternative, more effective approach is to use [PostHog alerts](/docs/alerts) to get notified when important metrics change. @@ -121,7 +126,12 @@ Alerts can also be used to check for the _absence_ of something happening. For example, PostHog tracks the number of transactional billing emails that get sent out every day. If these emails aren't getting sent, it would be a big deal. -![Ignoring warnings](https://frinkiac.com/video/S08E23/XOUcScbq8W_7yoA6nti16cCC31A=.gif) + To do something similar, you can track events when you trigger transactional emails. Then, create an insight to track the number of emails sent every day. From f58eddf5c4c0677c462506578f5b91267a518329 Mon Sep 17 00:00:00 2001 From: Bijan Date: Thu, 9 Jan 2025 16:03:56 -0500 Subject: [PATCH 28/29] Rewrite conversion rate section --- contents/blog/alerts-examples.mdx | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/contents/blog/alerts-examples.mdx b/contents/blog/alerts-examples.mdx index 0a1070e2ed2a..d6ab80872e08 100644 --- a/contents/blog/alerts-examples.mdx +++ b/contents/blog/alerts-examples.mdx @@ -148,24 +148,33 @@ We can set the frequency to check this daily. And for critical alerts like this, ### 4. Alert on changes in conversion rates -To set alerts when your conversion rate changes, you can set up an insight that tracks signups on your pricing page. +To set alerts when our conversion rate changes, we can set up an insight that tracks pricing page to signup conversion. -For example, we can create a trend insight filtered for our pricing pageviews and our [`user_signed_up` event](/docs/getting-started/send-events#2-capture-custom-events), which is triggered whenever a user completes our signup flow and creates their account. +For example, we can create a trend insight filtered by unique pricing pageviews and a [`user_signed_up` event](/docs/getting-started/send-events#2-capture-custom-events), which is triggered whenever a user completes our signup flow and creates their account. -So this insight will display a graph with a line for the number of pageviews for the pricing page as well as a separate line for the number of users that signed up. +In this example, we enable [formula mode](/docs/product-analytics/trends/formulas) and divide the number of signups by the number of unique visitors that visit the pricing page, which gives us a conversion rate to work with. -If we want to find out when the conversion rate increases or decreases by 10%, we can set up multiple alerts. We can set up one alert for when the `user_sign_up` event increases by 10% and a separate alert for when the event decreases by 10%. +To find out when the conversion rate increases or decreases by 10%, we can set up multiple alerts based on the formula above. + +We can set up one alert for when the `user_sign_up` event increases by 10% and a separate alert for when the event decreases by 10%. + + From 024ab9e27868773662102093a0e62d1b568f4d9a Mon Sep 17 00:00:00 2001 From: Bijan Date: Thu, 9 Jan 2025 21:16:28 -0500 Subject: [PATCH 29/29] Finishing touches and fix screenshots --- contents/blog/alerts-examples.mdx | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/contents/blog/alerts-examples.mdx b/contents/blog/alerts-examples.mdx index d6ab80872e08..9e9a572043f8 100644 --- a/contents/blog/alerts-examples.mdx +++ b/contents/blog/alerts-examples.mdx @@ -1,5 +1,5 @@ --- -title: 'Never miss changes to your key metrics: 5 alerts you can use' +title: 5 alerts so you never miss changes to your key metrics date: 2025-01-09 author: - bijan-boustani @@ -12,12 +12,7 @@ tags: To keep life interesting, it's important to live in a state of perpetual ignorance. When things are going well, there's no need to find out why. When things go downhill, let anxiety run its course. After all, who needs data and insights when you have hope? - +![Driving blind](https://res.cloudinary.com/dmukukwp6/image/upload/319051_c8e072f85e.gif) An alternative, more effective approach is to use [PostHog alerts](/docs/alerts) to get notified when important metrics change. @@ -126,12 +121,7 @@ Alerts can also be used to check for the _absence_ of something happening. For example, PostHog tracks the number of transactional billing emails that get sent out every day. If these emails aren't getting sent, it would be a big deal. - +![Ignoring warnings](https://frinkiac.com/video/S08E23/XOUcScbq8W_7yoA6nti16cCC31A=.gif) To do something similar, you can track events when you trigger transactional emails. Then, create an insight to track the number of emails sent every day. @@ -152,7 +142,7 @@ To set alerts when our conversion rate changes, we can set up an insight that tr For example, we can create a trend insight filtered by unique pricing pageviews and a [`user_signed_up` event](/docs/getting-started/send-events#2-capture-custom-events), which is triggered whenever a user completes our signup flow and creates their account. -In this example, we enable [formula mode](/docs/product-analytics/trends/formulas) and divide the number of signups by the number of unique visitors that visit the pricing page, which gives us a conversion rate to work with. +In this example, we enable [formula mode](/docs/product-analytics/trends/formulas) and divide the number of signups by the total number of unique visitors that visit the pricing page, which gives us a conversion rate to work with.