Skip to content
English

Install with the script

It works on any site where you can paste HTML.

  1. Open sentirsocial.com/en/widgets and pick the widget, the language, the theme and the width.
  2. Copy the code.
  3. Paste it into your page’s HTML, where the chart should appear.

The code looks like this:

<div data-sentir-widget="WIDGET-ID"><a href="https://sentirsocial.com/reportes/...">Data: Sentir Social</a></div>
<script async src="https://sentirsocial.com/widget.js"></script>
  • The div marks the place. The script puts the chart there and gives it the height it needs.
  • With several widgets on one page, repeat the div and keep the script line once.

They go on the div:

Attribute Values If you leave it out
data-lang es, en Your page’s language; Spanish when unknown.
data-theme light, dark, auto auto: light or dark from the viewer’s system.
data-width a number of pixels, for example 480 All the width there is.

An example, in English, dark and at most 480 px wide:

<div data-sentir-widget="WIDGET-ID" data-lang="en" data-theme="dark" data-width="480"></div>

The widget always shrinks on small screens: data-width is a maximum width.

If your site allows no scripts, use a frame directly. You set the height yourself:

<iframe src="https://sentirsocial.com/embed/WIDGET-ID?lang=en" title="Sentir Social" width="100%" height="420" style="border:0" loading="lazy"></iframe>

Leave out ?lang=en for Spanish; to force the theme, add #theme=dark or #theme=light at the end of the address.

  • It inserts the frame with the chart and fits its height.
  • It sets no cookies, stores nothing in the browser and reads nothing of your page or your readers.
  • It weighs under 3 KB and loads asynchronously, so it does not slow your page.

Accessibility