Skip to main content
Version: 4.6.1-saas

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

FieldTypeDefaultDescriptionAgent Version
clientIdstringN/AEnter the client ID issued from the console.4.0.1 or higher
secretKeystringN/AEnter the encryption key issued from the console.4.0.1 or higher
serverUrlstringN/AURL 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
settingUrlstringN/AURL 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
vwrPageUrlstringN/AURL 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
returnKeybooleantrueWhen 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
printLogbooleanfalseSets whether to output debug logs.4.0.1 or higher
goodBotsstring[]N/AConfigures to exclude good bots (search engines, etc.) from NetFUNNEL entry requests. Accepts an array of strings. Example: ["Googlebot", "Bingbot"]4.0.1 or higher
userIdstringN/AWhen 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
vwrPageDomainstringN/AUsed when constructing VWR Page URL with CNAME domain only. Example: https://vwr.example.com4.0.1 or higher
cookieDomainstringN/AYou 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'
});
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 when false