Skip to main content
edited tags
Link
Lukas Lunow
  • 22.2k
  • 4
  • 27
  • 59
Source Link

Dynamic Flag for Deep Linking MC-Deep-Link

We use the "mc-deep-link" tag in our href to ensure we are either pushing our customer into our App environment or to our website if the app doesn't support that specific link. All our links are dynamically populated and come with a pre-determined flag that identifies if the link is app-supported.

Opens in our app

<a href='https://www.google.com' mc-deep-link='true'>LINK</a>

Opens in browser

<a href='https://www.google.com' mc-deep-link='false'>LINK</a>

As you can see, the only difference is that the mc-deep-link tag is either set to 'true' or 'false' depending on if the link is supported by the app. Because we have a variable that will identify pre-determined app-supported links, we would love to do something link this:

<a href='https://www.google.com' mc-deep-link='%%=v(@TrueFalseFlag)=%%'>LINK</a>

I have tried multiple iterations: simply setting the flag to either true/false, setting the flag as the full string (mc-deep-link='true' or mc-deep-link='false') and just calling the variable within the href, defaulting a 'false' to either be empty or removes the mc-deep-link tag altogether, and enveloping everything into a TreatAsContent. All that to say that I am unable to force a 'false' flag dynamically to make my links go to the browser instead of the app--whenever trying to populate this flag dynamically, it always seems to default to a 'true'.

Does anyone have an idea on how we could make this truly dynamic?