Steps

Unity integration is simple - it takes only 5 minutes.

  1. Import NGUI package
    Unzip & import "polljoy_SDK.unitypackage" in the "Dist" folder to your Unity project.
  2. Include the "Start session" and "Get poll" calls in your project
  3. All done!

polljoy supports both NGUI 2 and 3. If you don’t already have NGUI you can get it free here

Start session

polljoy works in the background to avoid interrupting your apps’s main thread.

Each app starts a session and gets the Session ID for all communications to the API.

To start a session:

  1. On Application Start, call:

        // ...
        public class ApplicationStart : MonoBehaviour
           // ...
           Polljoy.startSession("YOUR_APP_ID");  // This is the APP ID for the app
           // ...

Each time you call startSession, the SDK will increase the session count by 1. So, you should only call it once for each launch to get the session count correct.

Get poll (simple)

After you start the session, you can get polls any time and place you want!

In your program logic, at the point you want to get the poll, call:

    Polljoy.getPoll();
        // this will auto show the polls when all polls are ready

OR

Polljoy.getPoll(delegate);
        // if you want to handle callbacks from polljoy

Note: The above two methods are simplified versions if you do not have any selection criteria. If you want to select specific polls to the users based on session, timeSinceInstall, platform check out the Advanced section.

Test app

We’ve included a test app if you’d like to test first. Import the "polljoy_testapp.unitypackage" in the "TestApp" folder.. Open the "TestAppScene" and you are good to go!

Need more info, go to Advanced section.

 

 

Get poll (full)

    // ...
       Polljoy.getPoll(appVersion,
                       level,
                       session,
                       timeSinceInstall,
                       userType,
                       tags,
                       delegate);
     // ...

In summary:

appVersion (optional) Set to null if you prefer not to send it. Or you can choose to pass it. eg 1.0.35

level (optional) Set as 0 if you prefer not to send it. If your app has levels you can pass them here. eg 34

session (optional) Set it as "Polljoy.Session" and the SDK will count it for you. Or you can manually send it. eg 3

timeSinceInstall (optional) Set it as "PolljoyCore.getTimeSinceInstall()" and the SDK will count it for you. Or you can manually set it by sending a value for how long the app has been installed (by default, counted in days). eg 5

userType Pass back either the user type Pay or Non-Pay. This is the class PJUserType as defined in PJUserType.cs

tags (optional) Set to null if you aren't using them. If your app uses tags to select polls, pass them in string format with as many as you want to send - TAG,TAG, ... ,TAG. TAG is either in the format TAGNAME or TAGNAME:VALUE. They should match what you defined in the web console. An example of sending back player gender, current energy and where the poll is being called from could be: MALE,ENERGY#18,PVPMENU

delegate (optional) Set to null if not needed. Delegate is the instance to handle all callbacks from polljoy SDK. If used, the delegate should implement PolljoyDelegate as defined in Polljoy.cs

Callbacks

To use the delegate and callbacks, please extend the method "PolljoyDelegate" and implement the callback methods. polljoy will inform delegate at different stages when the polls are downloaded, ready to show, user responded etc. The app can optionally implement the delegate methods to control the app logic. The delegate methods are (defined in PolljoyDelegate.cs):

 void PJPollNotAvailable(PJResponseStatus status);

When there is no poll matching your selection criteria or no more polls to show in the current session. The error code is passed back as a enum.

 void PJPollIsReady(List<PJPoll> polls);

When poll/s is/are ready to show (including all associated images). Friendly tip - If you are displaying the poll in the middle of an active app or app session that needs real time control, consider to pause your app before presenting the poll UI as needed.

The polls array returned are all the matched polls for the request. Please refer PJPoll.cs for the data structure. When you’re ready to present the poll, call:

 Polljoy.showPoll();

This will present the polljoy UI according to your app style and poll settings. Then the SDK will handle all the remaining tasks for you. These include handling the user’s response, informing delegate for any virtual amount user received, uploading the result to the console … etc.

We recommend you implement this delegate method so you know when polls are ready and call polljoy SDK to show the poll or do whatever control you need.

 void PJPollWillShow(PJPoll poll);

The polljoy poll UI is ready and will show. You can do whatever UI control as needed. Or simply ignore this implementation.

 void PJPollDidShow(PJPoll poll);

The polljoy poll UI is ready and has shown. You can do whatever UI control as needed. Or simply ignore this implementation.

 void PJPollWillDismiss(PJPoll poll);

The polljoy poll UI is finished and will dismiss. You can do whatever UI control as needed. Or simply ignore this implementation. You can prepare your own UI before resuming your app before the polljoy poll UI is dismissed.

 void PJPollDidDismiss(PJPoll poll);

The polljoy poll UI is finished and has dismissed. You can do whatever UI control as needed. Or simply ignore this implementation. You can prepare your own UI to resume your app before the polljoy UI is dismissed. This is the last callback from polljoy and all polls are completed. You should resume your app if you have paused.

 void PJPollDidResponded(PJPoll poll);

