hubspot-cta — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited hubspot-cta (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
You are an expert at implementing CTA (call-to-action) buttons across HubSpot email templates and landing page templates. This skill documents the [Company] CTA approach, tracking behavior, and brand-compliant button patterns for both email and web contexts.
This skill works alongside:
Always read these first:
/brain/brand-guide/brand-guide.md — colors, typography, button styleshubspot-email or hubspot-landing-page) for context-specific constraintsIMPORTANT: Email and landing page templates use different CTA approaches. The {% cta %} HubL tag only works on web/landing pages — it does NOT work in marketing emails (confirmed by HubSpot support; causes "There was a problem loading this content" error in the email editor).
@hubspot/email_cta ModuleEmail templates use the native email_cta module. Place it bare in the template — do NOT wrap it in a <div> (wrapping hides the module in the editor).
{% module "cta" path="@hubspot/email_cta", label="CTA Button" %}Centering: Target the module's auto-generated wrapper ID in the non-inlined style block (the one WITHOUT id="hs-inline-css"). Do NOT use the hs-inline-css block — those styles get inlined before the wrapper exists.
<style type="text/css">
#hs_cos_wrapper_cta { text-align: center; padding: 16px 24px 0 24px; }
#hs_cos_wrapper_cta table { margin: 0 auto; }
</style>Brand colors: Marketer sets #6A2AFF bg, #F9F9F9 text, 12px radius in the CTA editor's Styles tab. Purple is the approved default for email CTAs because teal #50F6E8 renders inconsistently across email clients. Both teal and purple are approved primary button colors per brain/brand-guide/brand-guide.md; use teal on landing page CTAs when no other teal elements compete for attention, purple in email and in dense layouts.
What does NOT work for email CTAs:
<a> + {% text %}~~ — HubSpot Remix editor auto-converts to a broken module{% cta %} tag~~ — page-only, causes "There was a problem loading this content"{% module %} in a <div>~~ — hides the module entirely in the editorhs-inline-css targeting #hs_cos_wrapper_cta~~ — styles inlined before wrapper exists{% cta %}Landing page templates use `{% cta %}` HubL tags that reference Embedded HTML CTAs created in HubSpot. The Embedded HTML type gives full design control via custom CSS while plugging into HubSpot's CTA tracking pipeline (views, clicks, conversions).
{% cta "main_cta" label="CTA Button" %}Blog posts use a self-contained HTML card with a HubSpot-tracked button inside. The card HTML lives at marketing/templates/blog-cta-request-a-demo.html and is pasted into Sanity's Custom HTML Embed field.
How it works:
209805481528, "Request a Demo - for custom CTA block") with click tracking.hs-inline-web-interactive-209805481528 to prevent CSS bleed into the blog pageIMPORTANT: The HubSpot embed code's default `<style>` uses bare `a` selectors that will restyle every link on the page. The template file already fixes this by scoping to the CTA class. If updating the embed code, always scope the styles.
Usage: Copy marketing/templates/blog-cta-request-a-demo.html contents into Sanity's Custom HTML Embed field. No modifications needed per-post (the HubSpot tracking link is the same CTA across all posts).
| Approach | Works In | Design Control | CTA Dashboard | Tradeoff |
|---|---|---|---|---|
| `@hubspot/email_cta` module (recommended for email) | Emails | Marketer sets in Styles tab | Yes — views, clicks, conversions | Brand colors set manually per-email |
| Embedded HTML CTA + `{% cta %}` | Landing pages only | Full — brand CSS on each CTA | Yes — views, clicks, conversions | Create one CTA per unique URL |
| Embedded CTA in card wrapper | Blog (Sanity CMS) | Full — inline styles + HubSpot button | Yes — views, clicks | Same CTA across posts; card HTML pasted per-post |
~~Styled <a> + {% text %}~~ | ~~Emails~~ | ~~Full inline CSS~~ | ~~Per-email only~~ | Breaks in Remix editor |
~~{% cta %} in emails~~ | ~~Emails~~ | ~~N/A~~ | ~~N/A~~ | Does not work — page-only tag |
For each new campaign (webinar, event, announcement):
Paste this into the CTA's Advanced > Custom CSS when creating CTAs for email use:
a {
display: inline-block;
padding: 14px 36px;
background-color: #6A2AFF;
font-family: 'Inter', Arial, Helvetica, sans-serif;
font-size: 17px;
font-weight: 500;
color: #F9F9F9 !important;
text-decoration: none;
border-radius: 12px;
line-height: 1.2;
}
a:hover {
background-color: #8B55FF;
}No transitions (email clients don't support them). System font fallback included.
Paste this into the CTA's Advanced > Custom CSS when creating CTAs for landing page use:
a {
display: inline-block;
padding: 12px 32px;
background-color: #6A2AFF;
font-family: 'Inter', Arial, Helvetica, sans-serif;
font-size: 18px;
font-weight: 500;
color: #F9F9F9 !important;
text-decoration: none;
border-radius: 12px;
line-height: 150%;
transition: background-color 0.3s;
}
a:hover {
background-color: #8B55FF;
}Custom CSS on CTAs is available through the legacy CTA tool. Accounts created after March 17, 2025 do not have access to the legacy tool. The new CTA tool has a visual style editor (colors, fonts, spacing) but no raw CSS input. If using the new tool, set:
#6A2AFF#F9F9F9`{% cta %}` does not work in email templates — it's a page-only HubL tag. Use the @hubspot/email_cta module:
{% module "cta" path="@hubspot/email_cta", label="CTA Button" %}Do NOT wrap in a `<div>` — it hides the module in the editor. Center via non-inlined CSS:
<!-- In the non-inlined <style> block (no id="hs-inline-css") -->
<style type="text/css">
#hs_cos_wrapper_cta { text-align: center; padding: 16px 24px 0 24px; }
#hs_cos_wrapper_cta table { margin: 0 auto; }
</style>The marketer selects a CTA from the sidebar and sets brand colors in the Styles tab.
<!-- Tracked CTA — marketer picks from sidebar -->
<div style="text-align: center; padding: 36px 0;">
{% cta "main_cta" label="CTA Button" %}
</div>For bottom-of-page CTAs that scroll to a form section, use a styled <a> tag with the .btn-primary class. These don't need CTA tracking — the conversion is the form submission:
<a href="#registration_form" class="btn-primary">Register for the Webinar</a>For non-tracked buttons (anchor links, in-page navigation), use the .btn-primary and .btn-secondary classes from the base landing page template:
.btn-primary {
display: inline-block;
padding: 12px 32px;
background-color: var(--od-purple-dark); /* #6A2AFF */
color: var(--od-white); /* #F9F9F9 */
font-family: var(--od-font); /* 'Inter', sans-serif */
font-size: 18px;
font-weight: 500;
line-height: 150%;
border: none;
border-radius: 12px;
text-decoration: none;
cursor: pointer;
transition: background-color 0.3s;
}
.btn-primary:hover { background-color: var(--od-purple); /* #8B55FF */ }
.btn-secondary {
display: inline-block;
padding: 12px 32px;
background-color: var(--od-black); /* #0F0F0F */
color: var(--od-white); /* #F9F9F9 */
font-family: var(--od-font);
font-size: 18px;
font-weight: 500;
line-height: 150%;
border: 1px solid var(--od-white);
border-radius: 12px;
text-decoration: none;
cursor: pointer;
transition: all 0.3s;
}
.btn-secondary:hover { background-color: var(--od-grey-darkest); /* #2A2A2A */ }For drag-and-drop landing page templates, build a custom module in Design Manager so the CTA button appears as a draggable component with a built-in CTA picker.
A custom module in HubSpot Design Manager consists of:
| Field | Type | Label | Default |
|---|---|---|---|
cta_button | CTA | CTA Button | (none — marketer picks from CTA library) |
alignment | Choice (dropdown) | Button Alignment | center (options: left, center, right) |
The CTA field type embeds a CTA picker directly in the module, so the marketer selects from existing HubSpot CTAs — getting full tracking.
<div style="text-align: {{ module.alignment }};">
{% cta "cta_button" %}
</div>[Company] CTA ButtonNote: This module is for web/landing pages only. Email templates use {% module "cta" path="@hubspot/email_cta" %} (see above).
When using {% cta %} with a HubSpot CTA object, you get:
In addition to CTA dashboard tracking, HubSpot automatically tracks every link click in marketing emails. This provides per-email click metrics (total clicks, unique clicks, click rate) in the email performance dashboard.
On landing pages with the HubSpot tracking code:
HubSpot's CTA tool (Marketing > CTAs) offers these types:
| Type | Behavior | Use Case |
|---|---|---|
| Embedded (button) | Inline button element on page | CTA buttons in content — this is what we use |
| Embedded (image) | Inline image CTA | Banner-style CTAs |
| Pop-up Box | Modal triggered by scroll %, time, exit intent, or inactivity | Lead capture overlays |
| Sticky Banner | Fixed bar at top or bottom of page | Persistent promotions |
| Slide-in | Corner slide-in triggered by scroll %, time, exit intent, or inactivity | Non-intrusive lead capture |
Pop-up, sticky banner, and slide-in CTAs require the HubSpot tracking code installed on the page.
When building custom modules in Design Manager, these field types are available:
Alignment, Background Image, Blog, Boolean, Border, Choice, Color, CRM Object, CRM Object Property, CTA, Date, Date and Time, Email Address, Embed, File, Followup Email, Font, Form, Gradient, HubDB Row, HubDB Table, Icon, Image, Rich Text, Text, and more.
The CTA field type embeds a CTA picker in a custom module — the marketer selects from existing HubSpot CTAs for full tracking.
{% module "cta" path="@hubspot/email_cta" %} (NOT {% cta %} — page-only tag)<div> (wrapping hides it in the editor)#hs_cos_wrapper_cta { text-align: center; } + table { margin: 0 auto; }#6A2AFF bg, #F9F9F9 text, 12px radius (set in Styles tab){% cta %} for tracked CTA buttons.btn-primary / .btn-secondary class#8B55FF for primary, #2A2A2A for secondary)Use these tools to look up HubSpot documentation on CTA behavior, module fields, and tracking:
mcp__HubSpotDev__search-docs to find HubSpot developer documentation on CTA modules, CTA field types, tracking behavior, or the CTA API. Always search before guessing at module behavior or field options.mcp__HubSpotDev__fetch-doc immediately after searching to read the full documentation page.mcp__HubSpotDev__get-feature-config-schema when building custom CTA modules to verify available field types and configuration options.When to use: When uncertain about CTA module behavior, field types for custom modules, or tracking API details. Always verify against docs rather than guessing.
After building templates with CTA buttons, use agent-browser to validate:
agent-browser open <file-path> to open the email or landing page HTML file.agent-browser screenshot to capture how the button renders. Verify: purple #6A2AFF background, white #F9F9F9 text, 12px border-radius, correct padding.agent-browser hover on the CTA element, then screenshot to verify the hover color changes to #8B55FF.agent-browser set viewport 375 812 to mobile width and verify the CTA remains tappable (minimum 44px touch target) and properly sized.agent-browser snapshot -i to verify the CTA has proper link text (not just "Click here") and is keyboard-accessible.When to use: After building any template with CTA buttons. Validates that brand CSS is applied correctly and the button works at all viewport sizes.
Output co-locates with the parent email or landing page template.
Before producing work, check whether any of these skills apply to the task. If they do, load the skill before writing that portion. Do not replicate a skill's logic from memory — load it and apply it.
| When the task involves... | Skill to Load | Mandatory? |
|---|---|---|
| Building an email template that contains CTAs | hubspot-email | Yes — load for email-specific constraints (table layout, 600px, CAN-SPAM) |
| Building a landing page template that contains CTAs | hubspot-landing-page | Yes — load for landing page constraints (full CSS, dnd architecture) |
| CTA button copy (action verbs, urgency, clarity) | copywriting | Yes — load before writing CTA copy |
| Visual design decisions beyond what's in the brand guide | brand-design | Yes — load for custom visual asset work |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.