Rate this page:
The module enables apps to send events and metrics to Compass whenever specific links are added to a component.
For a complete guide to this module, see Create a data provider app for events and metrics.
A key for the module, which other modules can refer to. Must be unique within the manifest.
|Yes||A list of Compass link types that your data provider function handles. The possible values are , , , , , , and .|
|Yes||A list of domains that your data provider function handles. You can specify both full domains (e.g. ) and subdomain wildcards (e.g. ).|
|Yes||Key of the function to be invoked when a component link is added that matches one of the specified and .|
|Optional reference to the function to be invoked after the above function finishes running. For example:|
In order for your app to provide events data, add these scopes to your app manifest:
In order for your app to provide metrics data, add this scope to your manifest:
modules: compass:dataProvider: key: data-provider function: data-provider-fn callback: function: data-provider-callback-fn linkTypes: - project - repository domains: - 'www.example.com' - '*.example.org' function: - key: data-provider-fn handler: index.dataProvider - key: data-provider-callback-fn handler: index.dataProviderCallback permissions: scopes: - write:component:compass - write:event:compass - write:metric:compass
A JSON object is sent to the function that is invoked when a matching component link is added. The object contains one property:
|URL of the component link that was added.|
For details on the expected response format, see Create a data provider app for events and metrics.
A JSON object is sent to the callback function that is invoked (if specified) when the above function finishes running. The object contains these properties:
|Whether the request was successful.|
|URL the request was performed on.|
||||What went wrong, if an error did occur.|
Rate this page: