1. Help Center
  2. Monetizing Firework with Ads

Targeting capabilities: Passing key value pairs to Firework

Learn how to append key-value pairs using Google Ad Manager.

Using key-value pairs allows you to set specific targeting for video advertising campaigns, such as demographics, certain positions on a webpage, or a particular page or pages on a given topic.

Good to Know:

Firework is compatible with every ad server capable of delivering VAST tags, however, in this article we will only discuss how to append key-value pairs using Google Ad Manager (GAM).

How to target key values:

Using Firework player you can target key values using the attribute vast_attrs.

1.  Identify the key-value pairs you want to append to your Firework Embed Code. When a key has multiple values, use a comma (,) to separate the values. In this example, we use the key-value pairs:
section=blog and anotherKey=value1,value2
2.  Combine all key-value pairs with an ampersand (&).
section=blog&anotherKey=value1,value2

3.  Encode the following characters:

section=blog&anotherKey=value1,value2

4.  Set the value as the cust_params= attribute.

 cust_params=section%3Dblog%26anotherKey%3Dvalue1%2Cvalue2

5.  Add the "&" character to the beginning in the tag.

&cust_params=section%3Dblog%26anotherKey%3Dvalue1%2Cvalue2

6.  Add the quotation marks to the beginning and end in the tag.

"&cust_params=section%3Dblog%26anotherKey%3Dvalue1%2Cvalue2"

7.  Add vast_attrs= attribute to the beginning in the tag.

vast_attrs="&cust_params=section%3Dblog%26anotherKey%3Dvalue1%2Cvalue2"

8.  Add the value to the original Firework Embed Code.

<script async src='//asset.fwpub1.com/js/storyblock.js'></script>
<fw-storyblock
channel="XXXXX"
playlist="XXXXX"
autoplay="true">
</fw-storyblock>

9.  Append the attribute vast_attrs:

<script async src='//asset.fwpub1.com/js/storyblock.js'></script>
<fw-storyblock
channel="XXXXX"
playlist="XXXXX"
autoplay="true"
vast_attrs="&cust_params=section%3Dblog%26anotherKey%3Dvalue1%2Cvalue2
">
</fw-storyblock>

Good to Know:

When the Firework Embed Code runs on your website, any given key-value pairs which were specified using  vast_attrs are going to be parsed to your Google Ad Manager account.

If you have any questions during this process, please reach out to your account team at Firework or email publisherteam@fireworkhq.com.