JavaScript code required to award points in InSided

  • 16 June 2020
  • 1 reply

Where can we find the generic JavaScript code snippet InSided wants us to use to award points for an action - like a survey in TypeForm or add details to their profile?

1 reply

Userlevel 5
Badge +1

Hey Eddie me again, so as Typeform is a 3rd party survey the taking of it doesn’t influence the user points directly. To do this you’ll need to build a 3rd party solution to detect if / when a user has taken a Typeform survey and then send this data to the API.

You’ll need to use this specific API endpoint again to achieve this:

Bare in mind that a connection the API can’t be made in the platform directly due to security concerns - to go down this route you’ll have build some sort of middleware layer that’s hosted somewhere online. Then once a user takes a Typeform survey, you could use a 3rd party script to detect this and then to contact the middleware layer, which then in turn will contact our API, authorises with it and then increments the points of the user who just took the survey.

Hope this makes sense, please let me know if anything isnt clear!