Actions108
- Activity Log Actions
- Consent Analysis Actions
- Cookie Scanner Actions
- Data Cleansing Actions
- Destination Actions
- Event Delivery Actions
- Event Enrichment Actions
- Live Report Builder Actions
- Mix Collect Redirect Rule Actions
- Monitoring Actions
- Normalized Datalayer Actions
- Segment Actions
- Source Actions
- Sources Data Quality Actions
- User Actions
- Web Container Actions
- Create Web Constraint
- Create Web Container
- Create Web Perimeter
- Create Web Tag
- Create Web Trigger
- Delete Web Constraint
- Delete Web Container
- Delete Web Perimeter
- Delete Web Tag
- Delete Web Trigger
- Get Web Constraint
- Get Web Perimeter
- Get Web Tag
- Get Web Trigger
- List Web Constraints
- List Web Containers
- List Web Perimeters
- List Web Tags
- List Web Triggers
- Revert Web Tag
- Update Web Constraint
- Update Web Container
- Update Web Perimeter
- Update Web Tag
- Update Web Trigger
- Web Containers Variable Actions
- Create Web Datalayer Variables
- Create Web Datalayer Variables Category
- Create Web Internal Variables
- Delete Web Datalayer Variables
- Delete Web Datalayer Variables Category
- Delete Web Internal Variables
- Get Web Datalayer Variables
- Get Web Internal Variables
- List Web Datalayer Variables
- List Web Internal Variables
- Workspace Actions
Overview
This node integrates with the Commanders Act API, specifically supporting various resources and operations related to data privacy, consent management, event delivery, and more. For the Cookie Scanner resource with the Get JS Code operation, it retrieves the JavaScript code snippet that can be embedded into a legal or cookie notice page on a website. This code automatically builds the cookie list table for visitors, helping website owners comply with cookie consent regulations by dynamically displaying cookie information.
Practical scenarios include:
- Automatically generating and updating cookie consent banners or tables on websites.
- Integrating with legal pages to ensure compliance with privacy laws like GDPR.
- Fetching the latest JavaScript code from Commanders Act to embed in web pages without manual updates.
Properties
| Name | Meaning |
|---|---|
| Query Parameters | A collection of optional query parameters to customize the API request. Includes fields such as: |
- end: End date/time filter. |
|
- Fields[template]: Template field selection. |
|
- filter: JSON object for complex filtering criteria (e.g., date ranges, search terms, segment IDs). |
|
- granularity: Level of data granularity. |
|
- include: Additional data to include. |
|
- page: Pagination details in JSON format. |
|
- sort: Sorting options, either JSON or string depending on context. |
|
- source, start, token: Other filters or authentication tokens as needed. |
The property "Query Parameters" allows flexible customization of the API call by adding any supported parameters recognized by the Commanders Act API endpoint.
Output
The node outputs an array of JSON objects representing the response from the Commanders Act API. For the Get JS Code operation under the Cookie Scanner resource, the output JSON contains the JavaScript code snippet as returned by the API. This snippet is intended to be embedded directly into a webpage.
If the API returns a string, the node attempts to parse it as JSON; if parsing fails, it returns the raw text. If no content is returned, it outputs a status message indicating "204 No Content".
No binary data output is involved in this operation.
Dependencies
- Requires an active connection to the Commanders Act API.
- Requires valid API credentials including a site identifier and an API token.
- The node uses HTTP requests to the Commanders Act API base URL:
https://api.commander1.com/v2. - Proper configuration of credentials in n8n is necessary to authenticate API calls.
Troubleshooting
- Missing Credentials Error: If API credentials are not set or invalid, the node will throw an error indicating missing credentials. Ensure the API key/token and site ID are correctly configured.
- Required Parameter Missing: For some operations, required parameters like Cookie Notice Version ID or Cookie ID must be provided. Omitting these will cause errors.
- API Request Failures: Network issues, incorrect parameters, or expired tokens may cause API call failures. Check the error message for details and verify connectivity and credentials.
- Parsing Errors: If the API returns unexpected data formats, the node might fail to parse the response. Review the raw response for troubleshooting.
Links and References
- Commanders Act Official API Documentation
- Commanders Act Cookie Scanner Overview
- General GDPR Compliance Guidelines
This summary focuses on the Cookie Scanner resource and the Get JS Code operation, describing how the node fetches the JavaScript code snippet for embedding cookie consent functionality on websites.