Use funnels with New Relic Insights to evaluate a series of related events that are the steps toward a specified goal. A funnel allows you to create a NRQL query to ask, “Of the people that did (A), how many also did (B), and of the people that did (A) and (B), how many also completed (C)?”
For example, New Relic could use funnels to track the number of users who:
- Visited the Insights marketing page.
- And then, signed up for an Insights account.
- And then, created an Insights dashboard.
Funnel queries require the
funnel function, an attribute to funnel, and at least two steps:
- The first step is the anchor step, which will always represent 100% of the results.
- The second and later steps describe the number of users who advance along each step towards the goal. This number typically will be less than 100%. However, it could be 100% if every user who completes (A) also completes (B).
This is the structure of a simple NRQL funnel query:
SELECT funnel(attribute, Step A, Step B) FROM event type SINCE timeframe
|Order of steps||The order of steps completed is not enforced. In funnel query results, the second or third steps may have been completed by users before the first step.|
|Attributes||Funnel queries can be run on only a single attribute at a time.|
|Unique values||For funnel queries that inspect more than 256 unique values, the results are approximate, for performance optimization reasons.|
This example queries the New Relic Browser
PageView event and its attributes. It queries unique browser sessions that have gone from registering to upgrading their account. Labels are included for each step, indicated by the keyword
SELECT funnel(session, WHERE pageUrl='http://www.storefront.com/signup' AS 'Email Sign Up', WHERE pageUrl='http://www.appproduction.com/basic_feature' AS 'Feature Compare', WHERE pageUrl='http://www.appproduction.com/advanced_feature/upgrade' AS 'Upgraded Account') FROM PageView SINCE 12 hours ago
This query returns the following:
Include additional steps inside the parentheses of the funnel function in a comma separated list:
SELECT funnel(session, WHERE name='Controller/about/main' AS 'Step A', WHERE name = 'Controller/about/careers' AS 'Step B', WHERE name = 'Controller/about/insights' AS 'Step C', WHERE name = 'Controller/about/apply' AS 'Step D') FROM PageView SINCE 1 week ago