Expand my Community achievements bar.

SOLVED

Regular Expressions in Audience Manager

Avatar

Level 3

Hi,

I was trying to create a regular expression for a trait in c_products ^\;(.+)\;(.+)\;([1-9][0-9]{0,2}\.[0-9][0-9]|1000)\;(.+) that viewed any product under $1000.

When I test this in the Analytics Classification Rules builder it works but how come Audience Manager isn't picking anything up?

1 Accepted Solution

Avatar

Correct answer by
Employee

Hey stenebro​,

There is a easy way to validate the regular expressions and also the trait rule itself, without having to wait. In the Audience Manager UI, in the Trait Builder tab, you will see a "Test Event" section.

You can enter a URL there, containing the desired signals (key/value pairs) and click "Test" to see if the trait matches. The "Test Event URL" would something like this for your sample:

See screenshots below and let me know if it works.

Screenshot 2017-09-06 15.58.36.png

Screenshot 2017-09-06 15.57.54.png

Cheers,

Constantin

Computer Scientist | Adobe Audience Manager | Adobe

View solution in original post

7 Replies

Avatar

Employee

Hi stenebro​,

Could you please share some sample values that you are sending for this key (c_products), which should match the regex you presented?

Cheers,

Constantin

Computer Scientist | Adobe Audience Manager | Adobe

Avatar

Level 3

Hi,

Here's the sample:

;56781234;1;339.99;event1=0.00;evar15=test|evar21=regular|evar26=test|evar31=0%|evar51=test name : 56781234|evar52=lorem ipsum|evar58=0|evar64=internal search|evar119=false|evar78=test|evar80=test|evar96=339.99

Avatar

Employee

Thanks for the sample code stenebro​. I've investigated and the issue seems to be triggered by the trait rule itself. As you can see in the screenshot below, there is a trailing space in the regular expression. This means the regex processor expects the input value to end with a space (which might not happen in your case). You can go on the Audience Manager UI, go on the trait, edit its trait rule and remove the trailing space. Save the changes and give it a try.

Let me know if it works.

Screenshot 2017-09-04 17.24.04.png

Cheers,

Constantin

Computer Scientist | Adobe Audience Manager | Adobe

Avatar

Level 3

Hi Constantin,

Do you know of a way to validate regular expressions quickly?

It's painful to wait for 24hrs just to see that it didn't work have to redo it again.

I tried the Visitor Profile View tool but the trait that I created didn't even show up in the list so not sure if I want to go that route.

Avatar

Correct answer by
Employee

Hey stenebro​,

There is a easy way to validate the regular expressions and also the trait rule itself, without having to wait. In the Audience Manager UI, in the Trait Builder tab, you will see a "Test Event" section.

You can enter a URL there, containing the desired signals (key/value pairs) and click "Test" to see if the trait matches. The "Test Event URL" would something like this for your sample:

See screenshots below and let me know if it works.

Screenshot 2017-09-06 15.58.36.png

Screenshot 2017-09-06 15.57.54.png

Cheers,

Constantin

Computer Scientist | Adobe Audience Manager | Adobe