Skip to main content
Setting Up Socket on TutorCruncher
Sam Linge avatar
Written by Sam Linge
Updated over 3 years ago

Getting Started

There are two ways of accessing TutorCruncher's API, either straight to the API or using TutorCruncher Socket Server.

At the moment there is nothing that can be accessed through the API that can't be accessed with TutorCruncher Socket Server, so we recommend using that.

Please Note: Our socket integrations use JavaScript. The free version of many website builders, such as WordPress and SquareSpace, block JavaScript meaning your socket integrations will not show up.

Please make sure to double-check that your website builder supports JavaScript.

TutorCruncher Socket Integration

With TutorCruncher Socket, you can List your tutors online, allow clients to enquire and directly request a tutor, and also allow clients to book lessons. Socket uses TutorCruncher’s API. If you wish to implement Socket on your website, then follow our setup guide.

Feel free to check out this website for an example of how Socket could look on your website, as well as examples of different features of Socket in action.

We offer web development services for companies looking for a new website that can be fully integrated with TutorCruncher. Look at website for an example of the kind of service that we can offer.

How do I enable Socket within TutorCruncher?

Under System > Settings > People and Activity > Clients booking lessons & tutors, enable the 'Public Tutor profiles' option.

Go to System > Settings > TutorCruncher API > API Integrations, and click 'Add Socket Integration'.

Once you've clicked that, you'll have the following:

Setup Socket Integration.

Setup Socket Integration.

Your public API key is included in the Webhook URL.

Your private API key is the one under API key and should never be shared within anyone.

Using Socket on my website

There are three main options for using Socket on your website.

How do I find my public API key?

Once you have Socket enabled, your API key can be found under System > Settings > TutorCruncher API > Integrations and look for the integration called Socket Integration.

Setup Socket Integration.

Setup Socket Integration.

Your public API key is the one included in the Webhook URL between https://socket.tutorcruncher.com/ and /contractors/set. In this case, its 123456789abc, and will be used to integrate Socket into your website.

Do not share the API key (abc123...) with anyone.

Do you have a test key I can use?

You can use '9c79f14df986a1ec693c' as a test key to work with any socket integration.

Please note that this will not submit anything to your TutorCruncher account.

Importing Socket

The first step is to import socket into the page.

Anywhere on the page between either the <head></head> or <body></body> tags, insert the following line:

<script src="https://cdn.tutorcruncher.com/socket/latest/socket.js"></script>

We recommend putting it just before the last </body> tag, so it's easy to find. For instance:

<body>
<!-- Rest of your webpage code -->  <script src="https://cdn.tutorcruncher.com/socket/latest/socket.js"></script>
</body>

Adding an Allowed Domain to Socket

Because your API key is public, anyone who looked at your website could use your key to display your tutors on their own website. To make sure this cannot happen, we check that the website you are trying to load Socket from is the same one that was entered into TutorCruncher.

You can add more underSystem > Settings > TutorCruncher API > API Integrations, then go into Socket Integration > Edit > Allowed Domains.

Setting Socket up with my Wordpress website

It's just as simple as above, you just need to find the place to add the code.

When on your Dashboard, go to Pages > All Pages > The-page-you-want-to-include-Socket-on. Most people would choose Home or Index.

Choose the page to add Socket to in WordPress.

Choose the page to add Socket to in WordPress.

Then select the 'Text' view.

Select the text mode to view the code for the page.

Select the text mode to view the code for the page.

Just add the code there and Socket will be up and running in no time.

Setting Socket up with my Wix website

It's just as simple as above, you just need to find the place to add the code.

Video Tutorial

Step by step instructions

Go to the page you wish to use a Socket component on.

The first step is to enable the Wix Editor, if you haven't already.

Add an HTML iframe wherever you wish Socket to be displayed by clicking the Add Button and selecting HTML iframe.

Enter your TutorCruncher Socket code for your Wix website.

Enter your TutorCruncher Socket code for your Wix website.

Once you've done that, click the 'Enter Code' button and enter the Socket code for the component you want to include and click 'Save'.

Enter your TutorCruncher Socket code for your Wix website.

Enter your TutorCruncher Socket code for your Wix website.

If your page displays a blank space, then you may need to right-click on the element you added, and click 'Show on all pages'.

If you get a message like the one below, you may need to now add Wix's iframe domain to the list of allowed domains in TutorCruncher.

You may be required to add another domain to allow Wix to use TutorCruncher Socket.

You may be required to add another domain to allow Wix to use TutorCruncher Socket.

For instance, in the case here, we need to add https://5914f2ab-b175-4d8d-a72f-a69c15c631c8.htmlcomponentservice.com to our list of allowed domains using the guide here:

Did this answer your question?