<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1822615684631785&amp;ev=PageView&amp;noscript=1"/>

How to include a personalized link in a Gmail email marketing campaign

GMass, the ultimate email marketing tool for Gmail, offers lots of mail merge personalization options, from simple mail-merge personalization to fallback values and even automatic first name detection. Sometimes, you may need to get a little more sophisticated and include a personalized link or URL for each recipient of your email marketing campaign.

The best practice for including a personalized URL is to include the full URL, with personalization in place, or an HTML code snippet of the link, as a column in your Google Docs spreadsheet.

Raw URL Example

Below is an example of a spreadsheet where the personalized link is in raw form, with just the URL specified.

After using GMass to connect to your spreadsheet, the Compose window launches, and your message might look like this:

When your email is sent, the recipient, [email protected], will get a message that looks like this:

The link appears just as it did in the row for [email protected] in the spreadsheet. Hovering over the link shows that it points to the same URL as is displayed.

URL with Anchor Text Example

Next is an example of a spreadsheet where the personalized link is part of an HTML anchor tag, such that meaningful text is displayed that, when clicked, will take the user to the personalized URL. The full <a href> anchor tag will be inserted into the HTML message at the point designated by the {PersonalizedURL} mail merge tag.

After using GMass to connect to your spreadsheet, the Compose window launches, and your message might look like this:

When your email is sent, the recipient will get a message that looks like this:

The anchor text is displayed, since it was surrounded by <a href> tags in the spreadsheet cell, but hovering over the link displays the target URL in the bottom status bar of the browser (highlighted in yellow).

Click tracking will not be applied

If you enable click tracking in GMass settings, these particular links will not be modified, regardless of whether you use the raw URL or anchor text approach. That’s because GMass applies click tracking to links before it applies mail merge personalization, so by the time the links are personalized, the click tracking process has already finished altering links in the campaign. In addition, theoretically, because these links are unique to each recipient in the first place, it’s not necessary for GMass to click-track them since they are trackable on the web server of the domain in the personalized URL.

Do not personalize links directly in the Compose window

The reason we advocate placing the full personalized URL as a column in your spreadsheet is because the Gmail Compose window is prone to altering a personalized link and rendering it a broken link. This is due to how Gmail encodes a message behind the scenes.

In this example:

Do NOT personalize URLs as shown above.

The user has attempted to personalize a URL directly inside the Gmail Compose window, by inserting the mail merge personalization variables as part of the URL. In theory this should accomplish the same objective as placing the full personalized link in the spreadsheet cell, but this actually does not work because Gmail encodes the curly brackets into their HTML-encoded form, replacing the left curly bracket with %7B and the right curly bracket with %7D. This encoding would break the GMass personalization process, causing these merge tags to not be replaced with their appropriate values.


If you need to send personalized URLs as part of a Gmail-based email marketing campaign, include the full personalized URLs, one for each recipient, in your Google Docs spreadsheet rather than including the mail merge personalization variables as part of the link in the Compose window.

Ready to transform Gmail into an email marketing/cold email/mail merge tool?

Only GMass packs every email app into one tool — and brings it all into Gmail for you. Better emails. Tons of power. Easy to use.


