CornerCue CornerCue Docs

Vanilla Script Tag

Button Data and Context

Pass feedback type, user details, metadata, and JSON config from trigger elements.

Framework Guides


Core button attributes

AttributeDescription
data-cc-btnRequired. Marks element as a feedback trigger.
data-cc-keyProject ID override for this button.
data-cc-typeSkip type menu and open direct form (bug, feature, feedback).
data-cc-user-*User context fields like id, username, email.
data-cc-meta-*Arbitrary metadata key-value fields.
data-cc-jsonJSON string for projectId, user, metadata in one place.
data-cc-floatFloat your own button.

Direct type (skip menu)

<button data-cc-btn data-cc-type="bug">Report Bug</button>
<button data-cc-btn data-cc-type="feature">Request Feature</button>
<button data-cc-btn data-cc-type="feedback">General Feedback</button>

Pass user info

Recognized user fields are id, username, and email.

<button
data-cc-btn
data-cc-user-id="user_123"
data-cc-user-email="john@example.com"
data-cc-user-username="johndoe"
>
Send Feedback
</button>

Unrecognized data-cc-user-* keys are moved into metadata with a user_ prefix.

Pass metadata

<button
data-cc-btn
data-cc-meta-plan="pro"
data-cc-meta-version="2.1.0"
data-cc-meta-company="Acme Corp"
>
Report Issue
</button>

JSON all-in-one

<button
data-cc-btn
data-cc-json='{
"projectId": "YOUR_PROJECT_ID",
"user": { "id": "user_456", "email": "jane@example.com" },
"metadata": { "plan": "enterprise", "team": "engineering" }
}'
>
Give Feedback
</button>

Individual attributes override values inside data-cc-json when both are provided.