Rate Your Experience

What is the Key Values App?

Modified on: Thu, 1 Dec, 2022

Jump To:

What is a Key Value Pair?

Setting up Keys

Adding Values

Adding Rules (Optional) 


Our Key Values app allows you to set specific targeting parameters for your direct ad orders! If you have a direct agreement with an advertiser tied to a specific page or set of pages, then this is the app for you!


What is a Key Value Pair? 


A key is an identifier used to extract information about the content on your page, which can be used to display content specific advertisements based on the tags present in your code. When the Ezoic systems see the tags you specify, they will output the appropriate .setTargeting() calls to target the ad slots based on your values. 


For example, if you were writing a new set of articles about the latest smartphone generation, you may want to sell the ad slots on those articles to a smartphone manufacturer. You could then use the Key Value app to tell Ezoic which pages should display those ads. So here you could have a meta tag identifying these articles in the smartphone category, like this:   

You can create up to 6 unique keys and each key can have up to 1,000 predefined values.

 

Setting up Keys


Once you have installed the Key/Value app, your first step is to add keys. To access this and create or add a key, go to Ezoic Ads > Ad Positions > Advanced > Key Value Settings > Add Key. 

image



Each key corresponds to a group of possible values to be used to target ads. This could be an article category or sponsored page, or any number of other things.


First, you must decide which kind of key to use. We support tags, custom  tags, or calls to .setTargeting(). You can select a key type by using the drop down menu:

image

  

You'll also see the option for an Ezoic tag type. Here, Ezoic generates a meta tag for you. You'd just insert the value you require and plug insert the tag onto the page.

image


Note that in the table, the Key Name field is the key name from DFP that will tell it to serve the custom ads. The Element Name is the name of the corresponding tag in your source code. 

 

Adding Values


Once you have your keys set up, you need to tell us the possible values for those keys. Add all possible values, one per line, with an optional human-readable label.

image

Adding Rules (Optional)

 

Sometimes, you may want to always show or hide certain ad placements based on the Key/Value parameters. This can be accomplished via rules that are created to apply to placeholders in the Ezoc Ads/Ad Tester app. 


When a rule condition is met on a page and you have applied a rule to one or more placeholders, Ezoic will display or hide those specific placeholders depending on the “hide/display” setting you choose. A rule is a combination of key value pairs. Depending on your combination type selection, a rule can be satisfied when either all the added values are present or when at least one of the added values is present.


To create the rules, go to Ezoic Ads > Ad Positions > Advanced, and click on 'Key Value Settings'. Click on 'Settings' and select the “Create New Rule” button. From here, select the keys and values that should trigger this rule. Once you’ve set up how the rule should work, save it, and add any other rules you would like to use. Always make sure to save! 

imageimageimageimageimage


Finally, you need to assign the rules to the Ad Placeholders you’d like to control. Choose the Ad Placeholder and go to the edit form. Once you have created a rule, go to 'Settings'. From here, select 'Apply' to apply the rule to specific placeholders.

image

Alternatively, you can also apply these rules on a per placeholder basis. Simply go to your placeholder list and select the edit option. 

image

From here, you should find a Key Value Rules section to navigate to. 

image

Once here, you can select which rule(s) you would like to apply to that specific placeholder. 

image

 

Once your keys and values are set up, the corresponding ad slot will be included/excluded based on your rules (if any), and we will call setTargeting (key, value) on that page with the Key Name and Value of the triggered key.



Loading ...