CMS Development

tvassalotti
参加者

Using coded-in modules to attach UTMs to smart links

I'm experimenting more with template opportunities, specifically using smart modules in the templates themselves as opposed to within the email editor. I'm not sure if this is the best way to go about the situation, but it's something.

 

We often send the same email, to customers as well as leads, with slight copy changes between the two groups. One of those changes is our email footer. I'm wondering if I could make a template that uses a smart module as the footer to display either the lead footer or customer footer.

 

I've tested that part and it works, however, I also need to be able to add the correct UTM parameters to the respective footer links.

 

I'm still new to this, but I tried adding in a bit of code to the header to create a sidebar module for inputting the link, however it doesn't seem to be carrying over correctly.

 

This is what I've added to the header:

{% text "leads_blog_utm" label="Leads Blog UTM", value="#", export_to_template_context=True %}
{# Makes the parameters available to be stored and used in template logic #}

And I was trying to attach that to the link like this:

<div style="text-align: center;">Example of copy here<a style="color: #67a5bf; text-decoration: none;" href="https://www.ourbloghere.com{{ widget_data.leads_blog_utm.value }}">ourbloghere.com</a></div>

What part of this is not allowing the UTM to correctly pass to the link?

Is this even possible or am I trying something that really doesn't work like I'm expecting?

 

Thanks!

0 いいね!
6件の返信
Kevin-C
名誉エキスパート | Solutions Partner
名誉エキスパート | Solutions Partner

Using coded-in modules to attach UTMs to smart links

Hey tvassalotti,

Also thank you @jennysowyrda

 

So Im rather new to HubL as well so we'll learn together, and I'll see what I can do.

@tvassalottiAre you getting any output at all? Whats the href attribute value when renderd on screen?

Kevin Cornett - Sr. Solutions Architect @ BridgeRev
tvassalotti
参加者

Using coded-in modules to attach UTMs to smart links

When I put the UTM parameter into the section in the left red box, to be appended to the links in the right red box, I had two different results for the homepage link.

 

When previewing it as a lead contact in the editor, I grabbed this link:

https://www.terraskitchen.com/?_hsenc=p2ANqtz-91kH-ci7VnC-WnDiXzo5vbHVIj3QJThLPYEI-ojXAyy6K80TPgvrRT...

 

 

When following the link in a test email, I got this:

https://www.terraskitchen.com/?_hsenc=p2ANqtz-9yklsRYYX-dmVY1muM3ncAT126j-y5wGQUDBEQx_-SbHPrDAMwJDAk...

 

Edit Email   smart module testing.jpg

0 いいね!
Kevin-C
名誉エキスパート | Solutions Partner
名誉エキスパート | Solutions Partner

Using coded-in modules to attach UTMs to smart links

So basically its printing a different value than what you input?

 

What are the anaytics on the other end telling you about the click through? Is it registering both URLs?

Kevin Cornett - Sr. Solutions Architect @ BridgeRev
0 いいね!
tvassalotti
参加者

Using coded-in modules to attach UTMs to smart links

Well, I think I figured it out now that you say that. There was a syntax error in the way I coded it and now it's carrying over. So, it looks like this is solved and working. Thanks for the help!

jennysowyrda
コミュニティーマネージャー
コミュニティーマネージャー

Using coded-in modules to attach UTMs to smart links

Hey @tvassalotti,

 

Do you have shareable links to the template/email you're working with? 

 

@tjoyce and @Kevin-C do you have any advice on this matter? 

 

Thanks,
Jenny

tvassalotti
参加者

Using coded-in modules to attach UTMs to smart links

I'm not sure how to create a shareable link to the template or email that isn't just a preview link. How do I create one?

0 いいね!