How to use frequency and recency on Segments created using onboarded trait?




How to use frequency and recency on Segments created using only onboarded traits?

You cannot apply recency and frequency on segments that are created wholly from onboarded trait.

In order to apply recency and frequency to such segments, you can use this work around:

1. Create a rule based trait to capture all, with this expression h_referer matchesregx  .*
Do not use activity trait that is by default available to capture all devices.

2. Then add this rule based trait to your segment with an AND condition and you will be able to apply recency and frequency on that.

You can test the recency and frequency of segment qualification using Visitor Proffile Viewer or can test that using d_cts=2 flag in DCS api calls to confirm segment qualification.


Varun Kalra





Hi Varun,

We have the same scenario where we use browse trait to set frequency and recency along with onboarded trait. But the results look same for frequency 2 vs frequency 5. We don't find any difference in the real-time qualification between these two segments. Both the counts look similar.



But if we use the frequency and recency without onboarded trait, we found an optimal difference between the real-time realization counts.

Please explain what could be the cause of this.







Hi Keerthi,

I think, we might need to add some more variations here to make this work.

Current Scenario:

If you are using an onboarded trait with AND condition, and are using rule based trait to catch all. That rule based trait will catch and count all occurrences of visitor on the site or wherever your AAM code is present.

So, any visitor if their total number of page visits (any page) reaches 5 times or more (which is very likely to happen) will qualify for both the traits. As it is possible for any visitor to visit at least 5 pages or refresh a page multiple times.

That could be the reason you are getting similar results.


Instead of catch all trait, create a trait that is more specific to that page or interaction. For example, whoever has visited a particular site section capture that in AA variable and create a rule based trait out of that.

Like create a rule trait for specific pages or interactions:

c_pagename == clothing

c_event == event1

Then, you can use the onboarded trait in segment with AND condition, and apply recency & frequency on above trait.


Varun Kalra