Tokens by Dynamic segmentation on landing pages instead of lead values

mkmarketo1
Level 2

Tokens by Dynamic segmentation on landing pages instead of lead values

I am looking to create a velocity script that assigns token value by page segmentation instead of lead segmentation. So for example, I want to assign a different token value based on language segment. The reason I do not want to use lead segmentation values is not all leads are cookied and may not have values. 

 

How can I segment dynamical in velocity script by page segmentation?

4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

Re: Tokens by Dynamic segmentation on landing pages instead of lead values

Can you explain your goals at the business level so as not to get bogged down by an XY Problem?

 

Page segmentations (i.e. runtime segmentations with the segmentname=segmentvalue in the URL) don’t naturally create anything that’s visible in Marketo.

 

You can detect the query string in a Visited Web Page trigger and update a lead field accordingly, then use that lead field in Velocity.

 

But I’m not really clear about your goals.

mkmarketo1
Level 2

Re: Tokens by Dynamic segmentation on landing pages instead of lead values

I want to insert a different link based on landing page language. 

 

For instance, ?language=english I want to show english link

For, ?language=spanish I want to show spanish link

 

Want to do this via velocity token, not update manually 

Jo_Pitts1
Level 10 - Community Advisor

Re: Tokens by Dynamic segmentation on landing pages instead of lead values

@mkmarketo1, insert a different link where?  An email CTA?

SanfordWhiteman
Level 10 - Community Moderator

Re: Tokens by Dynamic segmentation on landing pages instead of lead values

It’s not clear why you’d need Velocity to insert an already-URL-safe* {{lead.token}} into a URL, but if you do want to use Velocity, just check off the field on the right-hand-side of Script Editor and drag it to the canvas

 

 

* the words “english” and “spanish” only use nonreserved ASCII letters, so they can go right in a URL