Entrypoint
Entry
The Entrypoint is the widget flow node from which the execution of any widget flow begins.
Description
Its primary characteristic is that there can be one, and only one, such node within a single widget flow. You cannot delete this node, create a new one, or duplicate the existing one. This node is automatically created along with the widget flow.
Configuration
Query parameters
Query parameters – a list of query parameters to be captured. You may read up to 25 query parameters from the URL of the page where the widget is rendered. The parameters are read during the execution of the Entrypoint widget flow node. This means that you can append query parameters to the URL before the widget is loaded, and they will be captured accordingly. Captured query parameters are converted into context values.
Data attributes
Data attributes are a list of custom HTML attributes prefixed with data-
, used to configure the widget during installation. They serve as a way to parameterize the widget.
Attribute names must start with data-
prefix and contain only lowercase letters (a-z
), digits (0-9
), and hyphens (-
).
For example, if you specify data-test-key
as one of the attributes, passing it in HTML like this will result in a context value of X.data_test_key
equal to 123
:
<widged-element data-test-key="123" widget-id="..."></widged-element>
Allowed origins
Allowed origins – during the execution of the Entrypoint widget flow node, the current page’s origin can also be validated. Since your widget is publicly available, anyone can copy its ID and embed it on their own site. To prevent unauthorized usage, you can restrict widget flow execution to specific origins by adding them to a whitelist. You may specify an origin or host. Wildcards are supported. You can specify up to 25 patterns.
For example:
- A value of
*
(default) allows access from any origin. https://*
permits access only on sites using HTTPS.widged.io
restricts access to the widged.io domain only.*.widged.io
additionally allows access from all subdomains of widged.io (but not main domain).
WARNING
If you want your widget to work via a share link (origin https://share.widged.io
), you need to include this origin in your configuration. By default, it will work because the setting is *
, but keep this in mind if you apply a stricter configuration.
Limitations
Name | Value |
---|---|
Max count across one flow | Exactly one |
Max query parameters to take from URL | 25 |
Query parameter name max length | 32 |
Max origin patterns | 25 |
Origin pattern max length | 256 |
Max data attributes | 25 |
Data attribute name max length | 32 (including preifx data- ) |
Inputs | None |
Outputs | Exactly one |
Context values
The Entrypoint flow node adds the following context values:
Name | Description |
---|---|
session_id , pageload_id , lead_id | Session, pageload, and lead IDs |
widget_id | Current widget ID |
page_url | An URL of page widget rendered on |
referrer | Referrer |
user_agent | User Agent |
now | a timestamp representing the start of the widget flow execution, formatted as an ISO string (for example, 2000-00-00T00:00:00.000Z ) |
timestamp | a timestamp representing the start of the widget flow execution, formatted as a number of milliseconds since the Unix epoch (midnight Jan 1st, 1970) |
timezone | Current timezone. For example, America/New_York |
language | Language code (ISO 639). For example, en , zh , ru |
country | Country code (ISO 3166 alpha-2). For example, RS , FR , DE , etc. |
ip | User's IP address (IPv4 or IPv6), for example 111.222.111.222 |
Additionally, all captured query parameters and data attributes are included. The name of a context value derived from a query parameter or data attribute is automatically normalized to the context values format.