Trying to inline an email after I put a bunch of urls with UTM query strings in it and the inliner totally botched them by changing ampersands (&) to (&)
Also anywhere they I manually type & it changes it to & and same with changing it to
Here, you can use what I've created for my project. Place this yaml code in your front matter of the template you are working on.
# ---------------------------------------------
# UTM Tracking Parameters
# ---------------------------------------------
tracking:
- type: "?utm_medium="
value: "email"
- type: "&utm_source="
value: "Your Source Here"
- type: "&utm_campaign="
value: "Your Campaign Name Here"
- type: "&utm_content="
value: "Your Content Here"
Then place this handlebars each helper after all of your links and inliner will not encode your urchin tracking parameters.
<a href="http://www.your-domain-here.com/{{#each tracking}}{{{this.type}}}{{{this.value}}}{{/each}}&utm_term=text-link">Your Text Link Here!</a>
Also, you can use raw helper to not have the inliner touch your ampersand signs or any other content you wish to leave unfiltered.
{{{raw}}}&{{{/raw}}}
Another example that I am using in my project for merge fields and laravel blade syntax. However, I created a new data folder to house my yaml syntax so it's accessible globally. With this method, instead of using double brackets, you should be using triple brackets, as that will leave it unfiltered as well.
# ---------------------------------------------
# Merge Fields
# ---------------------------------------------
job_link : "{{ $job->campaign()->url($tracking_code) }}"
job_title : "{{ $job->title }}"
job_title_dirty : "{{ $job->title_dirty }}"
job_city : "{{ $job->city }}"
job_state : "{{ $job->state }}"
job_zip : "{{ $job->zip }}"
opt_out : "%%UNSUBSCRIBE%%"
first_name : "%%FIRST_NAME%%"
last_name : "%%LAST_NAME%%"
job_specialty : "%%JOB_SPECIALTY%%"
specialty : "%%SPECIALTY%%"
job_post_date : "%%CAMPAIGN_DATE%%"
job_type : "%%EMPLOYMENT%%"
Example html from one of my templates
<container>
<row class="introduction">
<columns large="12">
<p>Hi {{{fields.first_name}}} {{{fields.last_name}}} ,</p>
<p>Our client is in need of a new <a href="{{{fields.job_link}}}{{#each tracking}}{{{this.type}}}{{{this.value}}}{{/each}}&utm_term=body-job-title">{{{fields.job_title_dirty}}}</a>, and it looks like you could be a great candidate for the position.</p>
<p>This opportunity offers competitive benefits, plus a great work environment. If you鈥檙e interested, I鈥檇 be happy to set up a call with you. My contact info is below, and you can <a href="{{{fields.job_link}}}{{#each tracking}}{{{this.type}}}{{{this.value}}}{{/each}}&utm_term=body-details-link">see details about the position here</a>.</p>
<p>Thanks, and have a great day!</p>
</columns>
</row>
</container>
Snippet of my utm tracking parameters untouched by the inliner.
<a href="http://my-domain/?utm_medium=email&utm_source=Reactivate&utm_campaign=We have a new job opportunity for you&utm_content=Option A: Generic - Related Jobs - Toolbar&utm_term=toolbar-logo" style="Margin:0;color:#428bca;font-family:Arial,Helvetica,sans-serif;font-weight:400;line-height:1.3;margin:0;padding:0;text-align:left;text-decoration:underline"><img src="assets/img/logo.png" alt="Insearch Medical" width="100" style="-ms-interpolation-mode:bicubic;border:none;clear:both;display:block;height:auto;max-width:100%;outline:0;text-decoration:none;width:100px!important"></a>
@GarrettDengler did you try any of my examples? if so, did it help?
panini is based on handelbarsjs.com
You can uses triple-stash to esacepe incoding (&) to (& amp;)
for example, this will be done like needed:
utm: ?utm_source=email&utm_medium=email&utm_campaign=new&utm_source=my
---
<a href="http://example.com{{{utm}}}">this</a>
Duplicate of https://github.com/zurb/foundation-emails/issues/841, can be closed.