Hi Marketo Community!
I have a problem I'm trying to solve but I'm not sure I'm approaching it in the correct way.
Right now I am working in an instance which has 2 companies using it. They want to have 2 separated unsubscribe centers for both companies and when they send emails from one, the unsubscribe URL should be representative of that company. Building the programs to have the preference centers has been very easy thanks to the community but I'm not sure how to resolve this problem. The database is used between both companies and are tracked through lead stages, thus segmentation would not work as a way to split them.
Is it possible to use something like My Tokens in the unsubscribe text URL to change it based on something such as program name/folder name? The only identifier we use is a 2 letter company name at the start of all programs to identify which company will be sending it. I know how to change the text for the unsubscribe, but I'm not sure if I can make it dynamic for each mail-out.
If I'm completely off base, is there another way I could tackle this issue? Ideally in an automated fashion
Solved! Go to Solution.
How do I include this token in the head of my email?
You can actually put it anywhere you want. It just has to come before your token that sets the URL (since the second token refers to a variable set in the first token).
Definitely don't use a mktoString variable, just put the {{my.companyCode}} directly in the <head> or right after the starting <body>. This token doesn't have any output, it just sets a variable. So it could go even go between two elements:
</div>{{my.companyCode}}</div>
Or just right in front of the second token.
{{my.CompanyCode}}{{my.tokenThatUsesVariablesSetInCompanyCode}}
The sole requirement is that {{my.companyCode}} be used before the second token is used. This may sound confusing, but that's probably because it's simpler than you imagine: tokens are rendered from the top down in an email. Any token can access variables that were set in higher-up tokens.
Documentation is sparse for some of this I find.
Sure is, for multiple reasons:
The database is used between both companies and are tracked through lead stages, thus segmentation would not work as a way to split them.
Actually depends on how you use segmentations.... anyway, you could:
Thanks for these suggestions! Could you provide some more assistance with the Velocity tokens. Is there a resource I could use to find where all the marketo velocity variables are? I think that's a pretty neat solution.
Thanks for these suggestions! Could you provide some more assistance with the Velocity tokens. Is there a resource I could use to find where all the marketo velocity variables are? I think that's a pretty neat solution.
Marketo includes most of the GenericTools (with the notable exception of LinkTool). But you shouldn't need to do anything complex here. You just want the company code set at the uppermost level in a token like {{my.companyName}}
#set( $companyCode = "AB" )
and then if you include {{my.companyName}} in the <head> of your emails you can have another Velocity token that builds the URLs, like
<a href="http://example.com/unsub?co=${companyCode}">Unsubscribe</a>
I always recommend http://blog.tenkl.com/tag/velocity which is the only place for Marketo-specific Velocity tips, if I do say so...
Thanks again for the help, just one more question:
and then if you include {{my.companyName}} in the <head> of your emails you can have another Velocity token that builds the URLs, like
<a href="http://example.com/unsub?co=${companyCode}">Unsubscribe</a>
How do I include this token in the head of my email?
I currently have - <meta class="mktoString" id="companyCode" mktoname="Company Code" /> but did not figure out how to add the my.companyname token. And you misspelled your blog URL http://blog.teknkl.com/
Documentation is sparse for some of this I find.
How do I include this token in the head of my email?
You can actually put it anywhere you want. It just has to come before your token that sets the URL (since the second token refers to a variable set in the first token).
Definitely don't use a mktoString variable, just put the {{my.companyCode}} directly in the <head> or right after the starting <body>. This token doesn't have any output, it just sets a variable. So it could go even go between two elements:
</div>{{my.companyCode}}</div>
Or just right in front of the second token.
{{my.CompanyCode}}{{my.tokenThatUsesVariablesSetInCompanyCode}}
The sole requirement is that {{my.companyCode}} be used before the second token is used. This may sound confusing, but that's probably because it's simpler than you imagine: tokens are rendered from the top down in an email. Any token can access variables that were set in higher-up tokens.
Documentation is sparse for some of this I find.
Sure is, for multiple reasons:
Thanks so much for your help with this. I learned a lot about the Velocity tokens. I settled on this simple solution:
#set( $url1 = "info.site.com/Unsubscribe-Center_xx.html" )
<a href="http://${url1}?mkt_unsubscribe=1">Unsubscribe</a>
With each company having a unique token and all emails would contain the token and be sent from that folder. This is just beta-testing stage but it was a great learning exercise.