Targeting Rules Usage Notes

Prev Next

The usage notes below should help you understand targeting rules in TAP. Also see: Content Targeting and Content Access.

  • Use caution and good logic when creating composite targeting rules; there are no validation checks to ensure your rules do not contradict each other.
  • When including and excluding (matching and not matching) items (such as days of the week, stations/episodes, or devices), bear in mind the differences between including/excluding all listed items and including/excluding all possible items that could exist. For example, if you want to include all device families except smart speakers, there are three ways to approach this:
    • Select "Match" for all device families except smart speakers.
    • Select "Not match" for smart speakers.
    • A combination of both: create a rule that selects "Match" for all device families except smart speakers, and another rule that selects "Not match" for smart speakers.
      The recommended method is (b). Here's why:
    • Option (a), selecting "match" for all device families except smart speakers means the targeting engine will only target the selected items (which in this case includes "unspecified"). It will not target unknown devices that are not included in the list of "match" items, and it will not target any new device family items that are added to the system after the rule is created. Since your goal is to only exclude smart speakers (which by extension means include everything else), this rule does not meet your needs.
    • Option (b), selecting "not match" for smart speakers has no affect on what is included. All device families that the targeting engine encounters – even ones it does not recognize – are included except for smart speakers.
    • Option (c), combining both ("match" all device families except smart speakers and "not match" smart speakers) rules is unnecessarily complicated and redundant, and it comes with the same problems as described in option (a).

Using the JSON Editor

The JSON editor is intended for experienced API developers and practitioners. Do not attempt to use the JSON editor if you are not familiar with JSON formatting and the Triton Digital Booking API.

The JSON editor provides direct access to the underlying JSON (JavaScript Object Notation) code that defines targeting rules in the Triton Digital Booking API. This can be useful for seeing the underlying values and dimensions, such as when you want to discover a specific program or episode ID. It can also be used by experienced coders to insert rules from their own templates.

To access a rule's JSON code, select Switch to JSON editor in the "..." options menu on the right side of the targeting type label.

The rule opens in the JSON editor. (If you have not already created a rule, the JSON editor window will be empty.)

To switch back, select Switch to UI editor in the "..." options menu.

Editing JSON

  • Changes to the code are validated as you type.
  • Valid JSON does not necessarily mean the rule is valid.
  • If you enter invalid JSON, a warning appears at the top of the JSON editor. You cannot return to the UI editor until you have fixed the JSON error.
  • If you cannot resolve the JSON error, you can abandon the rule by moving away from the Flight editor (e.g., return to the Flights list, or to the Campaigns list). You are asked to confirm you want to leave the page. When you leave the page, changes to your targeting rule after your last save are abandoned.
  • If you create an invalid rule that uses valid JSON, then switch back to the UI editor before you save the flight, the result is unpredictable. You will likely see a blank screen; refresh the page to return to the flight. You might end up with a rule that prevents delivery, or the invalid rule might be deleted.
  • If you create an invalid rule that uses valid JSON, then try to save the flight while still in the JSON editor, in most cases the invalid rule is flagged and the flight is not saved. *

 * TAP will catch rule errors such as using invalid values, but it won't necessarily catch logical errors such as including and excluding the same value. Use caution when coding targeting rules in JSON.