Reference

Shortcode Reference

The [clickintent] shortcode renders a CTA button linked to a Section you've configured in the admin. It works in pages, posts, and any widget area that supports shortcodes.

Basic usage

Minimum required
[clickintent id="your-section-id"]

The id attribute must exactly match the Section ID shown in ClickIntent → Section CTAs. Section IDs are lowercase slugs (e.g., homepage-hero, pricing-cta).

Shortcode attributes

AttributeDescriptionDefault
id required The Section ID to render. Must match an existing Section in your dashboard.
ℹ️
Button text and styling come from the Section The button label, colors, and link destination are all configured in ClickIntent → Section CTAs, not in the shortcode itself. This means you can update the button without editing every page it appears on. You can also add a class to the button to add your custom styles outside of the plugin.

Finding your Section ID

Every Section you create is assigned an ID based on its name. To find it:

  1. Go to ClickIntent → Section CTAs in your WordPress admin.
  2. The Section ID is shown below each Section name in a monospace label.
  3. Copy it exactly, including any hyphens.
⚠️
Section IDs are case-sensitive slugs Always use lowercase. [clickintent id="Homepage-Hero"] will not match a section with ID homepage-hero. Copy the ID directly from the dashboard to avoid typos.

Placing the shortcode

In the Block Editor (Gutenberg)

Add a Shortcode block and paste the shortcode into it. The button renders on the frontend; in the editor you'll see the raw shortcode text.

In the Classic Editor

Paste the shortcode directly into the editor in Text or Visual mode.

In a Text Widget

Go to Appearance → Widgets, add a Text widget to your sidebar or footer, and paste the shortcode inside. Make sure Automatically add paragraphs is unchecked if you only want the button.

In a page builder (Elementor, Divi, etc.)

Use a Shortcode element or a Text/HTML element in your page builder. Paste [clickintent id="your-section-id"] and the button will render when the page loads.

How click tracking works

When a visitor clicks a ClickIntent button, the following happens automatically:

  1. A click event is recorded (section, page URL, approximate location).
  2. A lead capture modal opens (in case the button's action type is "modal form" and not "redirect"), prompting the visitor for their name, email, and phone.
  3. On form submission, a lead record is created and a conversion event is logged.
  4. If the button is configured as a link/redirect (rather than a form), the link click is tracked as a conversion.

All of this is handled automatically by ClickIntent's frontend script — you don't need to add any custom JavaScript.

Multiple buttons on one page

You can place as many [clickintent] shortcodes on a page as you like, using the same or different Section IDs. Each button tracks independently.

Example — two buttons, two sections
[clickintent id="hero-cta"]

[clickintent id="pricing-cta"]

What if the Section ID doesn't exist?

If the id you provide doesn't match any saved Section, the shortcode renders nothing — no error, no broken markup. Visitors won't see anything. Check your Section ID spelling if a button isn't appearing.


Next: Tracking External CTAs →

© 2026 ClickIntent (SmartSage Web Services)