SOLVED

Custom String Field vs Custom URL Field

Go to solution
Angus_McCann1
Level 3

Custom String Field vs Custom URL Field

We are capturing a personalized cart abandon URL for a cart abandon email and passing it into a field in Marketo.


My question is do I populate it into a URL field or a String field? Is one better than another for a specific reason? I know when populating a link via a token, in order to have the reporting register the token as a link, we need to leave the protocol (http:// or  https://) outside of the value in the token.

 

Does capturing the URL in a URL field circumvent this? Do we need to leave off the protocol? Etc I'm just struggling with what the difference is between the URL field and a string and the doc isn't very clear on that.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Custom String Field vs Custom URL Field

If you wish to store only urls in this custom field then I would suggest using URL datatype as with the URL datatype you may store the protocol and use the token for same without pre-appending the protocol like string field. Also the string field has the character limit of 255, this might be bottleneck for larger urls.

 

View solution in original post

SanfordWhiteman
Level 10 - Community Moderator

Re: Custom String Field vs Custom URL Field

Hard disagree.

 

You should be using a Textarea field.  URL fields are limited to 255 characters. They are suitable for hostnames but not entire URLs. I wrote a whole blog post about this a few years ago: https://blog.teknkl.com/real-world-marketo-field-limits-2-urls/

View solution in original post

10 REPLIES 10
Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Custom String Field vs Custom URL Field

If you wish to store only urls in this custom field then I would suggest using URL datatype as with the URL datatype you may store the protocol and use the token for same without pre-appending the protocol like string field. Also the string field has the character limit of 255, this might be bottleneck for larger urls.

 

Angus_McCann1
Level 3

Re: Custom String Field vs Custom URL Field

Awesome! Thank you so much! That's exactly what I was looking for!

Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Custom String Field vs Custom URL Field

Anytime 😉

 

SanfordWhiteman
Level 10 - Community Moderator

Re: Custom String Field vs Custom URL Field

@Angus_McCann1 look at my updates here, they're very important.

SanfordWhiteman
Level 10 - Community Moderator

Re: Custom String Field vs Custom URL Field

Hard disagree.

 

You should be using a Textarea field.  URL fields are limited to 255 characters. They are suitable for hostnames but not entire URLs. I wrote a whole blog post about this a few years ago: https://blog.teknkl.com/real-world-marketo-field-limits-2-urls/

SanfordWhiteman
Level 10 - Community Moderator

Re: Custom String Field vs Custom URL Field


may store the protocol and use the token for same without pre-appending the protocol like string field.

Incorrect, this only results in an untracked link.


Don't know where this myth came from.

Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Custom String Field vs Custom URL Field

I got it from this official documentation where in it clearly states that URL field can store protocol as well. I am sure that you are right as I might have been seeing the wrong doc altogether! 
apologies for the confusion.

 

SanfordWhiteman
Level 10 - Community Moderator

Re: Custom String Field vs Custom URL Field

A String field can hold an entire URL including the protocol or not.

 

The only thing (and it's meaningless) a URL field offers - but only in some contexts - is built-in validation of the URL-like syntax. But anyone can do the same or better validation in client code.

 

The ability to store a URL is never said in the documentation to do anything for tracking.

Angus_McCann1
Level 3

Re: Custom String Field vs Custom URL Field

@SanfordWhiteman So if the link is being generated by a third party WITH the protocol and pushed into our instance with a native integration (as in we cannot intercede and remove the protocol) how would you go about tracking link clicks in an email? Or is there a way that we can remove the protocol?