Every asset created through the API needs a valid, unique FunnelFlux ID. This includes funnels, pages, page groups, conditions, nodes, traffic sources, offer sources, categories, and other ledger assets.
Do not invent arbitrary IDs. Our analytics database has strict ID typing and length expectations. IDs that do not follow the FunnelFlux format may be truncated or fail to match ledger assets, which can break reporting.
Use the hosted generator to create IDs manually:
https://test-resources.funnelflux.pro/api/id-generator.html
The page generates new IDs when refreshed. For automated integrations, use the same algorithm directly in your own code.
You can use this code directly, or create an equivalent function in the programming language you use:
const { floor , abs , random } = Math;
const TIMESTAMP_PART_LEN = 7 ;
const BASE_TIMESTAMP = Date. UTC ( 2019 , 6 , 23 , 0 , 0 , 0 , 0 );
// to add additional randomness we append random base62 chars after timestamp part
const RANDOM_PART_LEN = 5 ;
const ID_LEN = TIMESTAMP_PART_LEN + RANDOM_PART_LEN ;
const BASE62_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' ;
function generateEntityId () {
const timestamp = Date. now ();
const randomPart = generateRandomString ( RANDOM_PART_LEN );
if (timestamp < BASE_TIMESTAMP ) {
throw new Error ( `timestamp must be equal or greater than base timestamp: ${ BASE_TIMESTAMP }` );
}
const id = encodeNumberAsBase62 (timestamp - BASE_TIMESTAMP , TIMESTAMP_PART_LEN ) + randomPart;
if (id. length !== ID_LEN ) {
throw new Error ( `failed to generate id: length is invalid (id=${ id })` );
}
return id;
};
function generateRandomString ( len ) {
const s = [];
for ( let i = 0 ; i < len; i ++ ) {
s. push ( BASE62_CHARS . charAt ( floor ( random () * BASE62_CHARS . length )));
}
return s. join ( '' );
}
function encodeNumberAsBase62 ( n , len ) {
n = floor ( abs (n));
const s = [];
while (n !== 0 ) {
s. push ( BASE62_CHARS . charAt (n % 62 ));
n = floor (n / 62 );
}
while (s. length < len) {
s. push ( '0' );
}
return s. reverse (). join ( '' );
}
Last modified on May 18, 2026