Skip to main content

How to set up Marketo Dynamic Content

Configure Marketo variables and segmentation so dynamic email content works when syncing from Knak.

Updated over a week ago

Dynamic content allows you to display different email content for different audiences. Knak connects to Marketo variables and segmentations to control these variations.


Prerequisites

Before configuring dynamic content, update the API user role permissions in Marketo.

Required permissions:

  • Read-Only Lead (sometimes listed as Read-Only Person)

  • Read-Only Custom Object

Without these permissions, dynamic content variables may not sync correctly.


Configure Marketo Dynamic Content

Follow these steps to connect Marketo variables and segmentations to Knak.

1. Open Dynamic Content Settings

  1. Navigate to Admin → Integrations → Platforms.

  2. Locate the Marketo integration tile.

  3. Click Dynamic Content Settings Icon.

Admin → Integrations page showing the Marketo tile and Dynamic Content Settings.

2. Create the Knak Variables Configuration Token

Create a configuration token to store the Marketo variables used for dynamic content.

  1. Select the Marketo folder where the token will be created.

    1. Create this token in a top-level folder within your default workspace.

      • Accessible to all subfolders

      • Easier to manage across multiple programs

  2. Click Create New Config.

Create New Config button highlighted in Marketo Dynamic Content Settings Page.

Knak automatically creates a Marketo token called:

{{my.Knak Variables}}

This token stores the variables and segmentations that Knak can access for dynamic content.

3. Add the Tokens in Marketo

  1. Click Add beside the configuration token.

  2. A new Marketo tab will open.

  3. Navigate to the selected folder.

  4. Locate and edit the token: {{my.Knak Variables}}

    1. You’ll need to double click the token before the edit button appears.

    Marketo folder showing the Knak Variables token.

4. Add Variables or Segments

Add the variables or segmentations you want to use for dynamic content.

Steps:

  1. Drag variables from the right panel into the Script Editor.

    Token editor showing variables dragged into the script area.
  2. Confirm the variables appear in the script area.

  3. Ensure each variable is checked in the right panel.

    1. You can add:

    • Lead variables (example: Lead.City)

    • Marketo segmentations

  4. Click Save.

    1. You have to save in both the popup modal:

    2. And from the My Tokens page:


5. Sync Variables From Marketo Into Knak

After saving the token:

  1. Return to Dynamic Content Settings in Knak.

  2. Click Sync.

Knak imports the configured variables from Marketo. Hover over a variable to see:

  • Variable syntax

  • Variable type

Variables may have different colors:

  • Blue (Segmentation) - Marketo segmentation variables

  • Orange (Custom) - Custom object variables

  • Grey (Default) - Standard variables


How Dynamic Content Sync Works

When you sync an email that contains dynamic content from Knak to Marketo, Knak automatically creates a Knak Dynamic Element token at the Program level.

The token appears as:

{{my.Knak Dynamic Element}}

This token contains the velocity script used to render the dynamic content blocks in the email. Marketo uses this token to determine which content variation should appear for each audience segment.

⚠️ Important: Do not remove or edit this token. Removing the token will break the rendering of dynamic content.

Where the Token Appears in Marketo After Syncing an Email to Marketo

The token is created in the Program that contains the synced email.

To locate the token:

  1. Open your Marketo Program.

  2. Click the My Tokens tab.

  3. Locate: {{my.Knak Dynamic Element}}


Using Tokens in Dynamic Segments

Configure Merge Tags in Admin Settings

If you want to use Marketo tokens inside dynamic content segments, you must configure the merge tags in Admin Settings.

This step allows Knak to recognize the variables stored in the {{my.Knak Variables}} token.

Open Merge Tag Settings

  1. Navigate to Admin → Settings.

  2. Locate the Merge Tags section.

  3. Edit a merge tag or create a new one. Learn more about Merge Tags.

  4. Add the variables you want to use in dynamic content.

When using tokens inside dynamic segments, use this syntax:

${<Velocity Script Token Name>}

Example:

${Lead.Country}

If you’re unsure what the velocity script token should be, review script tokens in Marketo:


Managing Dynamic Content Permissions

Control access to dynamic content features through user roles.

  1. Navigate to Admin → Roles.

  2. Select a role to modify.

  3. Scroll to the Dynamic Content section.

Available permissions:

  • Manage dynamic content variants

  • Manage global segments

  • Manage local segments

Dynamic Content role permissions.

Note: Global segments can be reused across emails. Local segments apply only to a single email.


Step-by-Step Video

Walkthrough video of Dynamic Content from Knak to Marketo:


Points to Consider

Program Location and Email Sending

When syncing an email into Marketo:

  • Dynamic content script tokens are generated automatically.

  • Tokens are stored at the Program level.

If you send the email using a Smart Campaign, the Smart Campaign must exist in the same Program as the email. Otherwise, the dynamic content will not render correctly.

Emails sent from an Email Program will render dynamic content correctly.

Workspace Segmentation Access

Segmentations may not be accessible in all workspaces.

If you sync an email to another workspace:

  • Ensure the Marketo segmentation is shared with that workspace.

Marketo Token Size Limit

Marketo limits the total length of velocity tokens in an email to 100 KB.

If this limit is exceeded, Knak displays a warning during sync.

Ways to reduce token size:

  • Split long text into dynamic and non-dynamic sections

  • Remove tokens from the plain-text version of the email

  • Reduce the amount of dynamic content used


FAQs

My company token is not working

Configuration variable sync only supports Lead variables.

Supported:

Lead.xxx

Not supported:

Company.xxx

Example fix:

Replace:

${Company.Company Name}

With:

${Lead.Company}

When should I use local segments vs global segments?

Segment Type

Use Case

Global Segments

Reusable across multiple emails

Local Segments

Used only within a single email

When should I use the Default Hide Variant feature?

Use this when content should appear only for specific audiences. If Default Hide is enabled, users who do not match the segment will not see the content block.

Example of when this should be used: showing a special offer only to selected segments.

Only the default content appears in Marketo

This often occurs if a segment name was changed in Marketo after syncing.

Knak may still reference the original segment name.

Recommended Fix

  1. Log in to Marketo.

  2. Confirm the segmentation name.

  3. Return to Knak.

  4. Open the Global Segments used in your email.

  5. Update the mapping to match the current Marketo segment name.

Tip: Always confirm segmentation names before syncing emails.


Need more help? Contact Support via live chat within Knak using the chat bubble in the bottom right corner or email support@knak.com

Did this answer your question?