Dynamic tag manager for foso cdn.
npm install foso-dtmfoo, bar packages. However,
baz package if the user is from a mobile device.
js
/ somewhere in the head section of the page /
window.bottomBundler = new Bundler('js', {
id: 'bottom'
});
/ ... /
bottomBundler.addPackage({
name: 'foo'
});
/ ... /
bottomBundler.addPackage({
name: 'bar',
version: '43.2.1',
files: [
'lib/file1',
'lib/file2'
]
});
/ ... /
if (isMobile) {
bottomBundler.addPackage({
name: 'baz'
});
}
/ somewhere at the bottom of the page /
bottomBundler.load();
``