Track campaign, route, and playbook links

After sending a campaign, activating a route, or enabling a playbook, you will want to learn how customers engaged and behaved. Ideally, you also want to keep that behavior as signals Hellotext can reuse later.

This is the purpose of tracking links and events: connect each click back to a customer profile, session, report, and future decision.

A short link is simply a way to reduce the length of a URL to something that looks like hello.link/3lsnvh.

This helps you overcome the 160-character limit of text messages, leaving more space for the message. On text messages, shorter links also feel more inviting.

You can share shortened links in campaign, route, playbook, and Inbox messages.

When customers click on a short link they are redirected to the original URL. Hellotext attaches a GET parameter to the original URL called hellotext_session containing a session identifier uniquely generated for each click.

Every time a customer clicks on a short link, an event is created and appears in the customer profile activity. Clicks can also be aggregated in campaign, route, or playbook reports when that report is available.

Getting started tracking

If your site runs with any of the platforms we already offer integration support, you can connect it to start tracking events automatically.

If your integration is not yet supported or if you have your own custom implementation, you can start tracking events by installing the Hellotext.js library.

Setup the library on your site

Begin by installing the library.

npm install @hellotext/hellotext

Import the library into your app.

import Hellotext from "@hellotext/hellotext";

Initialize the library passing the public HELLOTEXT_BUSINESS_ID identifier that represents the business.

You can find it from the Business’s settings page.

Hellotext.initialize("HELLOTEXT_BUSINESS_ID");

Tracking client-side events

Tracking events is straightforward and perhaps the simplest example is tracking a page view:

Hellotext.track("page.visited");

Please refer to the library usage documentation for a complete reference on all the actions and attributes available.

Tracking server-side events

Sometimes you may want to track events that happened outside the browser, for example you may want to track events directly on the server-side of your system, or at a time when the customer may not be present.

This is possible by capturing the session identifier and storing it on your system to use it later when you want to track an event associated with this session.

To obtain the current session, simply call Hellotext.session:

Hellotext.session
// Returns bBJn9vR15yPaYkWmR2QK0jopMeNxrA6l

You can then track events sending a POST request directly to the API.

Learn more: External tracking.