SOLVED

How to Remove “https” From a URL and Update a New Field

Go to solution
ashah123
Level 3

Hi Team,

 

We have a field in Marketo that comes from our CRM ( Dynamics 365 ) , and it contains a full URL (MS Bookings link). We currently use it via the lead token in our emails, and the link works, but it doesn’t get tracked because the token URL includes “https”.

 

To address this, we're exploring the option of creating a new field and running a daily smart campaign to copy the value from the old field—but without the “https://” prefix and update it to the new one, so it can be tracked

 

Example:
Old field value: https://www.google.com
New field value: www.google.com

The idea is to update the new field using the old field’s value, removing the protocol. However, I’m unsure whether the Change Data Value flow step can handle this type of string transformation directly.

 

Could you advise on possible approaches to remove “https://” when updating the new field?

 

Any guidance on handling this scenario would be helpful.

 

Please let me know if you need anything else.

 

Regards,

Akshat

1 ACCEPTED SOLUTION
4 REPLIES 4
Jo_Pitts1
Level 10 - Community Advisor

@ashah123 ,

if you want to permanently alter the value of the link, I'd use FlowBoost (https://flowboo.st/).  You could have a single triggered campaign that looked for changes in the booking link, and if the booking link started with https:// then call FlowBoost with some simple JS code to remove the leading https:// and return the value.  You'd then (in the Marketo webhook configuration) map the output to a field that you'd subsequently use in your emails.

 

The webhook payload would be like this:

urlWithoutProtocol = {{lead.URL with protocol}}.replace(/^https?:\/\//,"");

 

Cheers

Jo

SanfordWhiteman
Level 10 - Community Moderator
You don't need a new field. Use Velocity – there was a thread discussing this exact topic on the past week.

Permanently altering the field isn't possible using Velocity, nor with Change Data Value. You need a webhook-compatible service to do that.
ashah123
Level 3

Thanks @SanfordWhiteman @Michael_Florin for your insights.

 

Yes, we discussed this earlier, but in this case our snippets are used across multiple nurture campaigns. That means the Velocity script would need to sit at the parent level, and we’d still have to manually map the lead field in each program. So we started considering a long-term fix by creating a new field—if there’s a way to remove the “https://” and store the clean value , but as you mentioned it wont be possible via velocity but could be via webhook compatible service .

ashah123_0-1765538506792.pngashah123_1-1765538513873.png

 

Your solution is great and we’ll use it going forward; I just wanted to check if there’s any way to achieve this specific requirement as well.

 

Regards,

Akshat