Answers about cql
Questions and answers from the Croct community about cql.
How do I build an audience based on where the visitor came from?
I want a tailored landing message for visitors arriving from a particular external site. I am not sure whether I should be reading the referrer or the…
Which variant wins when a visitor matches two audiences on the same slot?
I have two experiences on one slot, and their audiences can both match the same visitor. I would rather not leave the outcome to chance. How does Croct decide…
Personalize a PDP hero from what the shopper viewed earlier in the session?
On my Hydrogen store I want the product-page hero to reflect what a visitor browsed earlier in the same session. For example, if they kept looking at pages in…
Custom attribute set with custom. but my CQL condition never matches
I write a custom profile attribute from my Vue app like this: Then I reference it in a CQL condition for an audience, and the audience never matches. The…
Can I pass a value into croct.evaluate instead of hardcoding it in the query?
I am calling evaluate from client code and I want to reuse one query across a few thresholds without string-concatenating numbers into the expression: Is…
I set a value with session.edit but my CQL still reads nothing, why?
at the start of a visit I write a plan value and then I want an audience to read it back, but the condition never resolves the way I expect. What I tried:…
Targeting a Sanity landing page by country, which signal do I match?
I want visitors from one country to see a different hero on one of our Sanity landing pages. What I am not sure about is which signal I match on, and whether…
How do I gate a feature in a server component based on a CQL condition?
i have a promo block I only want to show returning visitors, and I want that decided on the server so there is no hydration flash where the wrong version…
How do I build an audience of people who already submitted our HubSpot form?
quick one. submissions from our HubSpot forms are coming into Croct now and I want to stop showing the lead magnet to people who already filled it in. instead…
Can I match any campaign whose name contains "sale" without listing them all?
We spin up a lot of campaigns and the names all include a keyword, for example everything with "sale" in it. I do not want to reopen an audience and add a new…
Targeting returning shoppers on Hydrogen, which CQL condition is right?
I want to show a different homepage module to shoppers who have been to the store before versus first-timers. I have been poking at the CQL and I am not sure…
Which CQL attributes exist for B2B targeting like company and job title?
Building account-based experiences for a B2B analytics SaaS. In our CRM I have these fields per contact: company, job title, industry, company size, buying…