Usually, a publisher will set up a single survey line item that delivers surveys for all live measurements. However, a different approach may be necessary when a publisher needs

To address such use cases, Brand Metrics offers a per-measurement survey option.

Prerequisites

1. Create two new GAM Key-Value Pairs

A second dynamnic type which will allows measurementId input later

2. Set Up a Survey Line Item

3. Survey Creative Setup

Include the following code in the creative:

<!-- Track survey completion as a line item click -->
<script>
 window.top._brandmetrics = window.top._brandmetrics || [];
 window.top._brandmetrics.push({ cmd: "_addeventlistener", val: {
   event: "surveyanswered",
   handler: function(ev){
     var pixel = "%%CLICK_URL_UNESC%%";
     var img = document.createElement("img");
     img.setAttribute("src", pixel);
     document.body.appendChild(img);
   }
 } });
</script>

<!-- Script to select, render survey, and handle responses -->
<script async src="<https://cdn.brandmetrics.com/surveyinad.js>"></script>

Note: Using this creative, each time a survey is answered, the survey line item will register a click.

When Brand Metrics wants to trigger a survey, it will set a targeting-key in the ad request the following way:

brandmetrics-survey=**{{MeasurementID}}**