Installation
You can install the Javascript library in your project using the following NPM command.
npm install funnelql
You can then use the FunnelQL library with the file
dist/funnelql.js
or dist/funnelql+inline-worker.js
. To save bytes, you can optionally use the .nodebug.js
version without debug and Performance API functionality.The Javascript library can be included like any regular javascript file, is safe to include in concatenation and can be loaded asynchronously.
The library is completely written in Vanilla JS (original Javascript) and does not depend on other projects.
The library requires a Web Worker that can be loaded in two ways:
- 1.
- 2.as a separate worker file
funnelql-worker.js
.
You can directly include the FunnelQL library in the HTML document.
<script src="/funnelql.js" async></script>
The script will automatically load
/funnelql-worker.js
on the basis of the path of funnelql.js
.To load the web worker from a custom location, set
window['funnelql-worker']
with the path to the web worker file.<script src="/funnelql+inline-worker.js" async></script>
Once the FunnelQL library is loaded you can access the Javascript API via the global variable
$FQL
(see Javascript API)Last modified 5yr ago