Skip to main content

Opinary

Opinary

DirectionSource
Environment
Web
Capability
Event Collection
SDK RequiredYes
Product(s) RequiredCore Platform

Opinary helps publishers embed interactive opinion tools that boost engagement and enable contextual ad targeting.

Overview

Opinary is a software platform that allows publishers to engage their audience by using interactive widgets on their website. The widgets include various types of polls that are designed to gather user opinions and generate insights. Unlike other survey integrations where the survey platform handles the integration setup, Opinary requires you to deploy custom JavaScript on your website to forward poll responses to Permutive. This declared first-party data is useful for building cohorts for demographics or purchase intent targeting. Use cases include:
  • Build cohorts based on poll responses (e.g., demographic segments, opinion-based targeting)
  • Track poll completion and question-level responses for advanced segmentation
  • Enrich audience profiles with opinion data collected through Opinary widgets

Environment Compatibility

EnvironmentSupportedNotes
WebYes
iOSNo
AndroidNo
CTVNo
API DirectNo

Prerequisites

  • Permutive SDK Deployment: The Permutive JavaScript SDK must be deployed on your website where Opinary widgets will run.
  • Custom OpinarySurveyResponse Event: Contact your Permutive Customer Success Manager (CSM) to set up the OpinarySurveyResponse custom event on your workspace. This event must be preconfigured before using this integration.
  • Access to Opinary Platform: You must have access to the Opinary platform and polls configured on your website.
  • JavaScript Implementation Access: You need the ability to add custom JavaScript code to your website pages where Opinary polls are displayed.
  • Verify with your CSM: Confirm that this collector is part of your Permutive plan.

Setup

1

Request Custom Event Setup

Contact your Permutive Customer Success Manager (CSM) to configure the OpinarySurveyResponse custom event on your workspace. This step must be completed before proceeding with the JavaScript implementation.
2

Deploy JavaScript Collector

Add the following JavaScript code to your website where Opinary polls are displayed. This code listens for Opinary vote events and forwards them to Permutive.
This code is provided “as is”, without warranty of any kind, express or implied. In no event shall Permutive be liable for any claim, damages, updates, or other liability.
(function () {
  function listenToOpinary() {
    Opinary.on('opinary.vote', function (vote, poll) {
      if (permutive && poll.dmpIntegration) {
        permutive.track('OpinarySurveyResponse', {
          survey: {
            id: poll.pollId,
            type: poll.type,
          },
          question: {
            text: poll.header
          },
          answer: {
            text: vote.label,
            posX: vote.x || 0.0,
            posY: vote.y || 0.0,
            optionIdentifier: vote.optionID || "",
            optionPosition: vote.position || 0,
            rawValue: vote.value || 0.0,
            unit: vote.unit || ""
          }
        });
      }
    });
  }

  if (Opinary && Opinary.on) {
    listenToOpinary()
  } else {
    window.addEventListener('OpinaryReady', function () {
      listenToOpinary()
    });
  }
})();
This code should be placed on pages where Opinary polls are displayed, ensuring it loads after both the Permutive SDK and Opinary scripts.
3

Verify Data Collection

Once configured, poll responses from Opinary will be sent to Permutive as OpinarySurveyResponse events.To verify:
  1. Navigate to the Permutive dashboard.
  2. Go to Events and look for the OpinarySurveyResponse event type.
  3. Check that poll response data is being collected.
  4. Interact with an Opinary poll on your site and verify the event appears in your dashboard.
4

Build Survey-Based Cohorts

Once event collection is verified, you can build cohorts based on poll responses. In the Permutive cohort builder, the OpinarySurveyResponse event will appear in the event dropdown list.For example, you can create cohorts for:
  • Users who answered a specific poll question in a certain way (e.g., users whose gender is “female”)
  • Users who completed specific polls
  • Demographic segments based on poll responses
  • Opinion-based segments for targeted content or advertising

Data Types

