From 81259a97f2b41a0f9c0e7cc52332147e1e580b4b Mon Sep 17 00:00:00 2001 From: Pulkit Agrawal Date: Mon, 1 Sep 2025 15:13:35 -0400 Subject: [PATCH 1/2] Update Tooltip API documentation with analytics data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add stats object schema with analytics fields (started_count, last_started_at, engagement_options) - Update JSON response example to include real analytics data - Enhance overview to mention analytics capabilities - Align documentation with API implementation changes Corresponds to tooltip analytics API enhancement in edit repo. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- docs/apis/tooltips.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/apis/tooltips.md b/docs/apis/tooltips.md index e1dadc1..5ef5a4e 100644 --- a/docs/apis/tooltips.md +++ b/docs/apis/tooltips.md @@ -17,7 +17,7 @@ With the Chameleon API for Tooltips, you can: - List all the Tooltips that follow a specified set of parameters. -- Retrieve a single Tooltip based on the `id`. +- Retrieve a single Tooltip based on the `id`, including analytics data such as view counts and engagement metrics. ## Schema :id=schema @@ -31,6 +31,10 @@ With the Chameleon API for Tooltips, you can: | `position` | number | The order that these appear in lists (starting from 0) | | `published_at` | timestamp | The time this was most recently published | | `tag_ids` | array<ID> | The Chameleon IDs of the [Tags](apis/tags.md) attached to this model | +| `stats` | object | Aggregated statistics for this Tooltip (all-time) | +| `stats.started_count` | number | Number of your end-users who saw this Tooltip | +| `stats.last_started_at` | timestamp | Most recent time any user saw this Tooltip | +| `stats.engagement_options` | object | Engagement scoring configuration and metrics | ## List Tooltips :id=tooltips-index @@ -147,9 +151,19 @@ GET https://api.chameleon.io/v3/edit/tooltips/:id "tooltip": { "id": "5f3c4232c712de665632a2a1", "name": "Admin Self-serve menu", - "style": "auto", "position": 0, "published_at": "2029-04-07T12:38:00Z", + "created_at": "2029-04-01T10:15:00Z", + "updated_at": "2029-04-07T12:38:00Z", + "tag_ids": [], + "stats": { + "started_count": 124, + "last_started_at": "2029-04-07T11:45:00Z", + "engagement_options": { + "score": 0.85, + "interactions": 124 + } + }, ... } } From 894392b6f73909912b95e67c8ed99bbf3967f450 Mon Sep 17 00:00:00 2001 From: Pulkit Agrawal Date: Fri, 5 Sep 2025 16:57:41 -0400 Subject: [PATCH 2/2] Remove engagement_options from Tooltip API documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove engagement_options from stats schema definition - Remove engagement_options from JSON response example - Align documentation with API implementation changes that removed this field Corresponds to API changes made in response to PR review feedback. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- docs/apis/tooltips.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/docs/apis/tooltips.md b/docs/apis/tooltips.md index 5ef5a4e..2f580fb 100644 --- a/docs/apis/tooltips.md +++ b/docs/apis/tooltips.md @@ -34,7 +34,6 @@ With the Chameleon API for Tooltips, you can: | `stats` | object | Aggregated statistics for this Tooltip (all-time) | | `stats.started_count` | number | Number of your end-users who saw this Tooltip | | `stats.last_started_at` | timestamp | Most recent time any user saw this Tooltip | -| `stats.engagement_options` | object | Engagement scoring configuration and metrics | ## List Tooltips :id=tooltips-index @@ -158,11 +157,7 @@ GET https://api.chameleon.io/v3/edit/tooltips/:id "tag_ids": [], "stats": { "started_count": 124, - "last_started_at": "2029-04-07T11:45:00Z", - "engagement_options": { - "score": 0.85, - "interactions": 124 - } + "last_started_at": "2029-04-07T11:45:00Z" }, ... }