Use your content categories with Sided for advanced targeting

Created by Adam Viccaro, Modified on Wed, 7 Jun, 2023 at 3:21 PM by Adam Viccaro

The following script allows you to send the categories you use to tag posts or articles to Sided, enabling the matching of content to those categories. This article provides an overview of the script and explains how to use it.


Script Usage

Include this script along with the main Sided script in your <head> section.


<script type="text/javascript">
  window.sidedScriptPayload = window.sidedScriptPayload || {};
  window.sidedScriptPayload.categories = ['cat1', 'cat2', ...];
</script>


You can add any number of categories to the array by replacing 'cat1', 'cat2', and so on, with the actual categories used for the current page.


Example

Consider the following example where a web publisher wants to send category information for an article tagged with "technology," "software," and "productivity":


<!DOCTYPE html>
<html>
<head>
  <title>My Web Page</title>
  <script type="text/javascript">
    window.sidedScriptPayload = window.sidedScriptPayload || {};
    window.sidedScriptPayload.categories = ['technology', 'software', 'productivity'];
  </script>
</head>
<body>
  <!-- Rest of the HTML content -->
</body>
</html>

To confirm this script was added and configured correctly, you should see your categories start to show in two locations inside the admin dashboard.

1. Settings > Categories




2. Poll details > Deploy Poll > Deploy to Category




Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article