Parsing campaign codes from referrer URLs

Prakash_Mohanda
Level 2

Parsing campaign codes from referrer URLs

Has anyone here extracted a part of a URL for anything in marketo.

for example if a referred URL has src=blah within it as part of the URL . I want to parse out 'blah' and put it in a field.

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Re: Parsing campaign codes from referrer URLs

Has anyone here extracted a part of a URL for anything in marketo.

Yes, all the time.

for example if a referred URL has src=blah within it as part of the URL . I want to parse out 'blah' and put it in a field.

src=blah is a query parameter.

In this case, the string "src" is the query param name, and the string "blah" is the query param value.

If the person fills out a form with such a query param in the URL, you can automatically parse "blah" into a Marketo field. This is the Marketo Hidden field AutoFill feature available on all Marketo forms.

If you're talking about outside of a Filled Out Form activity, that is, just visiting the web page, you'll need to pass the {{Trigger.Web Page}} token to a webhook in order to do the equivalent parsing back to lead fields.

I suggest you do some reading on UTM tracking and such. Tons of posts here on the Community.

Anne_Angele1
Level 4

Re: Parsing campaign codes from referrer URLs

It definitely sounds like you want to use UTMs - if you give us a use case, we might be able to provide a little more specific direction!