# Hermoso: hermoso_tag: The brand’s Hermoso · Hermoso developer docs

> Machine-readable twin of https://hermoso.ai/docs/reference/ads/hermoso_tag/. Generated from the shipped page. Do not edit by hand.
> Full agent guide: https://hermoso.ai/llms.txt · MCP: https://app.hermoso.ai/mcp

[Docs](https://hermoso.ai/docs/) / [Tool reference](https://hermoso.ai/docs/reference/) / [Ad campaign management](https://hermoso.ai/docs/reference/ads/) / hermoso_tag

# `hermoso_tag`

The brand’s Hermoso tag (website tracking snippet) destructive

Area: THE HERMOSO TAG · [Ad campaign management](https://hermoso.ai/docs/reference/ads/). Generated from the running MCP server, like the rest of the [tool reference](https://hermoso.ai/docs/reference/).

## Description

The brand’s HERMOSO TAG: ONE first-party snippet per brand for its website. It records page views, each visit’s UTM parameters and ad click ids (gclid, fbclid, ttclid, msclkid, li_fat_id, ScCid, rdt_cid, epik …), the referrer, and conversions the site reports (hermoso('track', 'Lead' | 'Purchase' | your own event, {value, currency, orderId, email …})), ties a visitor to a person when the site calls hermoso('identify', {email, phone}) (hashed before storage), and FORWARDS conversions server-side to every conversions destination the brand saved, each with one dedup eventId (a Purchase uses its orderId, so a browser pixel firing the same id is deduplicated). action get (default) returns the snippet, the install status (last event seen, from which hosts) and the settings; it MAKES the brand’s tag on first call. action update changes settings: consentDefault, waitForConsent, honorGpc, honorDnt, forward, forwardEvents, allowedDomains, spa, testMode ("validate" or a TikTok / Reddit test code sends conversions as a dry run; "off" ends it) and conversions (define the brand’s own events as conversions, each sent to the platforms as a standard event, e.g. {"quote_requested": {"as": "Lead"}}). action verify reads the site (url, default the brand’s website) for the snippet and reports the last event seen. autoTrack {forms, outbound, downloads, scroll} turns on automatic events (form submits as leads, outbound / phone / email clicks, file downloads, scroll depth); linkDomains lists the brand’s other sites so a visit carries on across them. action server_key makes a server key (shown once) for POST /htag/s, so a backend sends purchases with the same dedup ids; action stripe with signingSecret (whsec_…) turns a Stripe webhook into Purchases through the tag. The tag also runs from the brand’s own domain behind a proxy (forward /htag.js and /htag/e, pass X-Hermoso-Client-IP) so ad blockers do not drop it. CONSENT: the tag follows the consent the site gives it (hermoso('consent', …) or Google Consent Mode v2) and the brand’s defaults; THE WEBSITE OWNER IS RESPONSIBLE for the site’s consent banner and privacy notice. To put it on the site use install_hermoso_tag. Free.

## Parameters

Parameter Type Description

`action` `"get" | "update" | "verify" | "server_key" | "stripe"` default get; server_key makes a new server key (the old one stops working); stripe saves (signingSecret) or removes the Stripe webhook

`autoTrack` `boolean | object` update: automatic events, each off by default; true turns all on

`autoTrack.forms` `boolean`

`autoTrack.outbound` `boolean`

`autoTrack.downloads` `boolean`

`autoTrack.scroll` `boolean`

`linkDomains` `string[]` update: the brand’s other sites; links to them carry the visit across (cross-domain)

`signingSecret` `string` stripe: the endpoint’s signing secret (whsec_…); omit to remove the webhook

`consentDefault` `"granted" | "denied"` update: what applies before the site’s banner says anything

`waitForConsent` `boolean` update: true sends nothing until the site grants analytics_storage

`honorGpc` `boolean` update: a browser’s Global Privacy Control signal refuses ad use (default true)

`honorDnt` `boolean` update: a browser’s Do Not Track signal stops the tag (default false)

`forward` `boolean` update: false records conversions but sends them to no ad platform

`forwardEvents` `string[] | null` update: the events sent to ad platforms; null = every conversion plus the checkout steps

`allowedDomains` `string[]` update: only pages on these hosts (and subdomains) count; empty = any

`spa` `boolean` update: count a page view on each in-page navigation (default true)

`testMode` `string` update: "validate", a TikTok / Reddit test code, or "off"

`conversions` `object` update: the brand’s own events that count as conversions; null for one removes it

`replaceConversions` `boolean` update: true replaces the whole list instead of merging

`url` `string` verify: the page to read; default the brand’s website

`render` `boolean` verify: false skips the browser render

## Example call

Every required parameter is shown, filled from the schema where it gives a value and otherwise with a placeholder naming the type. Replace the placeholders with real values. The same call works on the MCP server, the CLI and `POST https://app.hermoso.ai/v1/tools/hermoso_tag`.

**MCP** (`tools/call`)

`{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"hermoso_tag","arguments":{}}}`
**CLI**

`hermoso call hermoso_tag --json '{}'`

## Credits

Credits are spent only on two things: running an AI model (image, video, voice, text, planning, post-production) and Ad Spy research. See [Credits & costs](https://hermoso.ai/docs/credits/).

## Related tools

- [install_hermoso_tag](https://hermoso.ai/docs/reference/ads/install_hermoso_tag/) Put the Hermoso tag on the website
- [hermoso_tag_report](https://hermoso.ai/docs/reference/ads/hermoso_tag_report/) Website visits, leads and revenue by source
- [hermoso_tag_events](https://hermoso.ai/docs/reference/ads/hermoso_tag_events/) Recent events from the Hermoso tag
- [hermoso_tag_audiences](https://hermoso.ai/docs/reference/ads/hermoso_tag_audiences/) Audiences from your website visitors
- [post_purchase_survey](https://hermoso.ai/docs/reference/ads/post_purchase_survey/) How-did-you-hear survey (after an order)
- [register_merchant_developer](https://hermoso.ai/docs/reference/ads/register_merchant_developer/) Register Hermoso with a Merchant Center account
- [list_merchant_accounts](https://hermoso.ai/docs/reference/ads/list_merchant_accounts/) List Merchant Center accounts
- [list_merchant_products](https://hermoso.ai/docs/reference/ads/list_merchant_products/) List Merchant Center products

[All 759 Ad campaign management tools](https://hermoso.ai/docs/reference/ads/) · [tools.json](https://hermoso.ai/docs/reference/tools.json)
