Google Tag Manager

Forum Discussion

bimmaa's avatar
bimmaa
Supporter
22 days ago

Comparing canvas entry property with property in follow up event

Hello,

I am currently working on a canvas that needs to send an e-mail to a customer, if that customer has visited 5 pages on our website, that all have the same category.

My first idea was using the entry criteria of User has viewed page 5x, but I would like to add to that criteria that for the 5x the customer has viewed, the 'category' property on that Page Viewed event is the same.

Any ideas on how to implement this?

4 Replies

  • Thanks for both replies, when I get to implementing I will confirm if it worked!

    • bimmaa's avatar
      bimmaa
      Supporter

      The problem for the first solution is that we have a lot of categories (football platform, every team is already a category), So writing either the condition step or liquid would've been quite a lot of work. As for the second proposed solution we have a data pipeline that does not allow for a step of this kind of aggregation unfortunately. We decided to go with a custom SQL trait on a profile using a CDI integration with Braze. This way we have full control over for whom and when this property shows up instead of relying on triggered events. Again thanks for the suggestions!

  • gsutton's avatar
    gsutton
    Collaborator

    Hey Bimmaa, 

    If I'm understanding your question correctly, there should be a way of accomplishing this with everything you currently have going into Braze (so long as you have an event with a property of the category). 

    Create a journey that triggers off of your page view event, and from there use a profile update step to add a new custom attribute with a +1 counter. If you have multiple page categories, then you should be able to use liquid within the update step to say "If category = X" then update X attribute + 1. If it's easier, you can also use a condition step before the update step (to avoid liquid) to check for the page category—you'd just have multiple profile update steps, one for each page category. All the same idea though. Attribute + 1. 

    The idea, of course, being that every time they view the chosen page category, the custom attribute counter goes up +1. 

    In conjunction, you'd have another canvas that triggers off of custom attribute change, where the # of whatever category is greater than 5. 

    That should be it! Good luck!


  • Hello bimmaa​ This is little tricky as you will need an external platform (GTM) or a CDP do to event aggregation and then pass on that information to Braze.

    Other option is to create a custom event with category name it category_viewed_<category_name> . Then you can use the aggregation on this event type of each category. But this option will be difficult to manage for long term and might not be scalable if you have 100s of categories.