Getting started with Subtext

Support

If you are stuck at any point or have questions about a special use case, please reach out to support@getsubtext.com.

Installing the Subtext tracking code

In order for Subtext to analyze your website traffic and compile session reports, you first need to include our code on all web pages you'd like to track. It loads a tiny JavaScript script in the background and stays completely invisible to the user.

Here's how to install Subtext on your website:

  • Go to the list of websites in your Subtext account.
  • Find the tracking code snippet and click on Copy to clipboard.
  • In your website template paste that snippet somewhere in the <head> section.

Submit session data in a form

When a lead converts, they very often submit a form (a signup form, newsletter form or similar). In order for you to map this conversion to a session, Subtext has to tell you the session ID when a lead converts.

Subtext can automatically inject session data into a form you specify. You can choose either the session ID or the complete link to the session in Subtext (this is a password-protected page only visible to users within your organization).

Injecting the session ID

To have the session ID submitted, define a hidden input field with a data-attribute called data-subtext-session-id like this:

<form action="/">
  <!-- Hidden field into which Subtext injects the session ID -->
  <input data-subtext-session-id type="hidden">

  <!-- The rest of your form -->
  <input name="email" type="text">
  ...
</form>

Injecting a link to the session report

To get the link to the session report, define a hidden input field with a data-attribute called data-subtext-session-url like this:

<form action="/">
  <!-- Hidden field where Subtext injects the link to the session report -->
  <input data-subtext-session-url type="hidden">

  <!-- The rest of your form -->
  <input name="email" type="text">
  ...
</form>

Logging conversions

To log a conversion event, add the following code somewhere on the page where the conversion happens:

<script>
  window._subtext_conversions = [{'name': 'signup'}];
</script>

Instead of 'signup' you can pick an arbitrary string to name the conversion event.

The conversion event from the above example will show up like this in your session report:

Logging custom events

Coming soon. Get notified when this features becomes available.