iFrame Usage
Now you are ready to retrieve the IFrame code snippet and put it to use.
Retrieve iFrame code
Generate the code snippet in app settings and copy this as you will need it in the next step.
Append Unique User Id
When presenting the iFrame to your users, you will need to append a unique user id to the link for each user. Add &app_uid={your_unique_id}
to the end of the src url of the iFrame from the previous step.
Example:
<iframe src="https://www.surveyb.in/configuration?params=bitJSXpWVDZsWE8xeFZsSUdlNlZjRklSQXpGUDY1cEgvaVRCTGxSTkdGMnVRdUdMVzRWSE5FU1FXRE5sWUgzd0krN0Y2WlJKb01RY1BDVFpYYmFISmRBRGtDcHZYZklrS2g4a1A4dmc0T0R2ZFYzTjhDUGlFU0wzZktubzVkdVV1cXJrME9QMjY4b09sQmR5M2VoNjJaNkZ2SWZYUkFONHZSU3NFakdoUDVrcnhLdkc3aUphOHBRclVDMHVmN0p5YVJkSEFSd0svWTRYQUR3NlNkYmMzQT09&app_uid=my_unique_test_user_id" style="border: 0; width:400px; height:800px;"></iframe>
Provide Custom Tracking Data
If you would like to provide custom data into the link and receive that via Server callbacks, you can add &session_uid={your_custom_data}
to the end of the iFrame source link and this value will be returned via SessionId
on the Server callback. This value accepts only alphanumeric characters + underscore and dash. We recommend using a url safe base64 encoding approach when passing in custom data.
Setting Up a Test User
We highly recommend adding a test user via the Test Users
tab, which will enable Test Surveys for that user and ensure surveys are available during testing. This is the best way to test the inBrain flow. The value you provide for the test user is what you should use for app_uid
when testing.
Before Going Live
Make sure to click Go Live
in the publisher dashboard before presenting the iFrame to your users.