- Create the pollfishConfig object to setup Pollfish library
- Include jQuery library to your website (version 1.4.3 and above)
- Include Pollfish library to your website
- Request your account to get verified from Pollfish Dashboard
Pollfish library works with IE 10 and above, Chrome 16 and above, Firefox 20 and above. You can checkout the Pollfish Webplugin experience by visiting this page here.
- jQuery version 1.4.3 and above
You can use Pollfish either in Developer or in Release mode.
- Developer mode is used to show to the developer how Pollfish will be shown through an app (useful during development and testing).
- Release mode is the mode to be used for a released app in a live online website(start receiving paid surveys).
If you do not set the debug parameter in your Pollfish config object, Pollfish runs in release mode by default so it is IMPORTANT when you are in development that YOU MUST set debug to true in order to be able to receive development surveys.
Note: Be careful to turn the debug parameter to false when you put your website online!!
Register at www.pollfish.com as a Developer.
Login at www.pollfish.com and add a new app at Pollfish panel in section My Apps and copy the given API key for this app to use later in your pollfishConfig object in your app.
Navigate in your Pollfish Dashboard under App Settings - Placements and choose "Create a Placement". You can select a Rewarded Ad or an Offerwall approach based on your placement needs with any of the available Ad Formats(it can change later through placement settings). Hit "Create Placement" and keep the created Placement Id.
IMPORTANT: Pollfish will autostart serving surveys once the pollfishConfig object is set, with a valid api key. Although it is recommended to start displaying surveys after a click action.
-
api_key (required)
Your API Key (from step 2) -
user_id (required)
A unique user identification string. If not provided it will fallback to an autogenerated user id. -
indicator_position (optional)
The Position where you wish to place the Pollfish panel. There are four different positions: {TOP_LEFT, BOTTOM_LEFT, TOP_RIGHT, BOTTOM_RIGHT}
Defaults to BOTTOM_RIGHT -
request_uuid (optional)
Request uuid (a pass-through param) that can be received in the s2s callback to your server. Replaces the deprecateduuid
parameter. -
debug (optional)
Sets Pollfish in debug mode
Set true to enable debug mode (for development), set false to set Pollfish in release mode.
Defaults to false -
offerwall (optional)
Sets Pollfish in offerwall approach mode
Set to true to enable offerwall mode Defaults to false -
rewardName (optional)
Sets reward name parameter to Pollfish. You can set your own coin/point/reward name for when your respondents complete a survey
-
rewardConversion (optional)
Sets reward conversion parameter to Pollfish. You can set your own conversion value for when your respondents complete a survey. The conversion expects a string and it should contain the number of rewards the respondent will receive for every dollar being payed. In example, when a survey has a CPA of 30 and a conversion of 50. Then the rewardValue property will contain the value '15'.
If used, you will also need to set up the
sig
parameter -
clickId (optional)
A pass-through param that will be passed back through s2s callback and can be used to enhance your reward conversion signing
-
sig (optional | required when rewardConversion is used)
The Base64 HMAC-SHA1 generated by hashing and encoding
rewardConversion
+rewardName
+clickId
with your secret key. You can check more about how to use this param in our API Documentation page -
user (optional)
Sets users' information (gender, age, etc.) if known. Setting these values will minimise the number of questions asked from a respondent when answering a survey for the first time. You can check the table on our API Documentation under the section
JSON Parameters
.Expected Parameters:
Name Value Type gender Number year_of_birth Number marital_status Number parental Number education Number employment Number career Number race Number income Number organization_role Number number_of_employees Number spoken_languages Array of Numbers postal_data String Note: You can add any number of the above demographics you know. We will ask the respondent the rest if anything is missing
Note 2: In order to minimize fraudulent use of this property, it will be ignored by default. You will need to contact our support team and request extra authorization to send your own demographics.
-
placement_key (required)
The Id of the Placement that you want to load (from step 3). The settings configured on the specific Placement will apply in your integration.
Pollfish Webplugin provides some callback functions to call when specific actions are executed in the Pollfish survey.
- closeCallback
Called when user clicks or touches outside the Pollfish survey container, or if he clicks or touches the close icon - userNotEligibleCallback
Called when the user is not eligible for surveys - closeAndNoShowCallback
Called when the survey is closed and the Pollfish panel hides permanently (e.g. when finishing the survey) - surveyCompletedCallback
Called when the user finishes the survey. Also contains revenue, estimated LOI, survey_class (surveyProvider + type), reward name, reward value and IR survey information. - surveyAvailable
Called when there is an availble survey for the user. Also contains revenue, survey format, estimated LOI, survey_class (surveyProvider + type), reward name, reward value and IR survey information. - surveyNotAvailable
Called when there is no available survey for the user
Below you can see an example of the pollfishConfig object with all the recommended properties:
var pollfishConfig = {
api_key: "api_key_goes_here",
user_id: "user_id_here",
placement_key: "placement_key_here",
debug: true,
offerwall: false,
request_uuid: "string_uuid",
ready: customReady, // Set the ready function to prevent autostarting the survey panel
closeCallback: customSurveyClosed,
userNotEligibleCallback: customUserNotEligible,
closeAndNoShowCallback: customCloseAndNoShow,
surveyCompletedCallback: customSurveyFinished,
surveyAvailable: customSurveyAvailable,
surveyNotAvailable: customSurveyNotAvailable,
user: {
gender: 0, // Zero is only used as an example, it is not a valid value for this key. Please refer to our documentation.
year_of_birth: 0,
marital_status: 0,
parental: 0,
education: 0,
employment: 0,
career: 0,
race: 0,
income: 0,
organization_role: 0,
number_of_employees: 0,
spoken_languages: [0],
postal_data: "10017|US",
},
};
function customReady(){}
function customSurveyClosed(){
console.log("user closed the survey");
}
function customUserNotEligible(){
console.log("user is not eligible");
}
function customSurveyFinished(data){
console.log(`
pollfish survey has finished with revenue: ${data.survey_price},
survey_loi: ${data.survey_loi},
survey_ir: ${data.survey_ir},
survey_class: ${data.survey_class},
reward_name: ${data.reward_name},
reward_value: ${data.reward_value},
`);
// remove the button
var button = document.getElementById("unlock-feature-button");
button.parentNode.removeChild(button);
alert("Feature unlocked");
}
function customCloseAndNoShow(){
console.log("close and hide the pollfish panel");
}
function customSurveyAvailable(data){
console.log(`
pollfish survey is available with revenue: ${data.revenue},
survey format playful: ${data.playful},
survey_loi: ${data.survey_loi},
survey_ir: ${data.survey_ir},
survey_class: ${data.survey_class},
reward_name: ${data.reward_name},
reward_value: ${data.reward_value},
remaining_completes: ${data.remaining_completes},
`);
// You can show a button in your UI with a reward
var button = document.createElement('button');
button.id = "unlock-feature-button"
button.innerHTML = "Unlock feature";
document.body.appendChild(button);
// when the user clicks on the button show the pollfish view
button.addEventListener("click", function() {
Pollfish.showFullSurvey();
});
}
function customSurveyNotAvailable(){
console.log("survey not available");
}
You can check the webplugin rewarded example in the following repository: https://github.com/pollfish/webplugin-rewarded-example
Include the jQuery library with version greater or equal than 1.4.3 if it's not already included, as the example below:
<!-- Include jQuery library >= 1.4.3 version -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
Then include the Pollfish Webplugin, as the example below:
<!-- Include Pollfish Webplugin -->
<script src="https://storage.googleapis.com/pollfish_production/sdk/webplugin/pollfish.min.js"></script>
IMPORTANT: Keep in mind that you should include the Pollfish Webplugin after the pollfishConfig object, like the example below:
<!-- Initialize your pollfishConfig object first -->
<script>
var pollfishConfig = {
api_key: "api_key_goes_here",
debug: true
// ...,
};
</script>
<!-- Then include Pollfish Webplugin -->
<script src="https://storage.googleapis.com/pollfish_production/sdk/webplugin/pollfish.min.js"></script>
After the ready callback is called, you can open the full survey panel, as described in the next section.
Show the survey panel so that the user can respond immediately
Pollfish.showFullSurvey();
If you call Pollfish.showFullSurvey and there is no available survey, they will show a no surveys found screen.
Hide the pollfish panel and the full survey
Pollfish.hide();
After a user successfully completes a survey or gets screened out, you might want to allow your user to receive another survey. This could be achieved by calling Pollfish.restart which will request a new survey for the user.
| Note: It is recommended to not call Pollfish.restart while the user is answering a survey since it will remove the current survey page.
Pollfish.restart(pollfishConfig);
We invite you to check and comply with the respondent’s terms of use. Pollfish webplugin uses cookies to uniquely and anonymously identify users.
“This website uses Pollfish web plugin. Pollfish is an on-line offer platform, through which, app users are exposed to market research surveys and/or third-party ads (“Offers”). . Pollfish collaborates with publishers of applications for smartphones and website owners in order to have access to users of such applications and address Offers to them. This website uses and enables Pollfish cookies in order for Pollfish to be able to serve Offers through our website. Pollfish collects and processes your data in accordance with all applicable law requirements. For a full list of data received by Pollfish through this app, and for further information on how Pollfish processes such data please read carefully Pollfish’s Privacy Policy for users of Apps collaborating with Pollfish available at https://www.pollfish.com/terms/respondent. Your data may be transferred by Pollfish to non-EEA countries in accordance with all applicable law requirements, including use of EU Commission Standard Contractual Clauses. Pollfish may share such data with third parties, clients and business partners, for commercial purposes. By using this website you accept this privacy policy document and you hereby give your consent for the processing by Pollfish of the aforementioned data. Furthermore, you are informed that you may disable Pollfish operation at any time by visiting the following link https://www.pollfish.com/respondent/opt-out We once more invite you to check the Pollfish Privacy Policy, if you wish to have more detailed view of the way Pollfish works and with whom Pollfish may further share your data."
| Note: Please bear in mind that the first time a user is introduced to the platform, when no paid surveys are available, a standalone demographic survey will be shown, as a way to increase the user's exposure in our clients' survey inventory. This survey returns no payment to app publishers, since it is part of the process users need to go through in order to join the platform. Bear in mind that if a paid survey is available at that point of time, the demographic questions will be inserted at the beginning of the survey, before the actual survey questions. Our aim is to provide advanced targeting solutions to our customers and to do that we need to have this information on the available users. Targeting by marital status or education etc. are highly popular options in the survey world and we need to keep up with the market. A vast majority of our clients are looking for this option when using the platform. Based on previous data, over 80% of the surveys designed on the platform require this new type of targeting.
In our efforts to include publishers in this process and be as transparent as possible we provide full control over the process. We let publishers decide if their users are served these standalone surveys or not, in 2 different ways. Firstly by monitoring the process in code and excluding any users by listening to the relevant notifications (Pollfish Survey Received, Pollfish Survey Completed) and checking the Pay Per Survey (PPS) field which will be 0 USD cents. Secondly, publishers can disable the standalone demographic surveys through the Pollfish Developer Dashboard in the Settings area of an app. You can read more on demographic surveys here.
You can have a look for some integration tips here or if have any question, like why you do not see surveys on your own device in release mode, please have a look in our FAQ page
After your app is published on an app store you should request your account to get verified from your Pollfish Developer Dashboard.
When your account is verified you will be able to start receiving paid surveys from Pollfish clients.