Using calculated metric with custom attribution window in segment builder | Community
Skip to main content
Level 2
February 11, 2025
Solved

Using calculated metric with custom attribution window in segment builder

  • February 11, 2025
  • 2 replies
  • 1848 views

I'm trying to use a calculated metric within the segment builder, and it's not showing up. I can see the metric in the calculated metrics section, and in workspace, but it does not show up in segment builder. I suspect it might have something to do with the fact that it uses a custom lookback window.

The reason I'm trying to use this metric in a segment is because of an issue with lookback windows. We were using a visitor container in a segment and it was causing lots of inconsistency in our reporting when we pull different date ranges. So we changed it to visit window and it was too narrow. So we were trying to split the difference with a custom 90-day lookback window on this metric.

Best answer by Jennifer_Dungan

Unfortunately, calculated metrics cannot be used in Segments...

 

Maybe if you explain what you are trying to achieve, we might be able to help find a solution to create the segment you need.

2 replies

Jennifer_Dungan
Community Advisor and Adobe Champion
Jennifer_DunganCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
February 12, 2025

Unfortunately, calculated metrics cannot be used in Segments...

 

Maybe if you explain what you are trying to achieve, we might be able to help find a solution to create the segment you need.

Level 2
February 12, 2025

Thank you both for the responses. I'm trying to exclude customers from this segment. In this case, we have an event created for logins to our app. In the past, a visitor container was being used to exclude the most people possible, so that they'd be excluded from subsequent visits after having logged in recently. However, this was wreaking havoc on the data consistency since visitor containers adjust the lookback window depending on the date range. 

 

For example, for the month of January 2025, the number of visits was significantly different for the date range Dec - Jan than it was for Sep - Jan. My understanding is that this was because of the visitor container within that segment. We cannot have that much inconsistency when pulling the data with this segment.

 

So I tried a visit container instead, and it was too narrow. There were far more visits that came through than with the visitor container. So I tried to find a middle ground by creating a calculated metric that used a custom attribution model (last touch, 90 day window) whose lookback window was a consistent length.

 

I'm now understanding that my custom metric cannot be used in a segment. Any other ideas for using custom attribution models in a segment? Or for how to address this broader problem I'm dealing with?

Level 2
February 13, 2025

Hi @mitchhowell ,

If my understanding is correct, what you are trying to create is a logic to exclude the post-login hits from the visitors while keeping the hits pre-login for same visitors. So, something like below,

If that is the case then I think this can be achieved through include configuration in a sequential segment.

So here's the segment that you'll create,

This is how this segment works, the sequential logic with include after configuration returns only the hits after the user's first sign hit, then using exclude option we exclude all these hits and thus we are left with visitors entire history upto first sign in hit. You can compare the include options as below,

Now when you use this segment in reporting, as we are excluding hits after the first sign in of the users you can expect two types of results,

  • Different reporting period keeping start day will return same visitor count - This happens because the report start day stays same so their first sign in during any period starting with a particular start day will not change
  • Different reporting period with changing start day may return different visitor count - This happens because as the report start date changes, based on that their first sign in during the report period may have happened on a different hit change and it is expected

This can be validated in below reports if you look at Oct-24 data,

Hope this is helpful.

Cheers!


I hadn't thought about using a sequential segment! This one could be useful, but the problem of date range affecting the data inconsistently is still too problematic for us. This is for a segment that will be used by a large team of people, so we need it to be consistent, regardless of the reporting range. 

 

The idea is to exclude any user who has logged in, ever. That would be ideal. And that's probably exactly the use-case for a visitor container, it's just that I can't accept the tradeoffs in this case. 

Sukrity_Wadhwa
Community Manager
Community Manager
February 25, 2025

Hi @mitchhowell,

Were you able to resolve this query with the help of the provided solutions, or do you still need further assistance? Please let us know. If any of the answers were helpful in moving you closer to a resolution, even partially, we encourage you to mark the one that helped the most as the 'Correct Reply.'
Thank you!

Sukrity Wadhwa