User has responded to the poll. The poll will contain all the poll data including user’s responses. You can ignore this (the results are displayed in the web admin console and able to be exported) or use it as you wish. If you issue a virtual currency amount to user, you MUST implement this method to handle the virtual amount issued. This is the only callback from SDK that informs the app the virtual amount that the user collected.

 void PJPollDidSkipped(PJPoll poll);

If the poll is not mandatory, the user can choose to skip the poll. You can handle this case or simply ignore it safely.

Device ID

By default the SDK will assign an unique device ID to each device, if you would however like to override this and assign the device ID yourself, call this method instead

    // ...
    public class ApplicationStart : MonoBehaviour
        // ...
        Polljoy.startSession("YOUR_APP_ID", "DEVICE_ID");  // This is the APP ID for the app
        // ...

That's it! Email us at help@polljoy.com if you have questions or suggestions!




Checklist

Not seeing a poll you thought you’d see? Try these steps

  1. Have you integrated the SDK to your app and are using the correct APP ID in the startSession call? If not you can get your APP ID from the top of the Integration page
  2. Has this poll been displayed answered by this device? If it is answered it will never be shown again to the same device ID.
  3. Has this poll been displayed previously by this device but not answered? By default, a poll will only be displayed once to a device ID. Change “Ask Once” to NO in the advanced settings for a poll to override this.
  4. Was another poll just shown in the same getPoll call? By default only 2 consecutive polls are shown at a time. Go to the advanced settings for your app to change this limit.
  5. Has your device already hit the per session and per day limits for amount of polls displayed? By default at most 3 polls will be shown in a single session and also 3 per day at most. Go to the advanced settings for your app to change this limit.
  6. Were you expecting a poll with a prerequisite to appear directly after answering the prerequisite poll? Note that polls that have prerequisites will be displayed in following getPoll calls, not the one in which the prerequisite was answered.
  7. Have you hit an account limit? You can see the amount of polls remaining each month at the top right of the page.
  8. Have you tried our test app to see if it is working there? It’s included in the SDK zip file.

Still having problems? Email us at help@polljoy.com




Rating request best practices

Tips

  1. Ask for ratings during the first session, which gives the maximum volume of potential ratings. This can have a big impact in only a matter of days.
  2. Ask at a moment of accomplishment or elation and which is a natural breakpoints for the player.
  3. Good examples of points to ask for ratings include
    1. Level completed
    2. Tutorial done
    3. First boss defeated
    4. Quest completed
    5. New personal best
    6. Passed or beat another
    7. After collecting loot
    8. Lucky gacha drop gained
    9. Big wins or bonus apps completed
  4. Don’t interrupt users in the middle of app play or frustration (just failed a level)
  5. Use a filtering question to identify your fans to follow up with a rating request, and those you can collect feedback from to improve your app. Use virtual currency to reward players for their feedback.
  6. Keep the questions short and multiple choices limited.
  7. Upload your graphics and use your colors to make the dialogs as native as possible (for a higher response rate)

Need advice or help? Email us at help@polljoy.com




Customizing your poll style

How to get the right look

  • polljoy is flexible - you can customize the poll look and feel to match your app
  • To customize, go to the My app page and edit your app - there you can access all the settings to change colors/styles and upload custom graphics & sounds
  • You can download a template pack and examples here
  • If you’re looking for even more customization (for example special animation effects etc) you can modify our open-source SDK code which is available for download on Github
  • Note that whilst customization is done on an app basis, individual polls can use different poll images, or if not specified it will revert to the default image for the app, if one has been set

Need advice or help? Email us at help@polljoy.com




Steps

iOS integration is simple - it takes only 5 minutes.

  1. Download the SDK and extract Dist folder to your local drive
  2. Drag the Polljoy.framework & Polljoy.bundle to your project in Xcode
  3. Add the following iOS frameworks to link
    • UIKit
    • Foundation
    • CoreGraphics

    How To:

    i. Click on your XCode project in the file browser sidebar ii. Go to your XCode project’s Build Phases tab iii. Expand "Link Binary With Libraries" iv. Click on the + button and add the frameworks listed above v. Check if Polljoy.framework is added. If not, add Polljoy.framework from your file browser as well.

    polljoy-ios-integration-framework

    Configure polljoy

    Setup Linker Flags

    1. Click on your Xcode projet in the file navigator sidebar
    2. Go to your XCode project’s Build Settings tab
    3. Search for Other Linker Flags
    4. Double click in the blank area to the right of Other Linker Flags but under the “Yes” of Link With Standard Libraries
    5. Add the following: -ObjC

    polljoy-ios-integration-linker-flag

    Add polljoy resources

    1. Go back to your Xcode project’s Build Phases tab
    2. Expand Copy Bundle Resources
    3. Drag Polljoy.bundle in file navigator into Copy Bundle Resources

    polljoy-ios-integration-bundle

