Email Global variables with dynamic segmentation | Community
Skip to main content
Disha_Goyal6
Community Advisor
Community Advisor
July 17, 2025
Solved

Email Global variables with dynamic segmentation

  • July 17, 2025
  • 1 reply
  • 1882 views

Hi @sanfordwhiteman,  I’m currently working with UTM parameters and assigning values using global variables in email editor 2.0. However, the client reported an issue where this approach doesn’t work when dynamic content (segmentation) is used. After doing some research and testing, I found that global variables are indeed not compatible with dynamic content.

 

Could you please suggest a workaround or an alternative approach to address this issue?

 

Best answer by SanfordWhiteman

To use a global ${mktoVariable} in Dynamic Content:

 

  1. first output the ${mktoVariable} in-between 2 Velocity {{my.tokens}} with
    #define($mktoVariable_VTL)
    and
    #end
    respectively
  2. create a 3rd Velocity {{my.token}} that simply outputs
    ${mktoVariable_VTL}
  3. use that 3rd Velocity token in Dynamic Content

This is a very advanced use of Velocity in Marketo. Be sure you understand how Velocity scope & order-of-operations work before supporting it in a production environment.

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
July 23, 2025

To use a global ${mktoVariable} in Dynamic Content:

 

  1. first output the ${mktoVariable} in-between 2 Velocity {{my.tokens}} with
    #define($mktoVariable_VTL)
    and
    #end
    respectively
  2. create a 3rd Velocity {{my.token}} that simply outputs
    ${mktoVariable_VTL}
  3. use that 3rd Velocity token in Dynamic Content

This is a very advanced use of Velocity in Marketo. Be sure you understand how Velocity scope & order-of-operations work before supporting it in a production environment.

Disha_Goyal6
Community Advisor
Community Advisor
July 23, 2025

Hi @sanfordwhiteman, how we will ge the value of modular email global variables in velocity token?

SanfordWhiteman
Level 10
July 23, 2025

What do you mean by “modular email global”? A global variable and a module-scoped variable are different.