Skip to main content

How to Trigger Content from CTAs and Events

Launch Candu content when users click buttons, complete actions, or trigger events instead of showing it automatically.

Deborah Ramírez avatar
Written by Deborah Ramírez
Updated today

Need to show content when users click a button or complete an action, rather than automatically on page load? Here's how!

Before you get started

Most Candu content requires a placement to determine where and when it appears. For overlays and hotspots triggered by another Candu CTA (or used as ‘Change Content’), publish the triggered content without a placement. For tours, use the tour’s Start Settings to put it in trigger mode, then publish.

When to publish without a placement

You should publish content without a placement when it will be:

  • Triggered by Candu CTAs
    When one piece of Candu content launches another (for example, a button in a modal that starts a product tour), the triggered content doesn’t need its own placement. You’ll trigger it using Trigger Overlay, Trigger Tour, or Trigger Hotspots, depending on the content type.

  • Used in "Change Content" interactions
    Overlay content that swaps in when users interact with existing content doesn't need a separate placement, it inherits visibility rules from the parent content.

  • Triggered programmatically
    Modals, tours, and hotspots can be triggered when specific events occur in your app using Candu’s JavaScript API. Inline content can also be rendered programmatically. See our developer documentation for implementation details. Note: JavaScript-triggered tours can still be accessible after being unpublished, so remove trigger code when the campaign is over. See our developer documentation for implementation details.

URL parameters let you launch tours, modals, and hotspots automatically when users click a link. Learn more about Candu's built-in URL parameters.

How to Publish Without a Placement

  1. Click Publish in the Editor

  2. Select your target segments

    Note: Segmentation rules still apply. Only users matching your segments will see this content when triggered.

  3. When prompted to add a placement, click Publish without a placement

Publish screen showing “Where will your content go?” with a “Publish without a placement” link below the URL field.

Your content is now ready to be triggered.

How to Trigger Your Content

From a Candu CTA (opens new content):

  1. In your triggering content, select the call-to-action (button/link)

  2. In the Interactions panel, choose the right trigger action: Trigger Overlay, Trigger Tour, or Trigger Hotspots.

    Action on click/tap dropdown showing Trigger Overlay, Trigger Tour, and Trigger Hotspots.
  3. Select the published content you want to trigger from the dropdown.

From a "Change Content" interaction (swaps content):

  1. In your parent content, select the call-to-action (button/link)

  2. In the Interactions panel, add the "Change Content" action

  3. Select the published overlay, tour, or hotspot group you want to trigger from the dropdown

Action on click/tap set to Change Content with a “Content to display” dropdown.

Trigger from code (JavaScript API)

  1. Use this when the trigger is an in-app event (purchase completed, project created, etc.).

  2. Placements/URL targeting rules do not apply when you trigger programmatically; segmentation still does.

Heads up: JavaScript-triggered content can bypass publish state, so remove the trigger code when you’re done with the campaign.

window.Candu.triggerModal({ slug: 'your-modal-slug' })
window.Candu.triggerTour({ slug: 'your-tour-slug' })
window.Candu.triggerHotspotGroup({ slug: 'your-hotspots-slug' })

For more details, review our JavaScript API docs.

Troubleshooting

  • Can’t find the content in the dropdown: confirm it’s published (and for overlays/hotspots, published without a placement).

  • Triggered content doesn’t show: check segment targeting (segmentation still applies).

  • Triggering tours across pages: use URL parameters or programmatic triggers.

Did this answer your question?