---
updatedAt: 2025-01-29T10:32:41.000Z
agentTools:
  projectIndex: https://triplewhale.readme.io/llms.txt
---

# Conversion Rate (CR)

conversion_rate

# Overview

Conversion Rate (CR) represents the percentage of website sessions that result in a purchase, helping to measure the effectiveness of your site in converting visits into sales.

> 📘 CR = Website Purchases ÷ Sessions

The calculation is based on data in the [Website Analytics](https://triplewhale.readme.io/docs/web-analytics-table) table.

***

### Detailed Breakdown

The formula above is derived from the following components:

* **Website Purchases** = `SUM(orders_quantity)` --> [Website Analytics](https://triplewhale.readme.io/docs/web-analytics-table) table
  * `orders_quantity` = `COUNT(order_id)` --> [Sessions](https://triplewhale.readme.io/docs/sessions-table) table

* **Sessions** = `SUM(sessions)` --> [Website Analytics](https://triplewhale.readme.io/docs/web-analytics-table) table
  * `sessions` = `COUNT(session_id)` --> [Sessions](https://triplewhale.readme.io/docs/sessions-table) table

# Insights and Actions

Conversion Rate (CR) highlights your website's ability to turn visits into purchases, making it a key indicator of site performance and user engagement.

* **Improve User Experience**: A low CR may indicate issues with website design, navigation, or checkout processes. Address these areas to enhance the customer journey.
* **Enhance Product Pages**: Optimize product descriptions, images, and reviews to drive more sessions into purchases.
* **Pair with Traffic Metrics**: Use CR alongside metrics like Sessions to identify if traffic quality or volume is impacting conversions.

### Related Metrics

* **Sessions**: Tracks the total number of visits to your site, providing context for CR trends and identifying traffic patterns.
* **Website Purchases**: Helps you measure the absolute number of conversions, complementing CR for more granular insights.
* **Average Order Value (AOV)**: Provides insight into the value of purchases, helping evaluate the overall quality of conversions.

# Example Use

### Prompt

> What is my conversion rate for the past 7 days?

### Response

![](https://files.readme.io/66b826fe1351735d391ab846229cf20e5b8690d3ad018bed5f62ae5940548b3f-image.png)

### Query

```sql
SELECT
  COALESCE(
    SUM(wa.orders_quantity) / NULLIF(SUM(wa.sessions), 0),
    0
  ) AS conversion_rate
FROM
  web_analytics_table AS wa
WHERE
  wa.event_date BETWEEN CURRENT_DATE() - 7 AND CURRENT_DATE()  - 1;
```