Skip to content

Instantly share code, notes, and snippets.

@MyCueCards
Created October 3, 2018 13:58
Show Gist options
  • Save MyCueCards/1fe3b84d65d8a26b0285336484701055 to your computer and use it in GitHub Desktop.
Save MyCueCards/1fe3b84d65d8a26b0285336484701055 to your computer and use it in GitHub Desktop.
In a Salesforce Marketing Cloud email, this builds a URL when using a Google Campaign URL. This includes a couple static parameters and then a field from the sendable data extension.
%%[Set @url = concat('https://www.someurl.com?utm_source=StaticParameter1&utm_medium=StaticParameter2&utm_campaign=StaticParameter3&utm_term=',FieldName,'&utm_content=StaticParameter4')]%%
<a href="%%=RedirectTo(v(@url))=%%" target="_blank" style="font-size: 18px; font-family: Open Sans, Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; border-radius: 5px; background-color: #000000; padding: 15px 30px; border: 1px solid #000000; display: block;">Click Here &#187;</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment