Skip to main content

Raise custom signals from your site

Use JavaScript to trigger custom programs based on visitor actions on your website.

Updated over 2 weeks ago

Custom signals allow Fresh Relevance to respond to specific customer actions on your website. For example, when a customer orders a brochure or views a particular page, you can pass data through the signal, which remains available until email send time and can be merged into personalized emails.

How custom signals work

Custom signals use a namespace property that allows multiple signals to coexist without interference. Within the same namespace, you can have multiple triggers - the first trigger that meets its filter criteria will run.

Implement custom signals

JavaScript implementation

To raise a signal using JavaScript, add the following code to your site:

$TB.raiseSignal('your_namespace', {'exampleitem': 'examplevalue', 'another': 'value'});

The parameters work as follows:

  • First parameter: Your chosen namespace identifier (required)

  • Second parameter: Additional data as a JavaScript object (optional)

The data items passed through the signal will be available in your email layout under the extra object.

Use signal data in email layouts

When you include signal data in your email templates, use the following syntax:

Example Item: {{ extra.exampleitem }}

Another: {{ extra.another }}

Example use cases

  • Trigger a follow-up email when a visitor views a specific product category

  • Send a reminder when a customer starts but doesn't complete a form

  • Create a personalized offer based on specific browsing behavior

Did this answer your question?