# Call to action

## A section with a clear message and a button that asks the visitor to act.

## Basics: what module-cta is

**module-cta** is a focused call-to-action section in CCMS with a heading, short text, a background image and one primary button.

Use it when you want to drive one clear conversion, such as contact, a booking, a quote request or a subscription.

The module is deliberately simple, so it can be fast, clear and easy to reuse across different pages.

## Option 1: core keys and content structure

The top level lives in `cta`, with keys such as `module_type`, `display`, `appearance`, `aria_label`, `title`, `text_html` and `is_small`.

The background is controlled via `background.have_background`, `background.background_src` and `background.background_overlay`. The card's image is controlled via `background_image.*`.

The primary action lives in `button`, with `display`, `text`, `href`, `target` and `aria_label`.

## Option 2: size variant and visual tone

`is_small` switches to a compact variant in CSS ( `.cta-wrap.is-small`) and changes the module's proportions.

`appearance` compiles to `cta.auto_class` and `cta.auto_style`, which lets the CTA have animation, hover effects and styling without a heavy runtime.

Global design values in `design.*` control, among other things, the button colour, overlay colour, text size and border radius.

## Option 3: background image, overlay and CTA button

`background_image.src` goes through the image manifest and can be rendered with an AVIF/JPG source set and a fallback image in the template.

The button is rendered directly from `cta.button.href`. Unlike hero and big-button, there is no separate auto-href resolver for the module-cta button.

So write complete, deliberate links directly in the content ( `#anchor`, `https://...`, `mailto:` or `tel:`).

## Option 4: runtime, tracking and link behaviour

The CTA button has the class `track-clicks` and goes through the general link tracker in the template script.

A click on an external `https://` link is counted without holding up the navigation. `mailto:` and `tel:` are tracked too, but on desktop, clicking a tel/mail link that has not been revealed scrolls the page to `module-contact` first.

This affects CTAs where the button points straight at a phone number or email address, and it is important to know when you implement one.

## Option 5: SEO, schema and AI optimisation

A CTA should have a clear action in the heading and button text, and a short reason in `text_html`. Avoid vague wording.

If the module has its own schema, choose the type based on the actual action (e.g. `SubscribeAction`, `ReserveAction` or `DownloadAction`) and reuse global nodes where they fit.

Keep the image's `alt` descriptive and consistent with the CTA's message for better accessibility and better AI summaries.