Start session

polljoy works in the background to avoid interrupting your app’s main thread.

Each app starts a session and gets the Session ID for all communications to the API. To have best performance and integration, we recommend registering the session at startup. You’ll need your App ID (grab it in the web admin panel)

To register a session:

  1. Open up your app’s AppDelegate.m file
  2. Under #import "AppDelegate.h", import <Polljoy/Polljoy.h> file
  3. Under implementation, call Polljoy to start a session with your App ID
        #import <Polljoy/Polljoy.h>
    
        // ...
        - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
           // ...
           [Polljoy startSession:@"YOUR_APP_ID"];  // This is the APP ID for the app
           // ...
        }

The SDK will automatically handle all session control and required information to get the correct poll based on your poll setup in admin panel and save your poll result for analysis. These includes the session ID, session count, time (days) since first call polljoy SDK, device ID, platform, OS version … etc.

Each time you call startSession, the SDK will increase the session count by 1. So, you should only call it once for each launch to get the session count correct.

Once the session is started, SDK will cache all app settings including the default image, border image and button image (if any) that you have setup in the admin panel. After caching, there will be no operation until you request polls from polljoy service.

Get poll (simple)

After you start the session, you can get polls any time and place you want!

In your program logic, import <Polljoy/Polljoy.h> where you want to get polls (or you can import in your .pch file). Then call:

    [Polljoy getPoll];
    // use this if you don't need to handle callbacks from polljoy
    // this will auto show the polls when all polls are ready

OR

    [Polljoy getPollWithDelegate:self];
    // if you need to handle callbacks from Polljoy

Note: these are simple version if you will only select polls based on session, timeSinceInstall and platform, or not have any selection criteria. If you want more than these and implement callbacks from polljoy, check out the Advanced section.

That's it! Email us at help@polljoy.com if you have questions or suggestions!

Need more info, go to Advanced section.

 

 

Advanced

Get poll (full)

    // ...
    [Polljoy getPollWithDelegate:self
                      AppVersion:_appVersion
                           level:_level
                         session:_session
                timeSinceInstall:_timeSinceInstall
                        userType:_userType
                            tags:_tags];

In summary:

delegate (optional) Set to null if not needed. Delegate is the instance to handle all callbacks from polljoy SDK. If used, the delegate should conform to PolljoyDelegate as defined in Polljoy.h

appVersion (optional) Set to null if you prefer not to send it. Or you can choose to pass it. eg 1.0.35

level (optional) Set as 0 if you prefer not to send it. If your app has levels you can pass them here. eg 34

session (optional) Set it as 0 and the SDK will send it for you. Or you can manually send it. eg 3

timeSinceInstall (optional) Set it as 0 and the SDK will send it for you. Or you can manually set it by sending a value for how long the app has been installed (by default, counted in days). eg 5

userType Pass back either Pay or Non-Pay. This is the ENUM PJUserType as defined in Polljoy.java

tags (optional) Set to null if you aren't using them. If your app uses tags to select polls, pass them in string format with as many as you want to send - TAG,TAG, ... ,TAG. TAG is either in the format TAGNAME or TAGNAME:VALUE. They should match what you defined in the web console. An example of sending back user gender, number of friends and where the poll is being called from could be: FEMALE,FRIENDS#88,MAINMENU

Please check Polljoy.h for the type of the parameters. polljoy’s API is open. All data returned is passed back to the delegate. Delegate can use the returned poll data for their own control if needed.

Callbacks

polljoy will inform delegate at different stages when the polls are downloaded, ready to show, user responded etc. Your app can optionally implement the delegate methods to control the app logic. The delegate methods are:

 -(void) PJPollNotAvailable:(PJResponseStatus) status;

When there is no poll matching your selection criteria or no more polls to show in the current session.

 -(void) PJPollIsReady:(NSArray *) polls;

When poll/s is/are ready to show (including all associated images). Friendly tip - If you are displaying the poll in the middle of an active app or app session that needs real time control, consider to pause your app before presenting the poll UI as needed.

The polls array returned are all the matched polls for the request. Please refer PJPoll.h for the data structure. When you’re ready to present the poll, call:

 [Polljoy showPoll];

This will present the polljoy UI according to your app style and poll settings. Then the SDK will handle all the remaining tasks for you. These include handling the user’s response, informing delegate for any virtual amount user received, uploading the result to the console … etc.

We recommend you implement this delegate method so you know when polls are ready and call polljoy SDK to show the poll or do whatever control you need.

 -(void) PJPollWillShow:(PJPoll*) poll;

The polljoy poll UI is ready and will show. You can do whatever UI control as needed. Or simply ignore this implementation.

 -(void) PJPollDidShow:(PJPoll*) poll;

The polljoy poll UI is ready and has shown. You can do whatever UI control as needed. Or simply ignore this implementation.

 -(void) PJPollWillDismiss:(PJPoll*) poll;

