Recipes
Decision based on Meta Tags
What you'll build
You will learn how to use a Surface component workflow to read meta tags and make decisions based on it. If your page is served via a MonetizationOS Proxy, meta tags from the origin HTML are included automatically in the Surface Decisions API request.
1. Prerequisites
- You will need a Component Workflow in a Surface
2. Add a component
const : = async ({ }) => {
const = ..?.("beyond Earth");
return {
: {
: true,
: [
{
: "html",
:
? "<h1>Meta Tags match</h1>"
: "<h1>Meta Tags do not match</h1>",
},
],
},
};
};
export default ;Result
A response will be returned based on whether the meta tags match.