Initialization Settings
This document describes all initialization settings available in Netfunnel.initialize().
Required Parameters
The initialization settings require clientId and secretKey parameters.
Getting Client ID and Secret Key
For how to get Client ID and Secret Key and initialization examples, refer to the Quick Start document.
Basic Initialization
Using Only Required Parameters
import { Netfunnel } from 'netfunnel-node-agent';
Netfunnel.initialize({
clientId: '{{CLIENT_ID}}',
secretKey: '{{SECRET_KEY}}'
});
Initialization Setting Parameters
| Field | Type | Default | Description | Agent Version |
|---|---|---|---|---|
clientId | string | N/A | Enter the client ID issued from the console. | 4.0.1 or higher |
secretKey | string | N/A | Enter the encryption key issued from the console. | 4.0.1 or higher |
serverUrl | string | N/A | URL of the NetFUNNEL server. Used when accessing the server with a separate URL without using CNAME and not using clientId-based URL composition. (Supported for compatibility with existing methods.) | 4.0.1 or higher |
settingUrl | string | N/A | URL of the NetFUNNEL configuration file. Used when loading the configuration file with a separate URL without using CNAME and not using clientId-based URL composition. (Supported for compatibility with existing methods.) | 4.0.1 or higher |
vwrPageUrl | string | N/A | URL of the NetFUNNEL VWR Page. Specified when entering the waiting room page with a separate URL without using CNAME and not using clientId-based URL composition. | 4.0.1 or higher |
returnKey | boolean | true | When a user passes through the queue and enters the page, the next user can enter immediately. If the option is disabled, the next user will wait for a certain period even after the user enters the page. (Timeout settings can be configured in Console > Segment Settings > Advanced Settings.) | 4.0.1 or higher |
printLog | boolean | false | Sets whether to output debug logs. | 4.0.1 or higher |
goodBots | string[] | N/A | Configures to exclude good bots (search engines, etc.) from NetFUNNEL entry requests. Accepts an array of strings. Example: ["Googlebot", "Bingbot"] | 4.0.1 or higher |
userId | string | N/A | When this value is entered, the ID is used to distinguish whitelist and permanently blocked users. The ID set in Console > Repeated Request Blocking > User Settings > Accessor Management is applied. | 4.0.1 or higher |
vwrPageDomain | string | N/A | Used when constructing VWR Page URL with CNAME domain only. Example: https://vwr.example.com | 4.0.1 or higher |
cookieDomain | string | N/A | You can directly specify the domain value of the NetFUNNEL cookie to be issued. | 4.0.2 or higher |
Configuration Examples
Basic Configuration
import { Netfunnel } from 'netfunnel-node-agent';
Netfunnel.initialize({
clientId: '{{CLIENT_ID}}',
secretKey: '{{SECRET_KEY}}'
});
Enable Debug Logs
import { Netfunnel } from 'netfunnel-node-agent';
Netfunnel.initialize({
clientId: '{{CLIENT_ID}}',
secretKey: '{{SECRET_KEY}}',
printLog: true
});
Good Bot Exception Handling
import { Netfunnel } from 'netfunnel-node-agent';
Netfunnel.initialize({
clientId: '{{CLIENT_ID}}',
secretKey: '{{SECRET_KEY}}',
goodBots: ['Googlebot', 'Bingbot', 'Slurp', 'Applebot', 'facebookexternalhit']
});
User Identification Configuration
import { Netfunnel } from 'netfunnel-node-agent';
Netfunnel.initialize({
clientId: '{{CLIENT_ID}}',
secretKey: '{{SECRET_KEY}}',
userId: '{{USER_ID}}'
});
Disable Automatic Entry Key Return
import { Netfunnel } from 'netfunnel-node-agent';
Netfunnel.initialize({
clientId: '{{CLIENT_ID}}',
secretKey: '{{SECRET_KEY}}',
returnKey: false
});
Change Waiting Room Domain
import { Netfunnel } from 'netfunnel-node-agent';
Netfunnel.initialize({
clientId: '{{CLIENT_ID}}',
secretKey: '{{SECRET_KEY}}',
vwrPageDomain: 'https://wait.example.com'
});
Cookie Domain Configuration
import { Netfunnel } from 'netfunnel-node-agent';
Netfunnel.initialize({
clientId: '{{CLIENT_ID}}',
secretKey: '{{SECRET_KEY}}',
cookieDomain: '.example.com'
});
Complete Configuration Example
import { Netfunnel } from 'netfunnel-node-agent';
Netfunnel.initialize({
// Required
clientId: '{{CLIENT_ID}}',
secretKey: '{{SECRET_KEY}}',
// Server configuration (optional)
serverUrl: 'https://custom-server.example.com',
settingUrl: 'https://custom-setting.example.com',
vwrPageUrl: 'https://custom-vwr.example.com',
// Waiting room settings
vwrPageDomain: 'https://wait.example.com',
cookieDomain: '.example.com',
// Key management
returnKey: true,
// Logging
printLog: false,
// Bot exception handling
goodBots: ['Googlebot', 'Bingbot'],
// User identification
userId: '{{USER_ID}}'
});
Parameter Validation
clientId
- Required
- Type: string
- Validation: Cannot be empty string
- Source: NetFUNNEL Console → Profile Icon →
Integration Credentials
secretKey
- Required
- Type: string
- Validation: Cannot be empty string
- Source: NetFUNNEL Console → Profile Icon →
Integration Credentials
printLog
- Optional
- Type: boolean
- Default: false
- Behavior: Outputs debug logs to console when
true
goodBots
- Optional
- Type:
string[] - Default: undefined
- Example:
['Googlebot', 'Bingbot']
returnKey
- Optional
- Type: boolean
- Default: true
- Behavior: Returns key immediately when
true, returns according to timeout settings whenfalse
Related Documentation
- Installation and Initialization: Configuration guide with initialization examples
- API Reference: Function specifications and usage
- Troubleshooting: Common issues and solutions