Skip to main content

Hi! I am integrating some (non-Klaviyo) surveys into my email campaigns. For reporting purposes, I would like to be able to pass in some dynamic values to the URLs in my “form” links within the campaign. (For example, if a user clicks a link, I could see in the reporting which campaign they clicked on.) My questions:

 

First: When composing an email campaign, is there a template tag I can use that repeats the subject line used in that campaign email? For example, if the subject is:

Bananas are 50% today only

Then let’s say a template tag like

{{ subject }}

…would resolve to:

Bananas are 50% today only

 

Second: If that doesn’t exist, is there another template tag of a campaign identifier, or some other way to identify the campaign? (I see that I could use {{ date }}.)

 

Third: Does Klaviyo’s template language include a mechanism for URL-encoding strings?  For example, to take the {{ subject }} and convert it to:

Bananas%20are%2050%25%20today%20only

…so it could be usable within a URL parameter.

Thank you!

 

Hi ​@scottm,

Good question! While there isn’t a tag specifically for the subject, you should be able to add the email subject as a UTM parameter in your UTM settings here: https://www.klaviyo.com/settings/other/utm-tracking. Create a new parameter, or choose an existing one, and set the value to “Email Subject.” That’ll pull in the subject as a UTM parameter in all the links in your emails. 

Let me know if this solution works, or if it wouldn’t be applicable in your situation. Happy to continue troubleshooting, if needed!

-Byrne


@Byrne C Thank you! This gets me most of the way there!

I would love to also have the send date, all by itself, for example:

&utm_senddate=2025-03-13

I can’t find the date by itself under UTM settings. However, I do see “Campaign name (send date)”, which I can use (and then extract just the date part). But is there a way you know of to get just the date by itself? Thank you!