In this article
A guide to collecting poll Data from Opinary
Note: This integration requires a custom event. Please contact your CSM and your Solution Architect to set up that custom event on your account.
Opinary is a software 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.
The setup requires work in Permutive and the Opinary platform. It's important to ensure you have access to both before starting.
Setting up the custom events in Permutive
The event will have the following data points:
- Survey id
- Survey type
- Question text
- Answer text
- Answer posX
- Answer posY
- Answer optionIdentifier
- Answer optionPosition
- Answer rawValue
- Answer unit
Note: OpinarySurveyResponse events will also contain default properties such as the page URL and page title.
Setting up the JavaScript collector to forward answers to Permutive
Important: 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.
Please add the following code to your website.
(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()
});
}
})();
Building survey-based cohorts
Once set up, the OpinarySurveyResponse event will appear in the event drop-down list in your cohort builder.
A common way to use this data is to build a cohort of users who have answered a question in a certain way, for example, users whose gender is "female":
Comments
0 comments
Please sign in to leave a comment.