The polljoy poll UI is finished and will dismiss. You can do whatever UI control as needed. Or simply ignore this implementation. You can prepare your own UI before resuming your app before the polljoy poll UI is dismissed.

 -(void) PJPollDidDismiss:(PJPoll*) poll;

The polljoy poll UI is finished and has dismissed. You can do whatever UI control as needed. Or simply ignore this implementation. You can prepare your own UI to resume your app before the polljoy UI is dismissed. This is the last callback from polljoy and all polls are completed. You should resume your app if you have paused.

 -(void) PJPollDidResponded:(PJPoll*) poll;

User has responded to the poll. The poll will contain all the poll data including user’s responses. You can ignore this (the results are displayed in the web admin console and able to be exported) or use it as you wish. If you issue a virtual currency amount to user, you MUST implement this method to handle the virtual amount issued. This is the only callback from SDK that informs the app the virtual amount that the user collected.

 -(void) PJPollDidSkipped:(PJPoll*) poll;

If the poll is not mandatory, the user can choose to skip the poll. You can handle this case or simply ignore it safely.

That's it! Email us at help@polljoy.com if you have questions or suggestions!

 

 

Checklist

Not seeing a poll you thought you’d see? Try these steps

  1. Have you integrated the SDK to your app and are using the correct APP ID in the startSession call? If not you can get your APP ID from the top of the Integration page
  2. Has this poll been displayed answered by this device? If it is answered it will never be shown again to the same device ID.
  3. Has this poll been displayed previously by this device but not answered? By default, a poll will only be displayed once to a device ID. Change “Ask Once” to NO in the advanced settings for a poll to override this.
  4. Was another poll just shown in the same getPoll call? By default only 2 consecutive polls are shown at a time. Go to the advanced settings for your app to change this limit.
  5. Has your device already hit the per session and per day limits for amount of polls displayed? By default at most 3 polls will be shown in a single session and also 3 per day at most. Go to the advanced settings for your app to change this limit.
  6. Were you expecting a poll with a prerequisite to appear directly after answering the prerequisite poll? Note that polls that have prerequisites will be displayed in following getPoll calls, not the one in which the prerequisite was answered.
  7. Have you hit an account limit? You can see the amount of polls remaining each month at the top right of the page.
  8. Have you tried our test app to see if it is working there? It’s included in the SDK zip file.

Still having problems? Email us at help@polljoy.com




Rating request best practices

Tips

  1. Ask for ratings during the first session, which gives the maximum volume of potential ratings. This can have a big impact in only a matter of days.
  2. Ask at a moment of accomplishment or elation and which is a natural breakpoints for the player.
  3. Good examples of points to ask for ratings include
    1. Level completed
    2. Tutorial done
    3. First boss defeated
    4. Quest completed
    5. New personal best
    6. Passed or beat another
    7. After collecting loot
    8. Lucky gacha drop gained
    9. Big wins or bonus apps completed
  4. Don’t interrupt users in the middle of app play or frustration (just failed a level)
  5. Use a filtering question to identify your fans to follow up with a rating request, and those you can collect feedback from to improve your app. Use virtual currency to reward players for their feedback.
  6. Keep the questions short and multiple choices limited.
  7. Upload your graphics and use your colors to make the dialogs as native as possible (for a higher response rate)

Need advice or help? Email us at help@polljoy.com




Customizing your poll style

How to get the right look

  • polljoy is flexible - you can customize the poll look and feel to match your app
  • To customize, go to the My app page and edit your app - there you can access all the settings to change colors/styles and upload custom graphics & sounds
  • You can download a template pack and examples here
  • If you’re looking for even more customization (for example special animation effects etc) you can modify our open-source SDK code which is available for download on Github
  • Note that whilst customization is done on an app basis, individual polls can use different poll images, or if not specified it will revert to the default image for the app, if one has been set

Need advice or help? Email us at help@polljoy.com




Steps

Android integration is simple - it takes only 5 minutes.

  1. Copy the Polljoy SDK Archived File to your project workspace folder and unzip. You'll see two projects: PolljoySDK and PolljoyTestApp.
  2. In Eclipse, import the PolljoySDK project into your workspace.
  3. Add the PolljoySDK project as a reference project in your project settings:

    polljoy-integration-android-setup

  4. Add INTERNET permission to your project’s AndroidManifest.xml:

    <uses-permission android:name="android.permission.INTERNET" />
                            
  5. Again in AndroidManifest.xml, declare PJPollViewActivity by adding the following lines between <application> and </application>:

        <activity
            android:name="com.polljoy.PJPollViewActivity"
            android:configChanges="orientation|screenSize|keyboardHidden"
            android:launchMode="singleTop"
            android:theme="@android:style/Theme.Translucent" >
        </activity>

Start session

polljoy works in the background to avoid interrupting your app’s main thread.

