For a Visit Web Page trigger, how do you match multiple querystring conditions with AND logic? | Community
Skip to main content
Level 4
June 29, 2017
Solved

For a Visit Web Page trigger, how do you match multiple querystring conditions with AND logic?

  • June 29, 2017
  • 1 reply
  • 5902 views

We have some campaigns where we want to add multiple constraints on the SAME field. Is this possible?

For example, imagine I have a Visit Web Page trigger that matches a certain URL and has a constraint for querystring. Perhaps my constraint is querystring contains utm_campaign=promo1. This works well.

However, how would I make a trigger that only matches a querystring that contains BOTH utm_campaign=promo1 AND utm_term=specificTerm? This is just an example, but matching on multiple contains is necessary in scenarios where we can't control the order of parameters we're matching on, or when the parameters might be split up in the URL.

I chatted with support and they told me that selecting multiple values had AND logic, not OR logic, but I tried it and that wasn't true. The tooltip also said that ANY of the values I selected would be matched, so the chat agent was definitely wrong.

Thanks!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

You don't actually need a faux (additional) page view, you can change the state of the initial page view. Rearrange (or totally preprocess) the query parameters before you call Munchkin.init(). Then you'll have everything in the right state to be caught by the standard trigger.

Another approach is to encode the query string as-is in the hash, then pass {{Trigger.Web Page}} to a webhook to do the heavy lifting. Pre-filter so you only send interesting hits to the webhook (i.e. if the query string contains utm_campaign, then call the webhook to see what else it contains). This is something you can do quite easily using FlowBoost, if you're interested.

1 reply

Nicholas_Manojl
Level 8
June 30, 2017

You're right, it's definitely going to match any value (OR) if you set it up like that.

Short of writing the values to the lead record I am out of ideas on this one.

Jon_WuAuthor
Level 4
June 30, 2017

Yeah writing values to the lead wouldn't work super well with tons of events pouring in :/ but that's an interesting idea.

If there's no way inside Marketo to match like that, it'd almost be easier to detect it in JavaScript, then fire a faux page view that could be detected, but that's obviously not ideal due to the maintenance and coding overhead.

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
June 30, 2017

You don't actually need a faux (additional) page view, you can change the state of the initial page view. Rearrange (or totally preprocess) the query parameters before you call Munchkin.init(). Then you'll have everything in the right state to be caught by the standard trigger.

Another approach is to encode the query string as-is in the hash, then pass {{Trigger.Web Page}} to a webhook to do the heavy lifting. Pre-filter so you only send interesting hits to the webhook (i.e. if the query string contains utm_campaign, then call the webhook to see what else it contains). This is something you can do quite easily using FlowBoost, if you're interested.