Library modules

Library modules are the files that describe the different components that an extension provides (in other words, the logic to be emitted within the tag runtime library). The content of each library module file must follow the CommonJS module standard.

For example, if you are building an action type called “send beacon”, you must have a file that contains the logic that sends the beacon. If using JavaScript, the file could be called sendBeacon.js. The content of this file will be emitted within the tag runtime library.

You can put library module files in anywhere you like within the extension directory, provided that you describe their locations in extension.json.

Views

A view is an HTML file capable of being loaded into an iframe element within the tags application, specifically through the Platform UI and Data Collection UI. The view must include a script provided by the extension and conform to a small API in order to communicate with the application.

The most important view file for any extension is its configuration. See the section on extension configurations for more information.

There are no restrictions as to what libraries are used within your views. In other words, you may use jQuery, Underscore, React, Angular, Bootstrap, or others. However, it is still recommended to make your extension have a similar look and feel to the UI.

It is recommended that you put all view-related files (HTML, CSS, JavaScript) within a single subdirectory that is isolated from the library module files. In extension.json, you can describe where this view subdirectory is located. Platform will then serve this subdirectory (and only this subdirectory) from its web servers.