Viafoura's Custom Follow allows you to easily call out what users can follow and receive updates on for a personalized experience.
Users can easily manage what they are following within the notification tray in the Community tab or using a custom preference center. The customization and flexibility of the tool allows for these, and many other use cases, such as to follow:
- Their favourite authors
- Topics of interest ('news', 'local politics', 'favourite team', 'elections', 'celebrity name' etc.)
- Serialized content (podcasts, etc.)
Please be sure to have a strategy before starting implementation to ensure users do not over receive notifications.
Implementation of custom topic follow tool starts with implementing the following code snippet on your site where you want the Follow button to appear.
<div class="viafoura"> <vf-topic-follow topic-id="politics" topic-name="Politics" topic-type="topic" show-count="true" minimum-count="0" ></vf-topic-follow> </div>
You can customize how the Custom Follow tool displays and renders within your page using the following parameters.
Defines the unique id for the topic.
Defines the name of the topic.
Defines the type of the topic. For example, you can use the value "author" if the user can follow an author/writer.
Defines the the number of followers, if you choose to show it.
Defines the minimum number of followers to show in the label, if you choose to show it.
The appearance of just the Follow:
The appearance of just the Follow with a count of followers:
Using the Viafoura Content API, you can notify topic subscribers of new content and include your own title, description, image and URL.
- Viafoura Oauth Credentials
- Content API V5 endpoint
Credentials are needed to use the APIs. A client ID and secret pair with the appropriate permission levels will be provided to you by your client success representative. (please contact our support team).
Use the Client ID and Secret to create a JWT to use as authorization for the API calls (https://documentation.viafoura.com/reference#authorization).
- Each JWT is valid only for 5 minutes.
- You will need to provide the section_uuid that identifies the site you want to send the notification to as the "scope". If you don't know the section_uuid of the site, please [reach out to our support team].(https://documentation.viafoura.com/page/create-a-new-case).
- For this endpoint, the authentication header when passing your credentials should be BASIC.
Trigger the notification using the Content API V5 endpoint. Note that the body of the call must include the following parameters:
- topic_id: the topic_id that users have subscribed to (without topic_id, the notification is treated as a Broadcast Notification)
- title: title text of content or type of content
- description: descriptive text of the content
- url: URL that the user will be directed to on click of notifications. Tracking query strings is recommended to be added
- push_time_to_live: time in seconds that a push notification will be retained until the browser is available. ie, computer is turned on. If blank, 4 weeks is the default value
- image_url: HTTPS hosted image that will be included in the news feed and browser push notifications.
Followers to the topic will be notified through browser push notifications (if they subscribed to push notifications) and the pages will appear in the user’s notification feed in the tray.
The notification will use the page Title, Description and URL in the notification. The notification will also indicate a new notification. Additional documentation of the Content API is available here.
Updated about 1 month ago