ctr-calculator
Installation
SKILL.md
CTR calculator
Use the CTR calculator to compare two scenarios and inspect the whole-count results for a target rate.
Confirm the measurement
Get clicks and impressions for the same platform, time, and scope. Confirm which clicks count and whether the denominator is impressions, delivered emails, or another specifically labeled metric. For a combined report, sum clicks and impressions before dividing.
Calculate the requested result
- Measured CTR. Divide clicks by positive impressions and multiply by 100. Flag clicks above impressions for investigation and check the platform definitions.
- Clicks at a target CTR. Multiply impressions by the rate as a fraction and round up for the minimum whole clicks to meet the target.
- Impressions at an assumed rate. Divide clicks by the positive rate as a fraction and round up to the next whole impression. If rounding changes the ratio, show the achieved CTR for the rounded counts.
- Return the numerator, denominator, rate, and any target assumption. Keep conversion and revenue comparisons separate.
Browser workflow
When the page exposes browser actions, use calculate_ctr and get_ctr to confirm the active calculation direction and read back the rate and whole counts.