Google Tag Manager

Forum Discussion

kwitt's avatar
kwitt
Active Member
3 months ago

Selections: Advanced

Hi there, 

I am creating some selections on my catalogs. 

I noticed that you can only pick EQUALS or DO NOT EQUAL as the criteria. This seems very very limited. Is there a workaround that I can add "contains"? Or is there any plans to change this?

For instance, I would like to say voucher_id (ad_fr_1234 or ad_de_1234 or ad_es_1234) CONTAINS language (fr, de, es). Right now I don't have a language/country column but the info is within other columns at the moment. 

Another thing I would like to have start_date (2023-12-03T23:00:00Z) is todays date. Since the format of my date (2023-12-03T23:00:00Z) includes the time, I don't really know how to do this. I would have done:

start_date CONTAINS {% assign date = "now" | date: "%Y-%m-%d"%} {{ date }}

But the time is an issue. And of course I can't see "CONTAINS" as an option.

A workaround could be compare the first 10 character (2023-12-03T23:00:00Z) to {% assign date = "now" | date: "%Y-%m-%d"%} {{ date }} but I'm not sure how to do that either?

 

 

  • Manoj__'s avatar
    Manoj__
    Specialist II

    Hello kwitt Unfotunately, These advance selections are not available in the platform for now.

    But you can use the liquid to apple these conditions in the email content itself.

    Here is what you can do in email with liquid.

    For language:

    {% if {{items[0].country}} contains 'fr' %} Do this {% else %} Do that {% endif %}



    For start date:

    {% assign today = 'now' | date: "%Y-%m-%d" %}
    
    {% assign catalogStartDate= {{items[0].start_Date}} | date: "%Y-%m-%d" %}
    
    {% if today==cataglogStartDate %} Do this {% else %} Do that {% endif %}



  • rayelkho's avatar
    rayelkho
    Practitioner III

    kwittThe API endpoints may be a better route. Not sure if that will help you here but I feel like it has a bit more capability and you can use JSON. 

    https://www.braze.com/docs/api/endpoints/catalogs/catalog_selections/asynchronous/post_create_catalog_selections

    It is in early access but worth a shot