How to set up SONAR macro using Google Ad Manager (GAM)

In order to use the predictions from Viously, you will need both an access to your HTML code and your GAM account.

Insert the macro in your VAST

If you are already inserting data through your web pages, simply add the %%SONAR%% macro inside your HTML code like this :

<div class="vsly-player"  data-template="MY_TEMPLATE_ID" data-vast-booster-custom-macro="&cust_params=my_already_existing_custom_id1%3Dmy_already_existing_custom_value1%26%%SONAR%%" data-vast-adserving-custom-macro="&cust_params=my_already_existing_custom_id2%3Dmy_already_existing_custom_value2%3d%%SONAR%%" id="MY_VIDEO_ID" style="background:#ddd;padding-top:56.25%;font-size:0;position:relative;overflow:hidden;width:100%;"></div>

If you are not inserting data through your web pages, simply login to Viously platform and go to your VAST setup here. Then add the macro directly in your VAST url using the Google cust_params special key.

https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&output=vast&unviewed_position_start=1&env=vp&cust_params=%%SONAR%%

Setup your VTR key value

  1. Go to https://admanager.google.com/
  2. In the left menu, go in Inventory then Key-values
  3. Click on the New key-value button
  4. Complete the form :
    1. Name: vsl_vtr_d5
    2. Display name: vsl_vtr_d5
    3. Value type: Predefined
    4. Report on values: Include values in reporting
    5. In Targeting values, click on New values button
      1. In this new form, add 65 and click save.
      2. Increment by 1 and repeat this operation until 100
    6. Repeat this form with name :
      1. vsl_vtr_d10
      2. vsl_vtr_d15
      3. vsl_vtr_d20
      4. vsl_vtr_d25
      5. vsl_vtr_d30
      6. vsl_vtr_d35

You should have something like that :

Setup your MRC key value

  1. Go to https://admanager.google.com/
  2. In the left menu, go in Inventory then Key-values
  3. Click on the New key-value button
  4. Complete the form :
    1. Name: vsl_mrc
    2. Display name: vsl_mrc
    3. Value type: Predefined
    4. Report on values: Include values in reporting
    5. In Targeting values, click on New values button
      1. In this new form, add 65 and click save.
      2. Increment by 1 and repeat this operation until 100

You should have something like that :

Setup your CTR key value

  1. Go to https://admanager.google.com/
  2. In the left menu, go in Inventory then Key-values
  3. Click on the New key-value button
  4. Complete the form :
    1. Name: vsl_ctr
    2. Display name: vsl_ctr
    3. Value type: Predefined
    4. Report on values: Include values in reporting
    5. In Targeting values, click on New values button
      1. In this new form, add 0.1 and click save.
      2. Increment by 0.1 and repeat this operation until 2

You should have something like that :

Targeting the key values

  1. Go to https://admanager.google.com/
  2. In the left menu, go in Delivery then Line items
  3. Select your line item then go in Settings
  4. Scroll until Add targeting then click on Custom targeting
  5. You can now add your condition for vsl_vtr, vsl_mrc or vsl_mrc

Here are a few example of targeting :

  1. vsl_vtr :

  2. vsl_mrc :

  3. vsl_ctr :

SSP Documentation

If you need assistance in creating key values in your SSP to use these macros, refer to the following documentation:

For any queries or assistance, please reach out to [email protected].