Download Chrome extension - 30 second install!
No credit card required
Love what you're reading? Get the latest email strategy and tips & stay in touch.

  1. It’s pretty critical to track the users on my website by including their email in the URL. However, then I have to give up Gmass click tracking.

    Maybe you can apply click tracking AFTER personalization instead?

  2. What will it really cost gmass to apply mail merge personalizations first before applying click tracking to links? Else there might be a function problem, it sounds “as easy as” bringing process 2 in front of 1. In addition, theoretically, what each user may need to track could be different from what gmass tracks. Moreover, how do users pass the tracking data you handle for them directly into their web form? Is giving users more control over email sending not the essence of GMASS? Ajay has always solved most problems, please solve this longed for one. Thank you

  3. You sit up every day lien for what I told you what you have to do I don’t talk to nobody who?? Sad theirs 25 hours in your day for this just take this shit these people don’t what hell I been through

  4. Gravitational-dualities on Ads_8 bundles over SO(N) bundles over CY_N are Non-gaussian. Models of Electrons
    are also Investigated. Our Determination of M-dimensional fluctuations At the Tevatron Yields Anomaly constraints in Models of Gluons.
    While Surveying Examples of A Chiral hierarchy, we Boost that, Within the approximation that Nahm’s equations in Toda TQFTs On Harmonic Atiyah-Hitchen manifolds are Worldsheet symmetric, Toda TQFTs Surrounded
    by A D3 brane probe May be Predicted from Inflation At
    the Tevatron.

  5. +1 to all the other commenters who mention wanting to track clicks on personalized links. We use a lot of personalized links in our emails and building separate infrastructure outside of GMass to track clicks on these URLs is beyond our team’s capacity right now.

    Additionally we use personalized links that go to servers we do not own (for example, we send Typeform surveys in our emails that have custom URL parameters, such as — typeform.com/survey-id?name={firstName}). We merge firstName in using GMass, but I don’t think we have any way to then know who is clicking this link, since we don’t control the Typeform server.

    Being able to track personalized links would be huge for us; we are considering moving a lot of our email sending elsewhere because of this issue.

  6. Hi, We are wanting to create personalized URLs based on the fields in our spreadsheet. The way we set it up was working at first, but now it is not. I found this post and tried the solutions above but it didn’t work. Could you please take a look and see if you have a suggestion?

    Here’s what we first tried- in the email template we typed “please click here” and then highlighted that text and using Gmail inserted a link with the merge field “https://{MERGE FIELD}”. We are wanting to personalize the URL with 6 different options, so we are using a formula to do so. We have two columns on the spreadsheet- one is a formula (column K in this example) to concatenate the URL along with the URL variables so the formula in column K is =concatenate(“url?urlvariable1=”,B2,”&urlvariable2=”C2 [so on and so forth]). Column L is the MERGE FIELD column and is simply “=K2″ to pull the link all together with the personalized url variables. This was working for the first 20 or so emails, but stopped. I tried the solutions above- first with anchor text, but the the h ref conflicted with the formula. Then I tried inserting just the merge field, but when I received the GMass email, the link was broken because the spaces in the name fields that are part of the url variable. So then I tried using a hyperlink formula to create a friendly URL (=hyperlink[K2,”Please Click Here”]) which created a nice link in the Google Sheet, but only appeared as text Please Click Here in the email once merged.

    Any advice? Thanks in advance!

    1. Hi Jess,

      Could you please contact our support team (gmass.co/g/support) and provide us with the campaign ID of the campaign and/or a screenshot of your Google Sheet so we can assist you directly?

  7. This looks useful if we wanted to send merge data as a payload say, into a calendar form for example. What use did you imagine it for when you designed this Ajay?

  8. Having to dynamically build full custom URLs in gsheets for each contact is extremely unwieldy with large datasets, the formula recalculation time means that gmass sometimes catches the sheet in a state of formula recalculation and parses broken links… there has to be a better way to code this from the gmass side.

  9. In these days of austerity as well as relative anxiety about having debt, a lot of people balk resistant to the idea of having a credit card in order to make purchase of merchandise and also pay for a trip, preferring, instead only to rely on a tried and trusted approach to making transaction – cash. However, if you have the cash there to make the purchase completely, then, paradoxically, that’s the best time for them to use the cards for several causes.

  10. Together with every thing which seems to be developing inside this particular subject material, all your viewpoints happen to be very radical. However, I beg your pardon, because I can not subscribe to your entire strategy, all be it stimulating none the less. It looks to us that your opinions are actually not totally justified and in reality you are your self not fully confident of the point. In any event I did appreciate looking at it.

  11. URL with anchor text question –

    I’m trying to send 40 some emails with multiple unique links and unique anchor texts in each email.

    I have a column with the unique links and a separate column with unique anchor text.

    Is there a formula that could easily pull in the unique links and unique anchor texts into the Personalized URL column? The quotation marks seem to be messing up pulling in the cell references.

  12. I have observed that car insurance companies know the vehicles which are prone to accidents along with risks. In addition they know what kind of cars are susceptible to higher risk along with the higher risk they may have the higher the premium rate. Understanding the uncomplicated basics with car insurance will help you choose the right type of insurance policy that should take care of the needs you have in case you happen to be involved in any accident. Thank you for sharing your ideas for your blog.

  13. Thanks for your post. One other thing is always that individual states in the United states of america have their own personal laws that will affect people, which makes it extremely tough for the the nation’s lawmakers to come up with the latest set of guidelines concerning home foreclosure on home owners. The problem is that every state offers own legal guidelines which may have impact in a negative manner in regards to foreclosure procedures.

Leave a Reply

Your email address will not be published. Required fields are marked *

Transform your Gmail account into an email marketing powerhouse

GMass is easy to learn and easy to use — but brings unbelievable email power into Gmail

Try GMass for free Then check out the quickstart guide to send your first mail merge email in minutes!


Share This