Product card
The product_card is the sales card inside the post body: image, brand, name, price and a button to the store. It is part of the block document and is rendered by canverly-web-public.
This page comes from the code running in the test environment (.net): canverly-web-public 3fd9896, canverly-authoring 868a24d, canverly-api f7b18b6.
The block
Section titled “The block”{ "id": "pc1", "type": "product_card", "attrs": { "product_id": "01J9Z3K8M2XQ4R7T5V6W8Y0A1B" }}The block stores only the product id. The name, price, image and link come from the site’s product registry at render time. Changing the price in the registry changes every article that references that product.
Field (attrs) |
Type | Required | Notes |
|---|---|---|---|
product_id |
string | yes, in the current format | Product id, a ULID (26 characters) or UUID. It is the id of the post of type produto on the same site. An id from another site, deleted or malformed does not resolve. |
product_title |
string | no | Only the dashboard editor uses it, to show the name. The renderer ignores it. |
The block id (pc1) is the id common to every block, not the product’s.
Standalone format (legacy)
Section titled “Standalone format (legacy)”The roughly 50 articles published before the product registry existed store the whole card in the block, without product_id. It still renders, but it does not update itself and the link is not counted:
{ "id": "pc2", "type": "product_card", "attrs": { "title": "Fone Modelo A", "image": "https://cdn.exemplo.com/fone-a.jpg", "price": "299,90", "currency": "BRL", "url": "https://loja.exemplo.com/fone-a", "cta": "Ver na loja", "vendor": "Marca A" }}Field (attrs) |
Type | Notes |
|---|---|---|
title |
string | Required for the card to appear. |
url |
string | Required for the card to appear. Not validated in any layer: the site puts it straight into the href. Send only https://. |
image |
string | Image URL. An external URL is imported to the CDN on save. |
price |
number or string | 299.9, "299,90" or "299.90". Unreadable or empty: the card comes out without the price line. |
currency |
string | Default BRL. |
cta |
string | Button text. Default Ver na loja. |
vendor |
string | Brand, above the name. |
A product_id that also carries these fields uses the product and falls back to the block fields only when the registry does not have the value. Always prefer the product_id: the standalone format has no promotion, summary, image test or click count.
The product registry
Section titled “The product registry”The product is a post of type produto, created in the dashboard (the site’s Products tab). The fields:
| Field | Type | Required | Values |
|---|---|---|---|
| post title | text | yes | Becomes the card name. |
preco |
number | yes | Finite number. |
url_compra |
URL | yes | Absolute http or https, with no user and password and no space. For affiliates, it is the affiliate link itself. |
preco_promocional |
number | no | Empty = no promotion. |
moeda |
select | no | BRL (default), USD, EUR. |
imagem |
image | no | Main image. |
imagens_ab |
gallery | no | Variants for the image test (see below). |
marca |
text | no | Shown above the name. |
sku |
text | no | Does not appear on the card. |
disponibilidade |
select | no | em_estoque (default), esgotado, pre_venda. |
cta |
text | no | Button text. Default Ver na loja. |
resumo |
long text | no | Line under the name. |
descricao_interna |
long text | no | Internal use; does not appear. |
What the card shows
Section titled “What the card shows”<aside class="cv-product-card" aria-label="Produto recomendado: Fone Modelo A"> <!-- imagem 112x112, marca, nome (o link), resumo, preço, botão --></aside>- Name and link: the product name is the card’s only link, and the link covers the whole card (the entire card is clickable, without three identical links for the screen reader). The “Ver na loja” button is just visual text inside the same link.
- Price: formatted as
R$ 1.234,56in reais; in another currency, the code before the value (USD 10,00). Without a price (product linked with an unreadablepreco), the card appears without the price line. - Promotion: if
preco_promocionalis lower thanpreco, the full price appears struck through and the promotional one highlighted. A promotion without a full price, or higher than it, is not shown. The standalone format has no promotion. - Sold out: with
disponibilidade: "esgotado", the button gives way to the text “Esgotado”, and the link stays active.pre_vendais accepted in the registry but does not change the card. - Image:
<img>of 112 by 112 pixels, emptyalt(decorative: the product name is already in the link), lazy loading, box with reserved aspect ratio (no layout shift). The image comes from the registry (imagem; without it, the first valid one fromimagens_ab). Without an image, the card appears without it. - Rating/review: the block has no rating, stars or review field, on the site or in the registry. There is no
aggregateRating. - Button text: the product’s
cta; default “Ver na loja”.
Link, rel and affiliate
Section titled “Link, rel and affiliate”The card link always comes out with:
<a href="/go/p/01J9Z3K8M2XQ4R7T5V6W8Y0A1B?de=<id-do-artigo>" rel="noopener sponsored nofollow" target="_blank">rel="noopener sponsored nofollow"is fixed: it declares the commercial relationship and stops the crawler from following. It is not configurable throughattrs.- In a card linked to the registry, the
hrefpoints to the counted exit route/go/p/<product>?de=<article>, which records the click and answers302to the store. The destination always comes from the registry (url_compra), never from the URL: it is not an open redirect. In a standalone card, thehrefis theattrs.urldirectly, without counting. - There is no “affiliate id” field, UTM or automatic parameter. The affiliate link is the
url_compraitself that the owner writes. - The card does not replace the advertising notice: flag the commercial content in the article text, as the writing kit asks.
Click and impression tracking
Section titled “Click and impression tracking”For cards linked to the registry (with a valid product_id):
| Event | When | How |
|---|---|---|
| click | the reader opens /go/p/<product> |
The site records the click and answers 302. Each opening generates a record (no deduplication). |
| impression | the card is at least 50% visible, once per card per visit | The browser sends a signal to /go/imp, which always answers 204. |
The click carries the site, the product, the source article (?de=, only if it is a valid id), the destination domain, the type (clique or impressao) and the image variant (0 to 9). Visits from the site’s team are not counted; bots are recorded and flagged, and the human counters exclude them. The limit is 20 clicks and 60 impressions per minute per visitor; above that the record is discarded and the reader continues normally to the store. If recording fails, the redirect happens anyway.
The numbers are in the dashboard’s Metrics screen (clicks per product, per article, per day, and impressions against clicks per image variant).
Image test (A/B)
Section titled “Image test (A/B)”With two or more images (imagem plus imagens_ab with http(s) URLs, up to 10 variants), the browser draws one variant per visitor (kept in the session), swaps the image inside the same box and notes the variant (v=) in the link and in the impression. Without JavaScript, the card always shows the first image.
When the card does not show
Section titled “When the card does not show”The whole <aside> is omitted, without error, when:
- the name or the store link is missing (product without
url_compra, or standalone card withouttitleorurl); - the
product_iddoes not resolve: deleted product, from another site, malformed id, or the registry was down at the time (and there are no standalone fields to fall back on); - the block was created by the editor with
product_id: nulland has not yet picked a product.
What the API, SEO and JSON-LD do with it
Section titled “What the API, SEO and JSON-LD do with it”content_html:GET /v1/posts/{reference}omits theproduct_card(andad,related_postsandstory_page). A card with an outdated price would be worse than no card, and the price is fetched live.- Read from the source before rewriting. If you convert the
content_htmlback in aPATCH, the card is erased. UseGET /v1/posts/{reference}/source, which returns the blocks as stored, and preserve theproduct_cardwhen resending theblocks_json. - Sanitization: the API neither sanitizes nor validates any
attrsof theproduct_cardon write. Authoring only imports to the CDN the external image inattrs.image(standalone format); a permanently rejected image refuses the save (422 IMAGEM_EXTERNA_INVALIDA, fieldblocks.product_card). - SEO score: the
product_carddoes not count words, links or media. It is a “rich” block: a heading directly followed by it loses points inrico_apos_heading. Put a paragraph between the heading and the card.canverly-seohas no rule about product, affiliate orsponsored. - Authoring external links: the card link does not enter the site’s external links registry.
- JSON-LD: the site does not emit
Product,OfferoraggregateRatingfor the card. What it does not have (rating, reviews) is not invented. - Writing validator: the kit’s converter (Markdown to blocks) never emits
product_card; it only enters the article throughblocks_jsonor the editor.
Divergences between the renderer and writes
Section titled “Divergences between the renderer and writes”| Case | What happens |
|---|---|
Card without title and url (or product without url_compra) |
Saved without error; does not render. |
attrs.url of the standalone format |
Not validated by authoring or the API; the site uses it directly in the href. |
disponibilidade: "pre_venda" |
Accepted in the registry; the card only reacts to esgotado. |
product_title |
Written by the editor; the renderer ignores it. |
product_id from another site |
Accepted on write; the card stays hidden on the site. |
rel |
Always noopener sponsored nofollow on the site; authoring does not annotate the link. |
Original produto template |
Declared a Product/Offer schema that the site does not read. |
A post with a product card
Section titled “A post with a product card”The complete body, with a callout and a table, is in A complete body.