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

Keyword from meta content

tabpws
Frequent Guest

Hi - I wanted to check the url www.football.com.au and ensure the keyword of "football" from the meta content is there. I have been told to configure the post-execution script but Im not exactly sure on what code to put in there. Any examples would be great

1 REPLY 1

HannahM
Dynatrace Leader
Dynatrace Leader

Something like this should work:

var body = response.getResponseBody();

if (body.match(/<meta(.*football.*)>/g)) {
api.finish();
} else {
api.fail("Football not mentioned");
}

Synthetic SME and community advocate.

Featured Posts