All questions

Show a different Storyblok promo block to visitors from a specific campaign

Asked by rafa.costa on

Rrafa.costa

Running paid campaigns that land on a Storyblok page and I want the promo block to change for people arriving from one specific compaign. I got as far as this in the audience editor and then got stuck on which fields map to the UTM params:

campaign is "spring-sale" ...?

Which CQL variable is the campaign name, and how do I match source or medium if I want to be more specific?

Was this helpful?

2 answers

Ssam_okoroAccepted answer

The variable is campaign and it exposes the UTM params as sub-fields. For a single campaign you want the name:

campaign's name is "spring-sale"

And if you want to narrow by traffic type:

campaign's source is "google" and campaign's medium is "cpc"

You attach that audience to the experience serving the promo block's slot, and it is evaluated in real time on each interaction. The nice part is undefined variables evaluate to false, so anyone who arrives with no campaign simply does not match and sees the default block. There is a slightly fuller example in building a UTM campaign audience.

Was this helpful?
Rrafa.costa

matched on the name, promo swaps correctly for the campaign traffic and everyone else gets the normal block. exactly what I wanted, thanks

MRMarta Ruiz

If you run several campaigns that should all see the same promo, use matches on a naming convention instead of an exact name, for example campaign's name matches "sale" to catch spring-sale, summer-sale and so on. Saves you rebuilding the audience every launch. Whatever falls outside it keeps the published Storyblok content as the fallback.

Was this helpful?
Still have questions?