documentation
NetFUNNEL
Client Side Agent (CSA) v.1.0.0

Client Side Agent (CSA) v.1.0.0

NetFUNNEL Client Side Dynamic Agent is a type of NetFUNNEL dedicated client for communicating with the NetFUNNEL server. By inserting the NetFUNNEL tag code, you can apply a virtual waiting room.

How It Works

The NetFUNNEL Client Side Dynamic Agent operates mainly in the following flow.

CSA 동작 흐름도

1. Before Waiting
  • When the page load is complete, the agent file and setting file are retrieved.
  • Each time the page transitions, it checks whether the current page URL matches the configured trigger rule.
  • If it matches the rule, a request to enter the NetFUNNEL server is made, and a response is received indicating whether entry is allowed.
  • If an entry permission response is received, the user stays on the page; if a waiting response is received, the user is redirected to the waiting room page.
2. While Waiting
  • From the waiting room page, entry requests are made to the NetFUNNEL server every second.
  • If an entry permission response is received, the user is redirected to the previous page.
3. After Waiting
  • The entry key is returned to the NetFUNNEL server, indicating that the entry is complete.

How to Apply the Agent

Access the NetFUNNEL console and navigate to Agent - Dynamic Agent - Client Side Agent page, then copy the code snippet and insert it at the top of the <head> tag.

💡

In MPA (Multi-Page Application) type projects, the NetFUNNEL tag code must be inserted into the <head> tag of every HTML page.

If there is a JavaScript file that is commonly referenced by all HTML files on the website, you can insert the NetFUNNEL tag code into that common file once to avoid redundant tasks.

Example of NetFUNNEL Tag Code

<script
    src="https://example.stclab.com/client/netfunnel-agent.js"
    data-nf-server-url="https://example.stclab.com"
    data-nf-setting-url="https://example.stclab.com/nf-setting.json"
    data-nf-vwr-page-url="https://example.stclab.com/vwr-page-url/index.html"
    data-nf-eum-url="https://example.stclab.com"
    data-nf-eum-use="true"
    data-nf-retry-count="1"
    data-nf-network-timeout="1000"
    onerror="(function () { window.location.href="https://example.stclab.com/vwr-page-url/index.html?vrt=network_err" })()"
></script>

Appendix

Tag NameDescriptionRequired
srcAgent file address.True
data-nf-server-urlNetFUNNEL server address.True
data-nf-setting-urlAddress of the file with settings configured in the NetFUNNEL console.True
data-nf-vwr-page-urlAddress of the virtual waiting room to redirect to if there is high traffic.True
data-nf-eum-urlCollects eum data for the specified address.True
data-nf-eum-usetrue/false. If true, collects eum data. If this attribute is removed, eum data is collected.False
data-nf-retry-countThe number of retries for a failed API request. If the number of retries is set and the API request fails, it will not retry anymore. If this attribute is removed, the default value is "1".False
data-nf-network-timeoutSets the maximum wait time for an API request in milliseconds (ms). If the API response does not arrive within the set time, the request is considered failed. Setting this to 0 disables the timeout feature. If this attribute is removed, the default value is "1000".False
onerrorIf the user arbitrarily blocks the agent file URL in the network, redirects to the virtual waiting room (network error). If this attribute is removed and the agent file cannot be loaded, it is bypassed.False