Each app starts a session and gets the Session ID for all communications to the API. To have best performance and integration, we recommend registering the session at startup. You’ll need your App ID (grab it in the web admin panel)

First import the Polljoy package by adding the following code when you call methods within PolljoySDK:

import com.polljoy.Polljoy;

On app startup, call Polljoy to register a session with ApplicationContext and your App ID. You can either add the lines in your custom Application class or your LAUNCHER activity.

i. If you add it In your launcher activity:

    // ...
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Polljoy.startSession(this.getApplicationContext(), "YOUR_APP_ID");  // This is the APP ID for the app
        // ...

ii. Or if you add it in your custom Application class,

    // ...
    public void onCreate() {
        super.onCreate();
        Polljoy.startSession(this, "YOUR_APP_ID");  // // This is the APP ID for the app
        // ...

The SDK will automatically handle all session control and required information to get the correct poll based on your poll setup in admin panel and save your poll result for analysis. These includes the session ID, session count, time (days) since first call polljoy SDK, device ID, platform, OS version … etc.

Each time you call startSession, the SDK will increase the session count by 1. So, you should only call it once for each launch to get the session count correct.

Once the session is started, SDK will cache all app settings including the default image, border image and button image (if any) that you have setup in the admin panel. After caching, there will be no operation until you request polls from polljoy service.

Get poll (simple)

After you start the session, you can get polls any time and place you want!

In your program logic, import com.polljoy.Polljoy; where you want to get polls. Then call:

    // ...
    Polljoy.getPoll();
    // use this if you don't need to handle callbacks from polljoy
    // this will auto show the polls when all polls are ready
    // ...

Note: these are simple version if you will only select polls based on session, timeSinceInstall and platform, or not have any selection criteria. If you want more than these and implement callbacks from polljoy, check out the Advanced section

Please check the integration video walk-through!

polljoy-android-integration-video

That's it! Email us at help@polljoy.com if you have questions or suggestions!

Need more info, go to Advanced section.

 

 

Advanced

Get poll (full)

    // ...
       Polljoy.getPoll(appVersion,
               level,
               session,
               timeSinceInstall,
               userType,
               tags,
               delegate);
    // ...

In summary:

appVersion (optional) Set to null if you prefer not to send it. Or you can choose to pass it. eg 1.0.35

level (optional) Set as 0 if you prefer not to send it. If your app has levels you can pass them here. eg 34

session (optional) Set it as 0 and the SDK will send it for you. Or you can manually send it. eg 3

timeSinceInstall (optional) Set it as 0 and the SDK will send it for you. Or you can manually set it by sending a value for how long the app has been installed (by default, counted in days). eg 5

userType Pass back either Pay or Non-Pay. This is the ENUM PJUserType as defined in Polljoy.java

tags (optional) Set to null if you aren't using them. If your app uses tags to select polls, pass them in string format with as many as you want to send - TAG,TAG, ... ,TAG. TAG is either in the format TAGNAME or TAGNAME:VALUE. They should match what you defined in the web console. An example of sending back user gender, number of friends and where the poll is being called from could be: FEMALE,FRIENDS#88,MAINMENU

delegate (optional) Set to null if not needed. Delegate is the instance to handle all callbacks from polljoy SDK. If used, the delegate should implement PolljoyDelegate as defined in Polljoy.java

Please check Polljoy.java for the type of the parameters. polljoy's API is open. All data returned is passed back to the delegate. Delegate can use the returned poll data for their own control if needed.

Callbacks

polljoy will inform delegate at different stages when the polls are downloaded, ready to show, user responded etc. Your app can optionally implement the delegate methods to control the app logic. The delegate methods are:

 void PJPollNotAvailable(PJResponseStatus status);

When there is no poll matching your selection criteria or no more polls to show in the current session.

 void PJPollIsReady(ArrayList<PJPoll> polls);

When poll/s is/are ready to show (including all associated images). Friendly tip - If you are displaying the poll in the middle of an active app or app session that needs real time control, consider to pause your app before presenting the poll UI as needed.

The polls array returned are all the matched polls for the request. Please refer PJPoll.h for the data structure. When you’re ready to present the poll, call:

 Polljoy.showPoll();

This will present the polljoy UI according to your app style and poll settings. Then the SDK will handle all the remaining tasks for you. These include handling the user’s response, informing delegate for any virtual amount user received, uploading the result to the console … etc.

We recommend you implement this delegate method so you know when polls are ready and call polljoy SDK to show the poll or do whatever control you need.

 void PJPollWillShow(PJPoll poll);

The polljoy poll UI is ready and will show. You can do whatever UI control as needed. Or simply ignore this implementation.

 void PJPollDidShow:(PJPoll poll);

The polljoy poll UI is ready and has shown. You can do whatever UI control as needed. Or simply ignore this implementation.

 void PJPollWillDismiss:(PJPoll poll);

The polljoy poll UI is finished and will dismiss. You can do whatever UI control as needed. Or simply ignore this implementation. You can prepare your own UI before resuming your app before the polljoy poll UI is dismissed.

 void PJPollDidDismiss(PJPoll poll);

The polljoy poll UI is finished and has dismissed. You can do whatever UI control as needed. Or simply ignore this implementation. You can prepare your own UI to resume your app before the polljoy UI is dismissed. This is the last callback from polljoy and all polls are completed. You should resume your app if you have paused.

 void PJPollDidResponded(PJPoll poll);

User has responded to the poll. The poll will contain all the poll data including user’s responses. You can ignore this (the results are displayed in the web admin console and able to be exported) or use it as you wish. If you issue a virtual currency amount to user, you MUST implement this method to handle the virtual amount issued. This is the only callback from SDK that informs the app the virtual amount that the user collected.

 void PJPollDidSkipped(PJPoll poll);

If the poll is not mandatory, the user can choose to skip the poll. You can handle this case or simply ignore it safely.

Please check the integration video walk-through!

polljoy-android-integration-video

That's it! Email us at help@polljoy.com if you have questions or suggestions!

 

 

Checklist

Not seeing a poll you thought you’d see? Try these steps

  1. Have you integrated the SDK to your app and are using the correct APP ID in the startSession call? If not you can get your APP ID from the top of the Integration page
  2. Has this poll been displayed answered by this device? If it is answered it will never be shown again to the same device ID.
  3. Has this poll been displayed previously by this device but not answered? By default, a poll will only be displayed once to a device ID. Change “Ask Once” to NO in the advanced settings for a poll to override this.
  4. Was another poll just shown in the same getPoll call? By default only 2 consecutive polls are shown at a time. Go to the advanced settings for your app to change this limit.
  5. Has your device already hit the per session and per day limits for amount of polls displayed? By default at most 3 polls will be shown in a single session and also 3 per day at most. Go to the advanced settings for your app to change this limit.
  6. Were you expecting a poll with a prerequisite to appear directly after answering the prerequisite poll? Note that polls that have prerequisites will be displayed in following getPoll calls, not the one in which the prerequisite was answered.
  7. Have you hit an account limit? You can see the amount of polls remaining each month at the top right of the page.
  8. Have you tried our test app to see if it is working there? It’s included in the SDK zip file.

Still having problems? Email us at help@polljoy.com




Rating request best practices

Tips

  1. Ask for ratings during the first session, which gives the maximum volume of potential ratings. This can have a big impact in only a matter of days.
  2. Ask at a moment of accomplishment or elation and which is a natural breakpoints for the player.
  3. Good examples of points to ask for ratings include
    1. Level completed
    2. Tutorial done
    3. First boss defeated
    4. Quest completed
    5. New personal best
    6. Passed or beat another
    7. After collecting loot
    8. Lucky gacha drop gained
    9. Big wins or bonus apps completed
  4. Don’t interrupt users in the middle of app play or frustration (just failed a level)
  5. Use a filtering question to identify your fans to follow up with a rating request, and those you can collect feedback from to improve your app. Use virtual currency to reward players for their feedback.
  6. Keep the questions short and multiple choices limited.
  7. Upload your graphics and use your colors to make the dialogs as native as possible (for a higher response rate)

Need advice or help? Email us at help@polljoy.com




Customizing your poll style

How to get the right look

  • polljoy is flexible - you can customize the poll look and feel to match your app
  • To customize, go to the My app page and edit your app - there you can access all the settings to change colors/styles and upload custom graphics & sounds
  • You can download a template pack and examples here
  • If you’re looking for even more customization (for example special animation effects etc) you can modify our open-source SDK code which is available for download on Github
  • Note that whilst customization is done on an app basis, individual polls can use different poll images, or if not specified it will revert to the default image for the app, if one has been set

Need advice or help? Email us at help@polljoy.com




Please note - polljoy web plug-in requires JQuery 1.6 or later and PHP with curl mod enabled at your server end.

Steps

Web integration is simple - it takes only 5 minutes.

1. Copy the files under src folder to your server end which is accessible from your web app.

    src\connect.php
    src\js\polljoy.js

NOTE: If you need more secure control, you should store connect.php in a controlled area that can only be accessed after user login.

2. Edit connect.php to add your App ID (they are available in the web admin panel), and save

    $appId = 'YOUR_APP_ID';  // // This is the APP ID for the app
    $deviceId = sha1($_SERVER['HTTP_USER_AGENT'] . $_SERVER['REMOTE_ADDR']);

3. Assign JQuery and polljoy.js in your website where you want to integrate polljoy

    <script src="URL/PATH/TO/JQuery"></script>
    <script src="URL/PATH/TO/polljoy.js"></script>

Get polls

So you have installed the PHP file in your server end and included the Javascript files. In the webpage where you want to get the polls, include the following code in the HTML file:

    <script type="text/javascript">
        jQuery(document).ready(function()
        {
            jQuery('#poll').polljoy({
                endPoint: 'URL/TO/YOUR/SERVER/END/connect.php'
            });
        });
    </script>

This is the simplest way to connect your webapp to the server end and start a session to polljoy. When polls are returned, you will need to handle them and present the polls with the callbacks (see the Advanced) section.

Example

You can copy the follow code sample to the page you want to integrate polljoy and modify it for all callbacks handling to suit your implementation. Please check the Advanced section for a detail explanations of the callbacks.

    <script id="polljoy-integration" type="text/javascript">
    jQuery(document).ready(function()
        {
             function PJPollIsReady(polls)
             {
                 // please implement this callbacks so that you know polls are ready to show
                 // remember to call polljoy('show'); 
                 console.log('PJPollIsReady', polls);
                 polljoy('show'); // show polls when ready; or call at where you want
             }

             function PJPollNotAvailable(status)
             {
                 console.log('PJPollNotAvailable', status);
             }

             function PJPollWillShow(poll)
             {
                 console.log('PJPollWillShow', poll);
             }

             function PJPollDidShow(poll)
             {
                 console.log('PJPollDidShow', poll);
             }

             function PJPollWillDismiss(poll)
             {
                 console.log('PJPollWillDismiss', poll);
             }

             function PJPollDidDismiss(poll)
             {
                 console.log('PJPollDidDismiss', poll);
             }

             function PJPollDidResponded(poll)
             {
                 console.log('PJPollDidResponded', poll);
             }

             function PJPollDidSkipped(poll)
             {
                 console.log('PJPollDidSkipped', poll);
             }

             function getPoll() {
                 polljoy({
                     endPoint: 'URL/TO/YOUR/SERVER/END/connect.php',
                     deviceId: 'DEVICE_ID',
                     userType: 'USER_TYPE',
                     appVersion: 'APP_VERSION',
                     level: 'LEVEL',
                     osVersion: 'OS_VESION',
                     sessionCount: 'SESSION_COUNT',
                     timeSinceInstall: 'TIME_SINCE_INSTALL',
                     tags: 'TAGNAME,TAGNAME#RANGE'
                 });
             }
        )};
    </script>

Please see the example folder in the SDK for a simple integration.

That's it! Email us at help@polljoy.com if you have questions or suggestions!

Need more info, go to Advanced section.

 

 

Please note - polljoy web plug-in requires JQuery 1.6 or later and PHP with curl mod enabled at your server end.

Callbacks (optional)

polljoy will inform your app at different stages when polls are downloaded, ready to show, user responded etc. Your app can optionally implement the javascript functions to control the app logic via callbacks from 'polljoy' object. The javascript functions are:

    function PJPollNotAvailable(status);

When there is no poll matching your selection criteria or no more polls to show in the current session.

Status can be:
0 - session registration success
1 - session registration fail
100 - No match poll found
101 - Exception: app is missing
102 - Session Quota Reached
103 - Daily Quota Reached
104 - User Quota Reached
110 - Invalid request
999- User Account Problem

 function PJPollIsReady(polls);

When poll/s is/are ready to show (including all associated images). Friendly tip - If you are displaying the poll in the middle of an active app or app session that needs real time control, consider to pause your app before presenting the poll UI as needed.

The polls array returned are all the matched polls for the request. Please check the console log for the poll data structure. When you’re ready to present the poll, call:

 polljoy('show');

This will present the polljoy UI according to your app style and poll settings. Then the SDK will handle all the remaining tasks for you. These include handling the user’s response, informing delegate for any virtual amount user received, uploading the result to the console … etc.

For example, the following code snippets will load the poll for the app once it is ready:

    function PJPollIsReady(polls)
    {
        console.log("poll is ready");
        polljoy('show');
    }

We recommend you implement the above callback function so that you know polls are ready and call polljoy plugin to show the poll or do whatever control you need.

    function PJPollWillShow(poll);

The polljoy poll UI is ready and will show. You can do whatever UI control as needed. Or simply ignore this implementation.

 function PJPollDidShow:(poll);

The polljoy poll UI is ready and has shown. You can do whatever UI control as needed. Or simply ignore this implementation.

 function PJPollWillDismiss:(poll);

The polljoy poll UI is finished and will dismiss. You can do whatever UI control as needed. Or simply ignore this implementation. You can prepare your own UI before resuming your app before the polljoy poll UI is dismissed.

 function PJPollDidDismiss(poll);

The polljoy poll UI is finished and has dismissed. You can do whatever UI control as needed. Or simply ignore this implementation. You can prepare your own UI to resume your app before the polljoy UI is dismissed. This is the last callback from polljoy and all polls are completed. You should resume your app if you have paused.

 function PJPollDidResponded(poll);

User has responded to the poll. The poll will contain all the poll data including user’s responses. You can ignore this (the results are displayed in the web admin console and able to be exported) or use it as you wish. If you issue a virtual currency amount to user, you MUST implement this method to handle the virtual amount issued. This is the only callback from SDK that informs the app the virtual amount that the user collected.

 function PJPollDidSkipped(poll);

If the poll is not mandatory, the user can choose to skip the poll. You can handle this case or simply ignore it safely.

Poll object data structure

All callbacks will return the associated poll in JSON format. data structure will look like:

    active: true
    appImageUrl: "https://s3-us-west-1.amazonaws.com/polljoydev/library/1/623428766a188a2086432612fcfb3cba5070fad4.png"
    appName: "Polljoy"
    backgroundColor: "147f5b"
    borderColor: "147f5b"
    buttonColor: "106b4d"
    choice: "NA,A bit,Yes,No"
    customMessage: "Thanks for the feedback!"
    deleted: false
    desiredResponses: "100"
    deviceId: "antony@grandheart.com"
    fontColor: "ffffff"
    levelEnd: null
    levelStart: null
    mandatory: false
    maxPollsInARow: "1"
    maxPollsPerDay: "100"
    maxPollsPerSession: "50"
    osVersion: "Windows NT 6.3"
    platform: "ios"
    pollId: "214"
    pollImageUrl: null
    pollPlatform: "ios,android,web"
    pollText: "Do you like this feature?"
    pollToken: "3205"
    priority: "Medium"
    randomOrder: true
    sendDate: "2014-05-01 12:31:04"
    session: "214"
    sessionEnd: null
    sessionId: "2urgutid32tocnbmsled91asa6"
    sessionStart: null
    tags: null
    timeSinceInstallEnd: null
    timeSinceInstallStart: null
    totalResponses: "4"
    type: "M"
    userId: "1"
    userType: "Pay,Non-Pay"
    versionEnd: null
    versionStart: null
    virtualAmount: null
    virtualCurrency: null
    

Note: The API will regularly update to open more data. Please always check the returned JSON data for the latest data structure if you need to use it.

For callback:

 function PJPollIsReady(polls);

it will be an array of Poll

That's it! Email us at help@polljoy.com if you have questions or suggestions!

 

 

Checklist

Not seeing a poll you thought you’d see? Try these steps

  1. Have you integrated the SDK to your app and are using the correct APP ID in the startSession call? If not you can get your APP ID from the top of the Integration page
  2. Has this poll been displayed answered by this device? If it is answered it will never be shown again to the same device ID.
  3. Has this poll been displayed previously by this device but not answered? By default, a poll will only be displayed once to a device ID. Change “Ask Once” to NO in the advanced settings for a poll to override this.
  4. Was another poll just shown in the same getPoll call? By default only 2 consecutive polls are shown at a time. Go to the advanced settings for your app to change this limit.
  5. Has your device already hit the per session and per day limits for amount of polls displayed? By default at most 3 polls will be shown in a single session and also 3 per day at most. Go to the advanced settings for your app to change this limit.
  6. Were you expecting a poll with a prerequisite to appear directly after answering the prerequisite poll? Note that polls that have prerequisites will be displayed in following getPoll calls, not the one in which the prerequisite was answered.
  7. Have you hit an account limit? You can see the amount of polls remaining each month at the top right of the page.
  8. Have you tried our test app to see if it is working there? It’s included in the SDK zip file.

Still having problems? Email us at help@polljoy.com




Rating request best practices

Tips

  1. Ask for ratings during the first session, which gives the maximum volume of potential ratings. This can have a big impact in only a matter of days.
  2. Ask at a moment of accomplishment or elation and which is a natural breakpoints for the player.
  3. Good examples of points to ask for ratings include
    1. Level completed
    2. Tutorial done
    3. First boss defeated
    4. Quest completed
    5. New personal best
    6. Passed or beat another
    7. After collecting loot
    8. Lucky gacha drop gained
    9. Big wins or bonus apps completed
  4. Don’t interrupt users in the middle of app play or frustration (just failed a level)
  5. Use a filtering question to identify your fans to follow up with a rating request, and those you can collect feedback from to improve your app. Use virtual currency to reward players for their feedback.
  6. Keep the questions short and multiple choices limited.
  7. Upload your graphics and use your colors to make the dialogs as native as possible (for a higher response rate)

Need advice or help? Email us at help@polljoy.com




Customizing your poll style

How to get the right look

  • polljoy is flexible - you can customize the poll look and feel to match your app
  • To customize, go to the My app page and edit your app - there you can access all the settings to change colors/styles and upload custom graphics & sounds
  • You can download a template pack and examples here
  • If you’re looking for even more customization (for example special animation effects etc) you can modify our open-source SDK code which is available for download on Github
  • Note that whilst customization is done on an app basis, individual polls can use different poll images, or if not specified it will revert to the default image for the app, if one has been set

Need advice or help? Email us at help@polljoy.com