{# /** * Copyright (C) 2023 Xibo Signage Ltd * * Xibo - Digital Signage - http://www.xibo.org.uk * * This file is part of Xibo. * * Xibo is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * Xibo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Xibo. If not, see . */ #} {% extends "connector-form-edit.twig" %} {% import "forms.twig" as forms %} {% import "inline.twig" as inline %} {% block callBack %}sspFormOpen{% endblock %} {% block connectorFormFields %} {% set partners = interface.getAvailablePartners() %}

Xibo SSP Connector

work with world leading supply side platforms

Onboard with one of our supported SSP's, enter your API key and configure which displays you want to activate.
In most cases you will need to list your displays with the SSP and copy your SSP ID into the CMS.

Please note that your players will require HTTP access to https://exchange.xibo-adspace.com to receive ads from any SSP.

{% if partners is not iterable %}

{{ interface.getFormError() }}

{% else %} {% set numberOfAuthedDisplays = interface.getAuthorisedDisplayCount() %}

{% trans %}Your API key is authorised for {{ numberOfAuthedDisplays }} displays.{% endtrans %}

{% endif %} {% if not interface.isProviderSetting("apiKey") %} {% set title %}{% trans "API Key" %}{% endset %} {% set helpText %}{% trans "Your API key allows for secure communication between the CMS and the Xibo SSP connector service. It is used to orchestrate the delivery of ads to your players. Enter your API Key from Xibo." %}{% endset %} {{ forms.input("apiKey", title, interface.getSetting("apiKey"), helpText) }} {% endif %} {% if not interface.isProviderSetting("cmsUrl") %} {% set title %}{% trans "CMS URL" %}{% endset %} {% set helpText %}{% trans "The URL your players use to connect to your CMS." %}{% endset %} {{ forms.input("cmsUrl", title, interface.getSetting("cmsUrl"), helpText) }} {% endif %}
{% if partners is iterable and partners|length > 0 %} {% for partnerKey, available in partners %}
{% if available.logo %} {% else %} {% if available.url %}

{{ available.name }}

{% else %}

{{ available.name }}

{% endif %} {% endif %} {% if available.description %}

{{ available.description }}

{% endif %} {% set title %}{% trans "Enabled?" %}{% endset %} {% set helpText %}{% trans "Connect to this partner" %}{% endset %} {{ forms.checkbox(partnerKey ~ "_enabled", title, interface.getPartnerSetting(partnerKey, "enabled"), helpText) }} {% set title %}{% trans "API Key" %}{% endset %} {% set helpText %}{% trans "Enter your API Key from this SSP." %}{% endset %} {{ forms.input(partnerKey ~ "_key", title, interface.getPartnerSetting(partnerKey, "key"), helpText) }} {% set title %}{% trans "Test mode?" %}{% endset %} {% set helpText %}{% trans "Should we connect to this partners test or production system?" %}{% endset %} {{ forms.checkbox(partnerKey ~ "_isTest", title, interface.getPartnerSetting(partnerKey, "isTest"), helpText) }} {% if available.isWidgetSupported %} {% set title %}{% trans "Use the SSP widget to schedule ad requests manually?" %}{% endset %} {% set helpText %}{% trans "When using the SSP widget you do not need to configure a share of voice, duration or min/max duration." %}{% endset %} {{ forms.checkbox(partnerKey ~ "_isUseWidget", title, interface.getPartnerSetting(partnerKey, "isUseWidget"), helpText) }} {% endif %}
{% trans "How many seconds per hour would you like to dedicate to this SSP?" %}
{% trans "As a percentage" %}
{% set title %}{% trans "Duration (s)" %}{% endset %} {% set helpText %}{% trans "The expected duration of each ad served by the SSP." %}{% endset %} {{ forms.number(partnerKey ~ "_duration", title, interface.getPartnerSetting(partnerKey, "duration"), helpText) }} {% set title %}{% trans "Min Duration (s)" %}{% endset %} {% set helpText %}{% trans "The minimum duration of an ad served by the SSP." %}{% endset %} {{ forms.number(partnerKey ~ "_minDuration", title, interface.getPartnerSetting(partnerKey, "minDuration"), helpText) }} {% set title %}{% trans "Max Duration (s)" %}{% endset %} {% set helpText %}{% trans "The maximum duration of an ad served by the SSP." %}{% endset %} {{ forms.number(partnerKey ~ "_maxDuration", title, interface.getPartnerSetting(partnerKey, "maxDuration"), helpText) }} {% set title %}{% trans "Allowed content types" %}{% endset %} {% set helpText %}{% trans "Which content types should be allowed on these displays. Most SSPs will be able to further refine this by display." %}{% endset %} {% set all %}{% trans "Images and Video" %}{% endset %} {% set image %}{% trans "Images only" %}{% endset %} {% set video %}{% trans "Videos only" %}{% endset %} {% set options = [ { id: "imagesAndVideo", value: all }, { id: "imageOnly", value: image }, { id: "videoOnly", value: video } ] %} {{ forms.dropdown(partnerKey ~ "_mediaTypesAllowed", "single", title, interface.getPartnerSetting(partnerKey, "mediaTypesAllowed"), options, "id", "value", helpText) }} {% set title %}{% trans "Display Group" %}{% endset %} {% set helpText %}{% trans "Which displays would you like to enroll with this SSP. Leave blank to enroll them all." %}{% endset %} {% set attributes = [ { name: "data-width", value: "200px" }, { name: "data-allow-clear", value: "true" }, { name: "data-placeholder--id", value: null }, { name: "data-placeholder--value", value: "" }, { name: "data-search-url", value: url_for("displayGroup.search") }, { name: "data-search-term", value: "displayGroup" }, { name: "data-search-term-tags", value: "tags" }, { name: "data-id-property", value: "displayGroupId" }, { name: "data-text-property", value: "displayGroup" }, ] %} {% if interface.getSetting(partnerKey ~ "_displayGroupId") %} {% set attributes = attributes|merge([ { name: "data-initial-key", value: "displayGroupId" }, { name: "data-initial-value", value: interface.getSetting(partnerKey ~ "_displayGroupId") }, ]) %} {% endif %} {{ forms.dropdown(partnerKey ~ "_displayGroupId", "single", title, null, null, "displayGroupId", "displayGroup", helpText, "pagedSelect", "", "d", "", attributes) }} {% set title %}{% trans "ID field" %}{% endset %} {% set helpText %}{% trans "Which field would you like to use as the ID for this SSP?" %}{% endset %} {% set options = [ { id: "displayId", value: "Display ID"|trans }, { id: "customId", value: "Custom ID"|trans }, { id: "ref1", value: "Reference 1"|trans }, { id: "ref2", value: "Reference 2"|trans }, { id: "ref3", value: "Reference 3"|trans }, { id: "ref4", value: "Reference 4"|trans }, { id: "ref5", value: "Reference 5"|trans }, ] %} {{ forms.dropdown(partnerKey ~ "_sspIdField", "single", title, interface.getSetting(partnerKey ~ "_sspIdField"), options, "id", "value", helpText) }}
{% endfor %}
{% else %}

To see a list of available partners please enter your API key, save this form and then come back here.

{% endif %}

Enable/Disable

Disabling this connector will stop all displays from making ad requests.

{% endblock %}