With your Opinary integration setup, you’ll see the following event type collected in Permutive:
The OpinarySurveyResponse event is triggered when a user votes on an Opinary poll. The event captures details about the survey, question, and answer provided.
survey.id
string
The unique identifier for the Opinary poll. Example: 12345
survey.type
string
The type of Opinary poll (e.g., single choice, multiple choice, rating scale).
question.text
string
The text of the poll question presented to the user. Example: What is your preferred news category?
answer.text
string
The user’s text response or label for their answer. Example: Politics
answer.posX
number
The X position of the answer (used for spatial poll types like image grids). Defaults to 0.0 if not applicable.
answer.posY
number
The Y position of the answer (used for spatial poll types). Defaults to 0.0 if not applicable.
answer.optionIdentifier
string
The unique identifier for the selected answer option. Empty string if not applicable.
answer.optionPosition
number
The position/index of the selected option within the poll choices. Defaults to 0 if not applicable.
answer.rawValue
number
The raw numeric value of the answer (used for rating scales or numeric inputs). Defaults to 0.0 if not applicable.
answer.unit
string
The unit associated with the answer (e.g., “years”, “dollars”). Empty string if not applicable.
OpinarySurveyResponse events also contain default Permutive event properties such as page URL (client.url) and page title (client.title).

Troubleshooting

Verify the following:
  • The custom OpinarySurveyResponse event has been configured in your Permutive workspace. Check the Events page in your dashboard to confirm the event exists.
  • The Permutive SDK is deployed and loading correctly on the pages where your Opinary polls are displayed. Use the Permutive Chrome Extension or check for window.permutive in the browser console.
  • The Opinary SDK is loaded before the collector JavaScript runs. Check for window.Opinary in the browser console.
  • The collector JavaScript has been added to the page and is executing without errors. Check the browser console for JavaScript errors.
  • The poll.dmpIntegration flag is set to true in your Opinary poll configuration. This flag controls whether poll responses are sent to DMPs.
If you see JavaScript errors in the console:
  • Verify that both permutive and Opinary objects are available before the collector code runs.
  • Check that the Opinary SDK version you’re using supports the opinary.vote event and the OpinaryReady event.
  • Ensure there are no conflicts with other JavaScript libraries on the page.
  • Test the integration on a clean page with minimal JavaScript to isolate conflicts.
The OpinarySurveyResponse event is a custom event that must be preconfigured before the integration will work. If you attempt to deploy the JavaScript collector without this custom event being set up first, poll data will not be collected.Contact your Permutive Customer Success Manager (CSM) to request the custom event setup.
If the OpinarySurveyResponse event is not appearing in the cohort builder dropdown:
  • Confirm that events are being collected by checking the Events page in your dashboard.
  • Ensure at least one event has been received. Events only appear in the cohort builder after data has been collected.
  • Wait a few minutes after the first event is received, then refresh the cohort builder page.
  • Verify that the event schema includes the fields you want to use for cohort building.
If events are being collected but still not appearing, contact your Permutive CSM for assistance.
Not all Opinary poll types populate all fields in the OpinarySurveyResponse event:
  • Simple choice polls may only populate answer.text and answer.optionPosition.
  • Rating scale polls will populate answer.rawValue and may include answer.unit.
  • Spatial polls (like image grids) will populate answer.posX and answer.posY.
This is expected behavior. The collector code uses default values (0.0 for numbers, empty strings for text) for fields that don’t apply to the specific poll type.
If polls display but votes are not being tracked:
  • Verify that the poll.dmpIntegration setting is enabled in your Opinary poll configuration.
  • Check that you’re using a compatible Opinary SDK version that supports the opinary.vote event.
  • Test with different poll types to determine if the issue is specific to certain poll formats.
  • Contact Opinary support to verify that your polls are configured correctly for DMP integration.

Changelog

For the latest updates and changes to this integration, visit changelog.permutive.com.