Share Count

Easily display the total amount of social shares of your content or page as one aggregate number in real time. This requires that you first set up the Social Share Bar with your desired parameters.

This is an example of the code snippet to use. Please note that if you are using data-path on your share bar widget, you will need to also specify the data-path in the parameters of the share count widget. If you are instead using data-url, then the same would go for that parameter needing to be in both the share bar widget and the share count widget.

<div class="viafoura">
        <div class="vf-widget vf-quote"
        data-widget="sharetotal"
        data-path="/"
        data-realtime="true">
        </div>
</div>

Installation Parameters: Sharetotal

Setting

Description

Accepted Values

Default

Notes

data-path

The path to the page to fetch the number of shares from

Any string

The path to the current page

e.g. /path/to/article.html

data-url

The fully-qualified url to the page to fetch the number of shares from

A fully-qualified url

e.g. https://foo.com/path/to/article.html

data-realtime

Specify whether to use real-time or not

true or false

true

If this option is set to false, then the widget will only fetch the initial value and will not update the counter in real-time.


Did this page help you?