Puedes compartir cualquier implementación de tu conector de comunidad con un vínculo. Cuando un usuario siga el vínculo, se lo dirigirá directamente a Looker Studio con tu conector seleccionado.
Para obtener un vínculo directo a tu conector comunitario, sigue estos pasos:
- Navega a Apps Scripts y abre el proyecto del conector de comunidad que deseas compartir. Haz clic en Implementar > Administrar implementaciones.
- Haz clic en la implementación Activa que deseas compartir. En URL del complemento de Looker Studio, se muestra un vínculo directo a Looker Studio para la implementación seleccionada. Haz clic en Copiar. Como alternativa, en ID de implementación, haz clic en Copiar y agrega el ID de implementación copiado a la siguiente URL para formar un vínculo directo:
https://lookerstudio.google.com/datasources/create?connectorId=DEPLOYMENT_ID
- The direct link can be shared with users. For example, send it via email, post it on a website, blog, social media, etc.
Preconfigure a direct link
If you know the configuration values that your users will want ahead of time, you can provide additional query parameters to pre-populate the connector configuration. The pre-populated configuration can still be modified by users.
Create a preconfigured direct Link
To create a preconfigured direct link, add the following optional query parameters:
connectorConfig
- A URL encoded JSON string containing key-value pairs to use to pre-populate the connector configuration.- Key names must match the parameter names defined in the connector config.
TEXTINPUT
,TEXTAREA
, andSELECT_SINGLE
values should be strings.CHECKBOX
values should be a boolean.SELECT_MULTIPLE
values should be an array of strings.
reportTemplateId
- An identifier for the default reporting template to use for the connector. If a default template is set in the connector manifest, this value will override the manifest. See How To Add The Report Template for the value to use.
Example
The following example illustrates how to create a direct link to the
StackOverflow Questions community connector. The direct link
pre-populates the connector configuration to use the looker-studio
tag on
Stack Overflow.
Step 1: Create the config JSON
The keys for the config JSON are the names of each configuration item. For the
Stack Overflow config, these names are tagged
, pagesize
, and
sort
.
JSON before encoding
{
"tagged": "looker-studio",
"pagesize": 25,
"sort": "activity"
}
Paso 2: Codifica la URL
Después de crear el JSON de configuración, codifica el objeto como URL. Una opción sencilla es usar la función de JavaScript encodeURIComponent
.
URL de codificación
// get a reference to the jsonConfig
var jsonConfig;
var encoded = encodeURIComponent(jsonConfig);
El resultado es la siguiente cadena codificada:
"%7B%22tagged%22%3A%22looker-studio%22%2C%22pagesize%22%3A%2225%22%2C%22sort%22%3A%22activity%22%7D"
Paso 3: Compila la URL
El siguiente código compila el vínculo directo. Ten en cuenta que necesitarás el ID de implementación del conector para compilar la URL.
Esto devuelve la siguiente URL codificada, que es un vínculo directo completado previamente para el conector:
https://lookerstudio.google.com/datasources/create?connectorConfig=%7B%22tagged%22%3A%22looker-studio%22%2C%22pagesize%22%3A%2225%22%2C%22sort%22%3A%22activity%22%7D&reportTemplateId=1lR9CGfx3uyQp6oz7oAgA1rsqZViA-IQs&connectorId=AKfycbwGMj-oe532y-NEbMHo-KLUCEz0EEGOZj-3lhEgw7q65-hs-T_F9B3Qjw