Build an approval rate
Suppose your report contains 40 submitted leads in Event 1 and 12 approved leads in Event 2. The approval rate is12 / 40 × 100 = 30%.
- Open the report’s metrics selector.
- Find Custom metrics and click Add custom metric.
- Enter
approval_rateas Identifier. - Enter this Formula:
- Choose Percent and click Add metric.
- Display Event 1 and Event 2 alongside the new column.
- Check that the example row displays 30%.
ifnull displays zero when there are no submissions to divide by.
Use this formula only for campaigns where Event 1 means a submitted lead and Event 2 means an approved lead.
Choose the right display type
Custom Percent formatting does not multiply by 100. Include
* 100 when the formula divides one count by another. For example, event2 / event1 returns 0.3, which would display as 0.3%, not 30%.
For a custom formula using a built-in rate, multiply that rate by 100. For example, use cv * 100 to display CV as a percentage.
Use metric keys and supported arithmetic
Formulas use the case-sensitive keys from the metric dictionary, such asvisits, lpclicks, uniqueVisits, revenue, cost, and event2. A UI label such as Clicks is not the formula key lpclicks.
Use a clear identifier beginning with a letter or underscore and containing letters, numbers, or underscores. Choose a name that does not collide with an existing metric or a function. Adding the same custom identifier again replaces its definition.
Supported syntax includes numbers, parentheses, unary plus or minus, and the operators +, -, *, /, and %. Here % means remainder, not percentage formatting.
Supported functions are abs, ceil, floor, max, min, pow, round, sqrt, and ifnull. Use pow(x, 2) for a square and round(x) to round a number.