Question

How to properly merge automatic UTM and dynamic coupon codes?

  • 1 February 2022
  • 9 replies
  • 73 views

Badge

I would like the customer to receive their dynamic coupon, but as a marketer I would like to know which link they came from/in which email. I have turned on the automatic UTM creation. What is the proper way to merge UTM with dynamic coupons?

mysite.com/discount/{% coupon_code 'CouponName' %/?utm_campaign=sms_1&utm_source=abandoned_cart&utm_medium=sms

 


9 replies

Userlevel 6
Badge +37

Hi there @marctuinier,

Welcome to the Community!

You can certainly add unique codes into UTM parameters - you just need to add them manually to your links.  So for a link to www.link.com, you would just add the UTM parameter for the coupon code that was used: www.link.com/utm_coupon={{ your_coupon_code }}. You can name the UTM parameter anything as long as it starts with utm_
 

I hope this helped!
Alex

Badge

Hi Alex,

Thank you for welcoming me! And also thank you for taking the time to reply. 

I’m afraid there’s a misunderstanding though, I was asking about dynamic coupons rather than unique coupons. 

Would it work the same?

Marc

Userlevel 6
Badge +37

Hi there @marctuinier,

My pleasure and glad to see you in the Community!

To clarify, dynamic and unique coupons are the same thing. Also regarding your question, are you trying to apply a custom UTM to to a link which automatically applies a discount? If you are, it is 100% doable! But not in the format you are thinking. This too would depend on what it is you are trying to do.

if they wanted to use a custom UTM (Separate from what Klaviyo automatically applies ) you’ll have to create the UTM yourself and turn UTM tracking off for the email. So for example, it would be mysite.com/discount/{% coupon_code 'CouponName' %}/?utm_campaign=sms_1&utm_source=abandoned_cart&utm_medium=sms

If you wanted to use Klaviyo's custom UTM application, then you should only need to use mysite.com/discount/{% coupon_code 'CouponName' % as the URL and have custom UTMs enabled for the campaign. This way those custom UTMs set for the campaign would apply automatically to all links in the email.

You can hardcode your own utm parameters like so:

?name=inline133137759.png

It is important to note that if the URL you are adding to already has UTM parameters you will need to use an instead of a ?.

For more on UTM parameters see here.

 

Hope this helped!
Alex

Badge

Hi there @alex.hong 

Thank you for your explanation. I’m trying to do something similar but it’s not working. 

 

In my email I’m using a links to update their profiles. It’s working on that end but I can’t get the UTM tracking to stick. I’ve tried the link both ways. 

 

{% update_property_link 'Interests' 'outdoors' 'https://www.wileyx.com/sunglasses/activity/sunglasses-for-outdoors' %}?utm_source=email&utm_medium=marketing&utm_campaign=2022-05-07-c-po-20-summer22

 

{% update_property_link 'Interests' 'shooting' 'https://www.wileyx.com/sunglasses/activity/eyewear-for-shooting?utm_source=email&utm_medium=marketing&utm_campaign=2022-05-07-c-po-20-summer22' %}

 

Any ideas?

Thank you for your help.

Matt

Userlevel 6
Badge +37

Hi @californiamatt,

Thanks for sharing. Quick question, are you trying to attach these UTM codes to a coupon as in the examples? Could you explain the process for what makes a profile property update?

Thank you!
Alex

Badge

Hey Alex! Thank for you quick response. 

No I’m using this to update preferences.

This is what I’m doing:

https://help.klaviyo.com/hc/en-us/articles/115005255248-How-to-use-links-to-collect-information-about-your-recipients

 

Thank you!

Matt

Userlevel 6
Badge +37

Hi @californiamatt,

Regrettably, that would be the case if you are using our Update Profile Property feature since it utilizes a redirect link. UTM parameters can only be appended to the original destinations, not for a redirect link. You will have to disable the automatic tracking feature if this is for a campaign. You can toggle over the Customize tracking parameters to manually apply UTMs!

 

?name=image.png
 
After conducting further research on my end, I could not allocate additional information regarding any cases of custom profile properties while setting up custom tracking parameters. 

 

We've done some additional testing and it appears this is expected behavior where Klaviyo is stripping out the UTMs anytime you use the update property tag for a button/link. 
 
Generally speaking (even beyond Klaviyo), UTMs are stripped when you redirect, so it appears the same is happening for the link you specify in this tag. 
 
We realize this is a potential blocker for you to move forward with using these links in your templates, so we're checking with Product and Engineering if there is anything we can do to address this in the future. 
 
But in the meantime your options are:

  • a) Leave the update button/links as is - with the understanding the UTMs will be stripped from the destination link
  • b) Remove the update profile links - you'll lose the property updates, but the UTMs will remain intact
    • As long as those links are unique in the campaign, you should be able to create a segment to still capture profiles based on what they clicked on

 
Ex:
 
Clicked Email at least once where URL equals: https://www.wileyx.com/sunglasses/activity/sunglasses-for-outdoors
 
?name=image.png

 

I hope this helped,

Alex
me?tid=864785&ts=2022-04-14T20:01:36Z&aid=20558422848&oid=klaviyo&uuid=4489d7f8-4e4e-4c99-b860-7bc015464eea

Userlevel 5
Badge +8

@californiamatt the format in your last message will screw up your google analytics channel groupings.

 

Google Analytics knows utm_medium=email (marketing is not a default channel in GA).

As for utm_source I would recommend using Klaviyo

 

As for updating the profile properties, my assumption would be that if auto utm tagging is enabled you wouldn't have to add a static utm code. But if you want that I would think that this would be the way to go about it.

{% update_property_link 'Interests' 'outdoors' 'https://www.wileyx.com/sunglasses/activity/sunglasses-for-outdoors?utm_source=email&utm_medium=marketing&utm_campaign=2022-05-07-c-po-20-summer22' %}

Does that help?

Badge

Thank you @Omar  I tried this and it stripped out the parameters… so my guess is its either the “?” or “%” is breaking off with the redirect. I also tried adding the string after the code. See above.

Reply