Voyado Engage

Understanding script tags

Onsite messages are controlled by script tags, which act as identifiers that determine where and when a message should appear on your website. Each script call is tied to a script tag, and these tags are used to decide which onsite messages should be displayed. By default, the system provides three standard script tags, but in custom implementations, you can extend this with custom script tags for more granular targeting and control.

Default script tags

In a standard implementation, scripts that call the following script tags are implemented. Each script calls a corresponding script tag:

  1. cornerwidget
    • Used for general, site-wide display of onsite messages.
    • Displays messages configured to trigger under the cornerwidget script tag.
  2. checkout
    • Triggers on the order confirmation page (post purchase).
    • Displays messages on the order confirmation page.
  3. login
    • Triggers on a login event (i.e. when a website visitor logs in manually, or is “soft logged in” automatically).
    • Displays messages targeting logged-in users or login-related onsite messages, (for example for consent update flows to make unreachable contacts reachable again).

Default behaviour:

  • If an onsite message is created using one of these default script tags (e.g., checkout), and a user loads a page that triggers the script containing a call to that script tag, the message will display—unless targeting rules prevent it from doing so (e.g., user segments, exclusions, or scheduling).

Custom script tags

In addition to the three default tags, you can create custom script tags for advanced implementations.

Example:

  • A developer may implement a script with the custom tag abc123.
  • If an onsite message is configured with the script tag abc123, then:
    • The message will display when a script calling the script tag abc123.
    • The message will not display if other targeting criteria explicitly exclude it from doing so (e.g., additional targeting criteria like URL matching, contact matching chosen criteria in Voyado Engage, etc.).

This provides greater flexibility when you want messages to appear in specific custom scenarios outside of the default cornerwidget, checkout, or login scenarios.

How script tags influence display logic

  1. Script Load: A script is embedded on the page (default or custom).
  2. Tag Call: When the script executes, it calls its defined script tag (e.g., cornerwidget, checkout, abc123).
  3. Message Matching:
    • The system checks if there are any live/published onsite messages linked to that script tag.
    • If matches are found → proceed to step 4.
    • If no matches are found → no onsite message is shown.
  4. Targeting Rules Evaluation: The system evaluates additional targeting logic (e.g., page URL, contact belonging to a specific audience, contact being reachable/unreachable, etc).
  5. Final Decision:
    • Message is displayed if all criteria are met.
    • Message is not displayed if criterias are not met.

Example Scenarios

Scenario 1 – Default Script (checkout):

  • Script on order confirmation page calls checkout.
  • A message configured with tag checkout exists.
  • User meets all targeting criteria

Result: Message displays on order confirmation page.

Scenario 2 – Custom Script (abc123):

  • Developer creates a script tag abc123 for a campaign-specific flow.
  • An onsite message is created using abc123 script tag.
  • User does not meet one or more targeting criteria.

Result: Message does not display.

Scenario 3 – Multiple matches:

  • Sitewide script on the website calls cornerwidget.
  • There are two or more live/published onsite messages configured with script tag cornerwidget.
  • The website visitor is matching all criteria for the onsite messages to display.

Result: The system will randomly choose one of the onsite messages (creating an A/B test) and display it to the visitor. This selection will be “sticky” so if onsite message “B” is chosen for a specific visitor, every subsequent call to the same script tag will also show version “B” for that specific visitor.

This memory functionality is tied to the visitor's device/browser. If the same individual visits the website with a different device or browser they may see a different result/version from the same A/B test.

Best practices for implementation

  • Start with the scripts using the default script tags (cornerwidget, checkout, login), they are sufficient in almost all use case scenarios.
  • Ensure naming consistency for any custom script tags to avoid misconfiguration.
  • Validate targeting rules alongside script tags to confirm the correct message is being displayed.

Summary

  • Script tags are the key mechanism that determine which onsite messages display on your website.
  • By default, three script tags are available: cornerwidget, checkout, and login.
  • Custom script tags (e.g., abc123) allow advanced targeting and message delivery in specialized scenarios.
  • Final display depends on both script tag matching and targeting criteria being fulfilled.

Article last reviewed

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.