cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Session Property Cleanup rule

mkulov
Organizer

Hi,

I am trying to set session property when specific query parameter string matches one of two options.

Let say the query parameter can contain string OptionA, OptionB, or anything else.

I want to create cleanup rule that will clean everything else but OptionA and OptionB within the string.

The goal is to have the session property set only when query parameter contains either OptionA or OptionB. For any other values - the session property should not be set.


Do you if this is possible with some regex cleaning rule?

If so - any tips how to do that?


Thank you,

Martin




Digital Performance Optimizer
2 REPLIES 2

wouter_camps
Guide

Hi,


I don't know whether this is possible using Session Property clean up rules (if so, i'd like to know :).


If you don't mind defining a request attribute at the environment level (so not the application level), I think you should be able to implement what you're looking for using a request attribute based session property.


via Settings -> Server-side service monitoring -> Request attributes -> Define a new request attribute


fill in the 'Request attribute name' e.g 'OptionA_or_OptionB'

click "Add new data source"

select "Web request URL query parameter" (below description 'Specify where the attribute is captured and then stored')

fill in the 'Parameter name'

click/pull down 'Further restrict or process captured parameters (optional)'

fill in 5. Extract value from captured data per regex:

(OptionA|OptionB)

Save


At the application level, add a "Custom defined property"

select expression type 'Server side request attribute'

select 'Request attribute name' -> 'OptionA_or_OptionB'

click 'Store as session property'

Save property


Hope this was helpful,

Kind regards,

Wouter

Hi Wouter,


Indeed I ended up with request attribute instead.


Thank you,

Martin

Digital Performance Optimizer

Featured Posts