How to Install the widget on HTML
This document covers the installation steps required to integrate Social9 with your HTML website
- Get The Code Snippet From Social9 Console
- Add Script To Your Site
- Additional Setup For Inline(Horizontal) Widgets
Copy the one-time installation code snippet under the html installation guide section of the Social9 Console. This should look similar to,
<script id="s9-sdk" async defer content="<REPLACE WITH YOUR USER ID>" src="//cdn.social9.com/js/socialshare.min.js" ></script>
Just paste the copied code right before the closing body tag
</body> in your HTML file/s.
If you're working with a Single Page Application(SPA) such as React, Vue, or Angular and have only one HTML file, adding the code snippet should reflect instantly on your site.
You can now control where the widget should be rendered by modifying rules in the
Show Only On These URLs section under the
Rules tab of your widget editor. This requires no further changes in your frontend application.
On the other hand if multiple HTML files are rendered in your site, the code snippet must be added to each HTML file where the widget should be rendered.
If you'd like to configure an inline widget in your site (i.e. when the widget is placed side-by-side with your page content with a horizontal view), just add this additional code snippet where ever you want the widget to be rendered.
You can create or configure inline widgets under the social9 configurations section and it will automatically be reflected on your website.
For inline widgets, you need to specify the location on your site where the widget should be rendered.
By default, the social9 inline widgets are rendered under the element with class name
s9-widget-wrapperalthough you can change the name in the console. This can be done by changing the
Parent Container Selectorfield under the
Rulessection of the widget editor.
Paste the following snippet in your site where the inline widget should render.