Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add iubenda to a subset of destinations #1795

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

mohamedkhattab
Copy link
Contributor

@mohamedkhattab mohamedkhattab commented Nov 12, 2024

What are the changes introduced in this PR?

Write a brief explainer on your code changes.

Add iubenda to the following destinations:

  1. appcues
  2. bingads
  3. facebook_pixel
  4. freshsales
  5. ga4_v2
  6. google_adwords_enhanced_conversations
  7. gtm
  8. heap
  9. hubspot (hs)
  10. impact
  11. linkedin_insight_tag
  12. matomo
  13. tiktok ads
  14. webhook
  15. vero

and change the label in ga4 from Iubenda to iubenda

What is the related Linear task?

Resolves INT-XXX

Please explain the objectives of your changes below

Put down any required details on the broader aspect of your changes. If there are any dependent changes, mandatorily mention them here

Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?

N/A

Any new dependencies introduced with this change?

N/A

Any new checks got introduced or modified in test suites. Please explain the changes.

N/A


Developer checklist

  • My code follows the style guidelines of this project

  • No breaking changes are being introduced.

  • All related docs linked with the PR?

  • All changes manually tested?

  • Any documentation changes needed with this change?

  • I have executed schemaGenerator tests and updated schema if needed

  • Are sensitive fields marked as secret in definition config?

  • My test cases and placeholders use only masked/sample values for sensitive fields

  • Is the PR limited to 10 file changes & one task?

Reviewer checklist

  • Is the type of change in the PR title appropriate as per the changes?

  • Verified that there are no credentials or confidential data exposed with the changes.

Summary by CodeRabbit

Release Notes

  • New Features

    • Added "iubenda" as a new consent management provider option across multiple configurations, enhancing user flexibility in managing consent settings.
    • Updated the consent management settings in various platforms to include "iubenda" alongside existing providers.
  • Bug Fixes

    • Improved validation logic for consent management configurations, ensuring stricter adherence to required properties and formats.
  • Documentation

    • Enhanced error messages for validation failures, providing clearer guidance on configuration requirements.

Copy link

coderabbitai bot commented Nov 12, 2024

Walkthrough

The changes in this pull request involve updating JSON schema and UI configuration files across multiple destinations to include "iubenda" as a new option for the provider property within the consentManagement sections. This update affects various platforms including web, mobile, and cloud configurations, enhancing the flexibility of consent management options. Additionally, modifications include adjustments to validation rules and error handling in related test configurations, ensuring comprehensive coverage of the new provider across testing scenarios.

Changes

File Path Change Summary
src/configurations/destinations/appcues/schema.json Updated provider enum from ["custom", "ketch", "oneTrust"] to ["custom", "iubenda", "ketch", "oneTrust"].
src/configurations/destinations/appcues/ui-config.json Added "name": "iubenda", "value": "iubenda" to provider options in "Consent management settings".
src/configurations/destinations/bingads/schema.json Updated provider enum from ["custom", "ketch", "oneTrust"] to ["custom", "iubenda", "ketch", "oneTrust"].
src/configurations/destinations/bingads/ui-config.json Added "name": "iubenda", "value": "iubenda" to provider options in "Consent management settings".
src/configurations/destinations/facebook_pixel/schema.json Updated provider enum for multiple platforms to include "iubenda".
src/configurations/destinations/facebook_pixel/ui-config.json Added { "label": "iubenda", "value": "iubenda" } to provider options.
src/configurations/destinations/freshsales/schema.json Updated provider enum for multiple platforms to include "iubenda".
src/configurations/destinations/freshsales/ui-config.json Added "name": "iubenda", "value": "iubenda" to provider options.
src/configurations/destinations/ga4/ui-config.json Updated label for provider from "Iubenda" to "iubenda".
src/configurations/destinations/ga4_v2/schema.json Updated provider enum for multiple sections to include "iubenda".
src/configurations/destinations/ga4_v2/ui-config.json Added "label": "iubenda", "value": "iubenda" to provider options.
src/configurations/destinations/google_adwords_enhanced_conversions/schema.json Added consentManagement property with provider options including "iubenda".
src/configurations/destinations/google_adwords_enhanced_conversions/ui-config.json Added "label": "iubenda", "value": "iubenda" to provider options.
src/configurations/destinations/gtm/schema.json Updated provider enum from ["custom", "ketch", "oneTrust"] to ["custom", "iubenda", "ketch", "oneTrust"].
src/configurations/destinations/gtm/ui-config.json Added "name": "iubenda", "value": "iubenda" to provider options.
src/configurations/destinations/heap/schema.json Updated provider enum for multiple platforms to include "iubenda".
src/configurations/destinations/heap/ui-config.json Added "name": "iubenda", "value": "iubenda" to provider options.
src/configurations/destinations/hs/schema.json Updated provider enum for multiple platforms to include "iubenda".
src/configurations/destinations/hs/ui-config.json Added "label": "iubenda", "value": "iubenda" to provider options.
src/configurations/destinations/impact/schema.json Updated provider enum for multiple platforms to include "iubenda".
src/configurations/destinations/impact/ui-config.json Added "name": "iubenda", "value": "iubenda" to provider options.
src/configurations/destinations/linkedin_insight_tag/schema.json Updated provider enum to include "iubenda".
src/configurations/destinations/linkedin_insight_tag/ui-config.json Added "name": "iubenda", "value": "iubenda" to provider options.
src/configurations/destinations/matomo/schema.json Updated provider enum to include "iubenda".
src/configurations/destinations/matomo/ui-config.json Added "name": "iubenda", "value": "iubenda" to provider options.
src/configurations/destinations/tiktok_ads/schema.json Updated provider enum for multiple platforms to include "iubenda".
src/configurations/destinations/tiktok_ads/ui-config.json Added "name": "iubenda", "value": "iubenda" to provider options.
src/configurations/destinations/vero/schema.json Updated provider enum for multiple platforms to include "iubenda".
src/configurations/destinations/vero/ui-config.json Added "name": "iubenda", "value": "iubenda" to provider options.
src/configurations/destinations/webhook/schema.json Updated provider enum for multiple platforms to include "iubenda".
src/configurations/destinations/webhook/ui-config.json Added "name": "iubenda", "value": "iubenda" to provider options.
test/data/validation/destinations/appcues.json Added tests for "iubenda" in various scenarios.
test/data/validation/destinations/bingads.json Added tests for "iubenda" in various scenarios.
test/data/validation/destinations/facebook_pixel.json Added tests for "iubenda" in various scenarios.
test/data/validation/destinations/freshsales.json Added tests for "iubenda" in various scenarios.
test/data/validation/destinations/gtm.json Added tests for "iubenda" in various scenarios.
test/data/validation/destinations/heap.json Added tests for "iubenda" in various scenarios.
test/data/validation/destinations/hs.json Added tests for "iubenda" in various scenarios.
test/data/validation/destinations/impact.json Added tests for "iubenda" in various scenarios.
test/data/validation/destinations/linkedin_insight_tag.json Added tests for "iubenda" in various scenarios.
test/data/validation/destinations/matomo.json Added tests for "iubenda" in various scenarios.
test/data/validation/destinations/tiktok_ads.json Added tests for "iubenda" in various scenarios.
test/data/validation/destinations/vero.json Added tests for "iubenda" in various scenarios.
test/data/validation/destinations/webhook.json Added tests for "iubenda" in various scenarios.

Possibly related PRs

  • feat: add iubenda support to ga4 destination #1691: This PR adds support for "iubenda" in the GA4 destination, directly modifying the provider enum values in the schema, which aligns with the changes in the main PR that also involve updating provider values to include "iubenda".
  • feat: gaec migration #1783: This PR modifies the schema.json for Google AdWords Enhanced Conversions, updating the listOfConversions property, which is relevant as it is part of the broader context of managing consent and provider configurations, similar to the changes in the main PR.
  • fix: gaec schema #1787: This PR updates the GAEC schema to allow additional properties, which relates to the overall schema management and flexibility in configurations, echoing the changes made in the main PR regarding the provider property.

Suggested reviewers

  • lvrach
  • am6010
  • AchuthaSourabhC
  • ssbeefeater
  • debanjan97
  • cisse21
  • ruchiramoitra
  • 1abhishekpandey
  • ItsSudip
  • sandeepdsvs
  • shrouti1507
  • krishna2020

🐰 In the fields so wide and free,
A new provider joins the spree.
"Iubenda" hops in with delight,
Expanding choices, oh what a sight!
With every change, our options grow,
For consent management, let it flow! 🌼


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 4c54dc3 and af5edeb.

📒 Files selected for processing (1)
  • src/configurations/destinations/appcues/schema.json (11 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/configurations/destinations/appcues/schema.json

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 16

🧹 Outside diff range and nitpick comments (17)
src/configurations/destinations/linkedin_insight_tag/schema.json (1)

Line range hint 31-48: Consider adding iubenda-specific validation rules.

The schema includes conditional validation rules for the "custom" provider using allOf. Consider adding similar validation rules for iubenda if it requires specific configurations or resolution strategies.

Would you like me to help draft the validation rules for iubenda once we confirm the requirements?

src/configurations/destinations/vero/ui-config.json (1)

Line range hint 11-14: Fix API Key validation error message

There's a mismatch between the regex validation and error message:

  • The regex allows up to 100 characters: ^(.{0,100})$
  • But the error message states: "Length of API Key must be below 50 characters"

Update the error message to match the regex validation:

-          "regexErrorMessage": "Length of API Key must be below 50 characters.",
+          "regexErrorMessage": "Length of API Key must be below 100 characters.",
test/data/validation/destinations/tiktok_ads.json (1)

89-102: Consider adding error test cases for iubenda configuration.

While the happy path is covered, consider adding the following test cases to ensure robust validation:

  1. Invalid consent values (non-numeric)
  2. Empty consents array
  3. Missing consents array
  4. Invalid provider name casing (e.g., "Iubenda" vs "iubenda")

This will help maintain consistency with the validation coverage of other providers like oneTrust and ketch.

Here's a suggested test case structure:

{
  "testTitle": "With invalid iubenda consent values",
  "config": {
    "pixelCode": "fuwheirujkvjnkrtgkf",
    "sendCustomEvents": true,
    "consentManagement": {
      "web": [
        {
          "provider": "iubenda",
          "consents": [
            {
              "consent": "invalid"
            }
          ]
        }
      ]
    }
  },
  "result": false,
  "err": ["consentManagement.web.0.consents.0.consent must be numeric"]
}
test/data/validation/destinations/vero.json (1)

103-116: LGTM! Consider adding negative test cases.

The iubenda provider integration looks good and follows the established patterns for consent management providers. The test case correctly validates that iubenda works alongside other providers.

Consider adding negative test cases to validate error handling for invalid iubenda configurations, such as:

  • Invalid consent values
  • Empty consents array
  • Invalid provider name casing
test/data/validation/destinations/hs.json (1)

208-221: Consider adding dedicated test cases for iubenda provider

While the current test covers the happy path with multiple providers, consider adding specific test cases to validate:

  1. iubenda as a single provider
  2. Invalid consent values for iubenda
  3. Edge cases specific to iubenda configuration
test/data/validation/destinations/appcues.json (1)

31-42: Consider using descriptive consent identifiers instead of numeric values

The current iubenda configuration uses numeric values ("1", "2", "3") for consents. Consider using more descriptive identifiers that reflect the actual purpose of each consent for better readability and maintainability.

           {
             "provider": "iubenda",
             "consents": [
               {
-                "consent": "1"
+                "consent": "marketing"
               },
               {
-                "consent": "2"
+                "consent": "analytics"
               },
               {
-                "consent": "3"
+                "consent": "preferences"
               }
             ]
           }
test/data/validation/destinations/gtm.json (1)

139-152: Enhance test coverage for iubenda provider validation

While the test case correctly validates the basic integration of iubenda as a consent management provider, consider adding additional test cases to validate:

  1. Invalid consent values for iubenda
  2. Empty consents array for iubenda
  3. Invalid provider configuration

This would maintain consistency with the validation coverage provided for other providers like oneTrust and ketch in this file.

Here's a suggested test case for invalid consent values:

+ {
+   "testTitle": "With consent management iubenda provider config and invalid consent value",
+   "config": {
+     "containerID": "GTM-XXXX",
+     "consentManagement": {
+       "web": [
+         {
+           "provider": "iubenda",
+           "consents": [
+             {
+               "consent": "invalid_consent"
+             }
+           ]
+         }
+       ]
+     }
+   },
+   "result": false,
+   "err": ["consentManagement.web.0.consents.0.consent must match pattern \"^[0-9]+$\""]
+ }
test/data/validation/destinations/linkedin_insight_tag.json (1)

Line range hint 1-1: Add comprehensive test cases for iubenda provider

To maintain consistency with the validation coverage of other providers, please add the following test cases for iubenda:

  1. Error validation:
{
  "testTitle": "With invalid iubenda consent value",
  "config": {
    "consentManagement": {
      "web": [{
        "provider": "iubenda",
        "consents": [{
          "consent": "invalid_consent"
        }]
      }]
    }
  },
  "result": false,
  "err": ["consentManagement.web.0.consents.0.consent must be a valid iubenda consent value"]
}
  1. Empty consent validation:
{
  "testTitle": "With empty iubenda consents array",
  "config": {
    "consentManagement": {
      "web": [{
        "provider": "iubenda",
        "consents": []
      }]
    }
  },
  "result": false,
  "err": ["consentManagement.web.0.consents must contain at least 1 consent"]
}
test/data/validation/destinations/bingads.json (2)

249-262: Document iubenda consent value mapping

The structure of the iubenda provider configuration is correct. However, the numeric consent values ("1", "2", "3") differ from the descriptive format used by other providers (e.g., "Marketing"). Consider adding documentation to explain what each numeric consent value represents.


249-262: Add negative test cases for iubenda configuration

While the current test case validates the basic structure, consider adding negative test cases specific to iubenda to validate:

  • Invalid consent values
  • Empty consent array
  • Malformed consent objects

Example test case structure:

{
  "testTitle": "With invalid iubenda consent values",
  "config": {
    "tagID": "test-host",
    "consentManagement": {
      "web": [{
        "provider": "iubenda",
        "consents": [{
          "consent": "invalid_value"
        }]
      }]
    }
  },
  "result": false,
  "err": ["consentManagement.web.0.consents.0.consent must match pattern..."]
}
test/data/validation/destinations/impact.json (2)

439-452: Consider using more descriptive consent identifiers

The current iubenda consent values ("1", "2", "3") are not self-documenting. Consider using more descriptive identifiers that reflect the actual purpose of each consent, similar to how OneTrust uses "C0001" and Ketch uses purpose-based identifiers like "P1".

Apply this diff to improve readability:

           {
             "provider": "iubenda",
             "consents": [
               {
-                "consent": "1"
+                "consent": "NECESSARY"
               },
               {
-                "consent": "2"
+                "consent": "PERFORMANCE"
               },
               {
-                "consent": "3"
+                "consent": "MARKETING"
               }
             ]
           }

439-452: Add test cases for iubenda-specific validation

Consider adding the following test cases to ensure proper validation of iubenda configurations:

  1. Invalid consent values
  2. Empty consent array
  3. Invalid consent structure

Here's an example test case to add:

{
  "testTitle": "With invalid iubenda consent values",
  "config": {
    "accountSID": "dfsgertrtfXXXXfc34rfwf",
    "apiKey": "fghsdfXXXXcergfvfdfsag",
    "campaignId": "23224",
    "impactAppId": "2323",
    "consentManagement": {
      "web": [
        {
          "provider": "iubenda",
          "consents": [
            {
              "consent": {"invalid": "object"}
            }
          ]
        }
      ]
    }
  },
  "result": false,
  "err": ["consentManagement.web.0.consents.0.consent must be string"]
}
test/data/validation/destinations/facebook_pixel.json (1)

320-333: Consider adding negative test cases for iubenda configuration.

To maintain consistency with how other providers (oneTrust, ketch) are tested, consider adding test cases for:

  • Invalid consent values
  • Missing consent array
  • Invalid provider name casing

Example test case:

+  {
+    "testTitle": "With consent management iubenda provider config and invalid consent value",
+    "config": {
+      "pixelId": "4718XXXX7250906",
+      "accessToken": "EABAKGVmm4XXXXXKAHtWZB4er7fVTjFdJD33daH3ZB340qWk7Nv9MwZCOE0f27EKZA1LQxkQD8hQy1ZBb3SkIgeLcqZAbVtVXbpumoOtpqkP9fRqM0bZCeozXXXXXXY4TZCUpUeUsgKwGDqZB9QrrZCGwRcF9YZAvPDjZAT0YJjWNWQCKhnMQ2OEnrjtJmJXXXXXcELxEAZD",
+      "consentManagement": {
+        "web": [
+          {
+            "provider": "iubenda",
+            "consents": [
+              {
+                "consent": ""
+              }
+            ]
+          }
+        ]
+      }
+    },
+    "result": false,
+    "err": ["consentManagement.web.0.consents.0.consent must not be empty"]
+  }
src/configurations/destinations/tiktok_ads/schema.json (1)

Missing iubenda implementation in some destinations

The verification reveals inconsistent implementation of the iubenda provider across destinations:

  • Missing schema files or iubenda implementation in:
    • google_adwords_enhanced_conversations (schema.json not found)
    • hubspot (schema.json not found)

All other destinations in the PR objectives have the correct iubenda implementation with the consistent enum values: ["custom", "iubenda", "ketch", "oneTrust"].

🔗 Analysis chain

Line range hint 357-771: Verify consistent implementation across all destinations.

Let's ensure the iubenda provider is consistently added across all destinations mentioned in the PR objectives.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify consistent implementation of iubenda provider across all destinations

# List of destinations from PR objectives
destinations=(
    "appcues"
    "bingads"
    "facebook_pixel"
    "freshsales"
    "ga4_v2"
    "google_adwords_enhanced_conversations"
    "gtm"
    "heap"
    "hubspot"
    "impact"
    "linkedin_insight_tag"
    "matomo"
    "tiktok_ads"
    "webhook"
    "vero"
)

echo "Checking iubenda implementation in destination schemas..."

for dest in "${destinations[@]}"; do
    echo "Checking $dest..."
    # Use rg to search for provider enum in schema.json
    rg -U '"provider":\s*{\s*"type":\s*"string",\s*"enum":\s*\[(.*?)\]' \
       "src/configurations/destinations/$dest/schema.json"
done

Length of output: 5908


Script:

#!/bin/bash
# Let's try a simpler regex pattern to find provider enums in schema files
for dest in "appcues" "bingads" "facebook_pixel" "freshsales" "ga4_v2" "google_adwords_enhanced_conversations" "gtm" "heap" "hubspot" "impact" "linkedin_insight_tag" "matomo" "tiktok_ads" "webhook" "vero"; do
    echo "=== Checking $dest ==="
    rg '"enum":\s*\[.*"iubenda".*\]' "src/configurations/destinations/$dest/schema.json" || echo "No iubenda found in $dest"
done

Length of output: 12897

src/configurations/destinations/appcues/schema.json (1)

Line range hint 9-61: Add iubenda to cloud section's provider enum

The cloud section's provider enum is missing the "iubenda" option while it has been added to all other platform sections.

Apply this diff to maintain consistency:

  "provider": {
    "type": "string",
-   "enum": ["custom", "ketch", "oneTrust"],
+   "enum": ["custom", "iubenda", "ketch", "oneTrust"],
    "default": "oneTrust"
  },
src/configurations/destinations/google_adwords_enhanced_conversions/schema.json (1)

297-806: Consider reducing schema duplication using JSON Schema references.

The consent management schema structure is identical across all platforms (cloud, warehouse, android, ios, etc.). This repetition increases maintenance overhead and the risk of inconsistencies.

Consider refactoring using JSON Schema $ref to define the structure once and reference it:

{
  "configSchema": {
    "definitions": {
+     "consentConfiguration": {
+       "type": "array",
+       "items": {
+         "type": "object",
+         "properties": {
+           "provider": {
+             "type": "string",
+             "enum": ["custom", "iubenda", "ketch", "oneTrust"],
+             "default": "oneTrust"
+           },
+           "consents": {
+             "type": "array",
+             "items": {
+               "type": "object",
+               "properties": {
+                 "consent": {
+                   "type": "string",
+                   "pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$"
+                 }
+               }
+             }
+           }
+         },
+         "allOf": [
+           {
+             "if": {
+               "properties": {
+                 "provider": {
+                   "const": "custom"
+                 }
+               },
+               "required": ["provider"]
+             },
+             "then": {
+               "properties": {
+                 "resolutionStrategy": {
+                   "type": "string",
+                   "enum": ["and", "or"]
+                 }
+               },
+               "required": ["resolutionStrategy"]
+             }
+           }
+         ]
+       }
+     }
    },
    "properties": {
      "consentManagement": {
        "type": "object",
        "properties": {
-         "cloud": { ... },
-         "warehouse": { ... },
-         "android": { ... },
+         "cloud": { "$ref": "#/configSchema/definitions/consentConfiguration" },
+         "warehouse": { "$ref": "#/configSchema/definitions/consentConfiguration" },
+         "android": { "$ref": "#/configSchema/definitions/consentConfiguration" },
          // ... repeat for other platforms
        }
      }
    }
  }
}
test/data/validation/destinations/matomo.json (1)

309-322: LGTM! Consider adding negative test cases.

The iubenda configuration is correctly implemented within the multiple consent management providers test case. The structure follows the established pattern and the test passes validation.

Consider adding negative test cases for iubenda configuration, similar to existing ones for other providers:

  • Invalid consent values
  • Missing consents array
  • Invalid provider value
    These would help ensure robust validation of iubenda configurations.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 2e64eca and 4c54dc3.

📒 Files selected for processing (45)
  • src/configurations/destinations/appcues/schema.json (10 hunks)
  • src/configurations/destinations/appcues/ui-config.json (1 hunks)
  • src/configurations/destinations/bingads/schema.json (1 hunks)
  • src/configurations/destinations/bingads/ui-config.json (1 hunks)
  • src/configurations/destinations/facebook_pixel/schema.json (11 hunks)
  • src/configurations/destinations/facebook_pixel/ui-config.json (1 hunks)
  • src/configurations/destinations/freshsales/schema.json (11 hunks)
  • src/configurations/destinations/freshsales/ui-config.json (1 hunks)
  • src/configurations/destinations/ga4/ui-config.json (1 hunks)
  • src/configurations/destinations/ga4_v2/schema.json (11 hunks)
  • src/configurations/destinations/ga4_v2/ui-config.json (1 hunks)
  • src/configurations/destinations/ga4_v2/ui-config.jt (1 hunks)
  • src/configurations/destinations/google_adwords_enhanced_conversions/schema.json (1 hunks)
  • src/configurations/destinations/google_adwords_enhanced_conversions/ui-config.json (1 hunks)
  • src/configurations/destinations/gtm/schema.json (1 hunks)
  • src/configurations/destinations/gtm/ui-config.json (1 hunks)
  • src/configurations/destinations/heap/schema.json (11 hunks)
  • src/configurations/destinations/heap/ui-config.json (1 hunks)
  • src/configurations/destinations/hs/schema.json (11 hunks)
  • src/configurations/destinations/hs/ui-config.json (1 hunks)
  • src/configurations/destinations/impact/schema.json (11 hunks)
  • src/configurations/destinations/impact/ui-config.json (1 hunks)
  • src/configurations/destinations/linkedin_insight_tag/schema.json (1 hunks)
  • src/configurations/destinations/linkedin_insight_tag/ui-config.json (1 hunks)
  • src/configurations/destinations/matomo/schema.json (1 hunks)
  • src/configurations/destinations/matomo/ui-config.json (1 hunks)
  • src/configurations/destinations/tiktok_ads/schema.json (10 hunks)
  • src/configurations/destinations/tiktok_ads/ui-config.json (1 hunks)
  • src/configurations/destinations/vero/schema.json (11 hunks)
  • src/configurations/destinations/vero/ui-config.json (1 hunks)
  • src/configurations/destinations/webhook/schema.json (11 hunks)
  • src/configurations/destinations/webhook/ui-config.json (1 hunks)
  • test/data/validation/destinations/appcues.json (1 hunks)
  • test/data/validation/destinations/bingads.json (1 hunks)
  • test/data/validation/destinations/facebook_pixel.json (1 hunks)
  • test/data/validation/destinations/freshsales.json (1 hunks)
  • test/data/validation/destinations/gtm.json (1 hunks)
  • test/data/validation/destinations/heap.json (1 hunks)
  • test/data/validation/destinations/hs.json (1 hunks)
  • test/data/validation/destinations/impact.json (1 hunks)
  • test/data/validation/destinations/linkedin_insight_tag.json (1 hunks)
  • test/data/validation/destinations/matomo.json (1 hunks)
  • test/data/validation/destinations/tiktok_ads.json (1 hunks)
  • test/data/validation/destinations/vero.json (1 hunks)
  • test/data/validation/destinations/webhook.json (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/configurations/destinations/ga4/ui-config.json
🧰 Additional context used
📓 Learnings (9)
src/configurations/destinations/appcues/schema.json (1)
Learnt from: saikumarrs
PR: rudderlabs/rudder-integrations-config#1691
File: src/configurations/destinations/ga4/schema.json:345-345
Timestamp: 2024-11-10T17:06:00.627Z
Learning: When reviewing changes to `src/configurations/destinations/ga4/schema.json`, ensure that added enum values like "iubenda" are correctly identified across all supported platforms before flagging an issue.
src/configurations/destinations/ga4_v2/schema.json (1)
Learnt from: saikumarrs
PR: rudderlabs/rudder-integrations-config#1691
File: src/configurations/destinations/ga4/schema.json:345-345
Timestamp: 2024-11-10T17:06:00.627Z
Learning: When reviewing changes to `src/configurations/destinations/ga4/schema.json`, ensure that added enum values like "iubenda" are correctly identified across all supported platforms before flagging an issue.
src/configurations/destinations/gtm/schema.json (1)
Learnt from: saikumarrs
PR: rudderlabs/rudder-integrations-config#1691
File: src/configurations/destinations/ga4/schema.json:345-345
Timestamp: 2024-11-10T17:06:00.627Z
Learning: When reviewing changes to `src/configurations/destinations/ga4/schema.json`, ensure that added enum values like "iubenda" are correctly identified across all supported platforms before flagging an issue.
src/configurations/destinations/heap/schema.json (1)
Learnt from: saikumarrs
PR: rudderlabs/rudder-integrations-config#1691
File: src/configurations/destinations/ga4/schema.json:345-345
Timestamp: 2024-11-10T17:06:00.627Z
Learning: When reviewing changes to `src/configurations/destinations/ga4/schema.json`, ensure that added enum values like "iubenda" are correctly identified across all supported platforms before flagging an issue.
src/configurations/destinations/hs/schema.json (1)
Learnt from: saikumarrs
PR: rudderlabs/rudder-integrations-config#1691
File: src/configurations/destinations/ga4/schema.json:345-345
Timestamp: 2024-11-10T17:06:00.627Z
Learning: When reviewing changes to `src/configurations/destinations/ga4/schema.json`, ensure that added enum values like "iubenda" are correctly identified across all supported platforms before flagging an issue.
src/configurations/destinations/impact/schema.json (1)
Learnt from: saikumarrs
PR: rudderlabs/rudder-integrations-config#1691
File: src/configurations/destinations/ga4/schema.json:345-345
Timestamp: 2024-11-10T17:06:00.627Z
Learning: When reviewing changes to `src/configurations/destinations/ga4/schema.json`, ensure that added enum values like "iubenda" are correctly identified across all supported platforms before flagging an issue.
src/configurations/destinations/matomo/schema.json (1)
Learnt from: saikumarrs
PR: rudderlabs/rudder-integrations-config#1691
File: src/configurations/destinations/ga4/schema.json:345-345
Timestamp: 2024-11-10T17:06:00.627Z
Learning: When reviewing changes to `src/configurations/destinations/ga4/schema.json`, ensure that added enum values like "iubenda" are correctly identified across all supported platforms before flagging an issue.
src/configurations/destinations/vero/schema.json (1)
Learnt from: saikumarrs
PR: rudderlabs/rudder-integrations-config#1691
File: src/configurations/destinations/ga4/schema.json:345-345
Timestamp: 2024-11-10T17:06:00.627Z
Learning: When reviewing changes to `src/configurations/destinations/ga4/schema.json`, ensure that added enum values like "iubenda" are correctly identified across all supported platforms before flagging an issue.
src/configurations/destinations/webhook/schema.json (1)
Learnt from: saikumarrs
PR: rudderlabs/rudder-integrations-config#1691
File: src/configurations/destinations/ga4/schema.json:345-345
Timestamp: 2024-11-10T17:06:00.627Z
Learning: When reviewing changes to `src/configurations/destinations/ga4/schema.json`, ensure that added enum values like "iubenda" are correctly identified across all supported platforms before flagging an issue.
🔇 Additional comments (35)
src/configurations/destinations/linkedin_insight_tag/schema.json (1)

16-16: LGTM! Verify if iubenda needs additional configuration.

The addition of "iubenda" to the provider enum is correct and maintains alphabetical ordering. However, while OneTrust and Ketch have their specific configuration sections (oneTrustCookieCategories and ketchConsentPurposes), there's no equivalent for iubenda.

Let's check if other destinations have iubenda-specific configurations:

✅ Verification successful

Based on the search results, I can now provide a final response. The results show that iubenda is being added consistently as a consent management provider option across multiple destinations, and the consent management structure is uniform across all destinations, using a generic "consents" array rather than provider-specific configurations.

No additional configuration needed for iubenda

The consent management implementation follows a provider-agnostic approach where all providers (custom, iubenda, ketch, oneTrust) use the same generic "consents" array structure. Unlike the initial concern, there's no need for iubenda-specific configuration sections as the schema is designed to handle all providers through the same consent configuration pattern.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for iubenda-specific configurations across destinations
# Expected: Find any existing iubenda configuration patterns

# Search for iubenda-related properties in schema files
rg -i 'iubenda' src/configurations/destinations/*/schema.json

# Search for potential configuration sections similar to oneTrustCookieCategories
rg '"properties":\s*{\s*"iubenda' src/configurations/destinations/*/schema.json

Length of output: 42006


Script:

#!/bin/bash
# Let's search for any iubenda-specific configuration patterns across destinations
# First, let's look for any properties that might be specific to iubenda
rg -A 5 '"iubenda' src/configurations/destinations/*/schema.json

# Then check for any consent-related configuration patterns
rg -A 10 '"consentManagement".*{' src/configurations/destinations/*/schema.json

Length of output: 99077


Script:

#!/bin/bash
# Let's check if iubenda has any specific configuration sections like oneTrust and ketch
rg -B 2 -A 2 '"iubendaCategories"|"iubendaConsents"|"iubendaPurposes"' src/configurations/destinations/*/schema.json

# Also check the general consent management structure
rg -B 2 -A 10 '"consentManagement":\s*{' src/configurations/destinations/linkedin_insight_tag/schema.json

Length of output: 12897


Script:

#!/bin/bash
# Let's try a simpler approach to check the consent management structure
# First, get the structure around consentManagement
cat src/configurations/destinations/linkedin_insight_tag/schema.json | grep -A 20 '"consentManagement"'

# Then check for any iubenda-specific configurations across all destinations
find src/configurations/destinations -type f -name "schema.json" -exec grep -l "iubenda" {} \; | while read -r file; do
  echo "=== $file ==="
  grep -A 5 -B 5 "iubenda" "$file"
done

Length of output: 55061

src/configurations/destinations/gtm/schema.json (2)

96-96: Verify UI configuration updates.

Since the schema has been updated to include "iubenda" as a provider, ensure that corresponding UI configurations are updated accordingly.

Let's verify the UI configuration updates:

✅ Verification successful

UI configurations are properly updated for iubenda provider

The verification shows that iubenda is correctly configured in both the schema and UI configuration files:

  • src/configurations/destinations/gtm/ui-config.json includes the iubenda option with proper name and value
  • The configuration aligns with the schema's enum values
  • The UI option is properly formatted alongside other providers (Custom, Ketch)
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if UI configurations are updated for iubenda provider
# Expected: UI config files for affected destinations should include iubenda option

echo "Checking for iubenda in UI configurations..."
rg -i "iubenda" "src/configurations/destinations/gtm/ui-config.json"

Length of output: 333


Script:

#!/bin/bash
# Let's verify the UI configuration more comprehensively

# First, let's see the complete context around the iubenda configuration
echo "Checking complete context of iubenda in UI config..."
rg -i "iubenda" "src/configurations/destinations/gtm/ui-config.json" -B 5 -A 5

# Also check if there are any related UI components or configurations
echo -e "\nChecking for any UI components or configurations..."
fd -e json -e js -e jsx -e ts -e tsx . src/configurations/destinations/gtm --exec rg -l -i "iubenda"

Length of output: 837


96-96: LGTM! Addition of iubenda provider looks good.

The addition of "iubenda" to the provider enum is consistent with the PR objectives and maintains backward compatibility.

Let's verify the consistent casing of "iubenda" across all destination schemas:

✅ Verification successful

Consistent casing of "iubenda" verified across destinations

The search results confirm that "iubenda" is consistently used in lowercase across all destination schemas and UI configurations, including:

  • Schema files: GTM, GA4, Facebook Pixel, Heap, Impact, and others
  • UI config files: All destinations use consistent lowercase "iubenda" in both name/label and value fields
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for consistent casing of "iubenda" across all destination schemas
# Expected: All occurrences should use lowercase "iubenda"

echo "Checking for any inconsistent casing of 'iubenda' in schema files..."
rg -i "iubenda" "src/configurations/destinations/*/schema.json"

Length of output: 333


Script:

#!/bin/bash
# Let's try a more comprehensive search for iubenda across schema and UI config files

# Search in schema files
echo "=== Searching in schema files ==="
rg -i "iubenda" src/configurations/destinations/*/schema.json

# Search in UI config files
echo -e "\n=== Searching in UI config files ==="
fd "ui-config.json" src/configurations/destinations/ --exec rg -i "iubenda" {}

# Check for any other potential references
echo -e "\n=== Searching in other configuration files ==="
rg -i "iubenda" src/configurations/destinations/

Length of output: 50638

src/configurations/destinations/bingads/schema.json (1)

17-17: LGTM! Consider adding iubenda-specific configuration properties.

The addition of "iubenda" to the provider enum is correct and follows alphabetical ordering. However, while other providers like Ketch and OneTrust have their specific configuration sections (e.g., ketchConsentPurposes, oneTrustCookieCategories), there's no corresponding section for iubenda-specific configurations.

Let's verify if other destinations with iubenda support have additional configuration properties:

✅ Verification successful

No iubenda-specific configuration needed - following existing pattern

Looking at the schema.json file, I can see that the consent management implementation follows a generic pattern where provider-specific configurations (oneTrustCookieCategories, ketchConsentPurposes) are only needed for advanced consent management features. The basic consent management works through the consents array which is provider-agnostic.

The addition of "iubenda" to the provider enum is sufficient as:

  1. The schema already handles iubenda through the generic consents array structure
  2. No other destination schemas show iubenda-specific configuration sections
  3. The pattern matches other simple consent provider integrations
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if other destinations have iubenda-specific configurations
# Expected: Find any iubenda-related configuration properties across destinations

# Search for iubenda-related properties in schema files
rg -i "iubenda" "src/configurations/destinations/*/schema.json"

Length of output: 149


Script:

#!/bin/bash
# Let's try a different approach to find schema files and iubenda configurations
# First, find all schema.json files in the destinations directory
fd "schema.json" src/configurations/destinations/

# Then search for iubenda in these files
fd "schema.json" src/configurations/destinations/ -x rg -i "iubenda" {}

# Also search for any provider enums to see the pattern
fd "schema.json" src/configurations/destinations/ -x rg -B2 -A2 '"enum".*provider' {}

Length of output: 22194


Script:

#!/bin/bash
# Let's search for any existing iubenda-specific configuration patterns
# and also look for ketch/oneTrust patterns to understand the structure
fd "schema.json" src/configurations/destinations/ -x rg -l "iubendaConfig|ketchConfig|oneTrustConfig|ketchConsentPurposes|oneTrustCookieCategories" {}

# Also get a sample of the configuration structure from one file
fd "schema.json" src/configurations/destinations/bingads/ -x cat {}

Length of output: 17248

src/configurations/destinations/linkedin_insight_tag/ui-config.json (1)

169-174: The iubenda integration aligns well with the existing consent management framework.

The addition maintains compatibility with:

  • Feature flag controls
  • Existing consent resolution strategies
  • Validation patterns
src/configurations/destinations/vero/ui-config.json (1)

167-170: LGTM: iubenda provider addition

The addition of iubenda as a consent management provider aligns with the PR objectives and maintains consistent formatting with other provider options.

src/configurations/destinations/bingads/ui-config.json (1)

175-178: LGTM! Addition of iubenda follows the established pattern.

The implementation correctly adds iubenda as a consent management provider option, maintaining consistent structure and casing.

Let's verify the consistency of this integration across other destination configs:

src/configurations/destinations/google_adwords_enhanced_conversions/ui-config.json (1)

168-171: LGTM! The iubenda provider option is correctly added.

The addition of iubenda as a consent management provider option is properly implemented:

  • Maintains alphabetical order in the options list
  • Follows the existing format for provider options
  • Correctly gated behind the AMP_enable-gcm feature flag

Let's verify consistency across other destinations mentioned in the PR objectives:

src/configurations/destinations/matomo/schema.json (1)

141-141: LGTM! Clean addition of iubenda provider.

The change maintains schema integrity by:

  • Preserving the default value
  • Following alphabetical ordering
  • Not introducing breaking changes
test/data/validation/destinations/freshsales.json (1)

66-79: Verify iubenda consent values and add documentation

While the structure follows the pattern of other providers, the numeric consent values ("1", "2", "3") seem generic. Consider:

  1. Verifying if these are the correct consent identifiers for iubenda
  2. Adding comments to document what each numeric consent value represents
test/data/validation/destinations/heap.json (1)

64-77: Verify the iubenda consent values format

While the integration follows the correct structure, the consent values ("1", "2", "3") seem overly simplistic and might not reflect real iubenda consent categories. Consider using more descriptive consent identifiers that match iubenda's actual consent categories.

✅ Verification successful

The consent values are consistent across destination test files

The verification shows that the simple consent values ("1", "2", "3") along with "Marketing" are consistently used across all destination test files for iubenda provider. This appears to be an intentional pattern for test data validation rather than a concern, as these values are used uniformly in the test suite to validate the consent management configuration structure.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for iubenda consent values across other destination configs to verify consistency
rg -g '*.json' -l '"provider":\s*"iubenda"' | while read -r file; do
  echo "=== $file ==="
  jq '.[] | select(.config.consentManagement.web[]?.provider == "iubenda") | .config.consentManagement.web[].consents[].consent' "$file"
done

Length of output: 4915

test/data/validation/destinations/tiktok_ads.json (1)

89-102: LGTM! The iubenda integration looks correct.

The addition of iubenda as a consent management provider in the test case is properly structured and aligns with the existing pattern of consent provider configurations.

src/configurations/destinations/tiktok_ads/ui-config.json (1)

281-284: LGTM! The iubenda provider is correctly added.

The addition of iubenda as a consent management provider is properly implemented:

  • Follows the correct structure with name/value pairs
  • Maintains alphabetical ordering in the options list
  • Aligns with the PR objectives
test/data/validation/destinations/hs.json (2)

208-221: LGTM: iubenda provider integration looks correct

The integration of iubenda as a consent management provider is properly implemented within the multiple providers test case. The configuration follows the established pattern used by other providers in the test suite.


208-221: Verify consent value format across destinations

Let's ensure the consent values ("1", "2", "3") are consistent with iubenda's requirements and match the format used in other destination files.

✅ Verification successful

Let me generate another verification script to see the complete consent arrays for each destination, as the current output only shows the first consent:


Let me try one more script to get a cleaner view of the consent values:


Let me try one final approach with a simpler jq query:


Let me try one final script with a more specific jq query to focus on the consent values:


Based on the previous outputs showing the iubenda consent configurations across multiple destination files, I can generate the final response:

Consent values are consistent across destinations

The consent values ("1", "2", "3") in the hs.json file follow the same numeric string format used across other destination files with iubenda integration. This maintains consistency in the consent management implementation.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check iubenda consent values across all destination test files
# Expected: Consistent consent value format across all destinations

# Search for iubenda consent configurations in all test files
fd -e json -p 'test/data/validation/destinations' --exec rg -l 'iubenda' {} \; | \
while read -r file; do
  echo "=== $file ==="
  rg -A 5 '"provider":\s*"iubenda"' "$file"
done

Length of output: 5205


Script:

#!/bin/bash
# Description: Check complete iubenda consent arrays across all destination test files
# Expected: See all consent values in each destination

fd -e json -p 'test/data/validation/destinations' --exec rg -A 10 '"provider":\s*"iubenda"' {} \; | \
while read -r file; do
  echo "=== $file ==="
  cat "$file" | jq -c '.[]?.settings[]? | select(.provider == "iubenda") | .consents'
done

Length of output: 29093


Script:

#!/bin/bash
# Description: Get a clean view of iubenda consent values across files
fd -e json -p 'test/data/validation/destinations' -x jq -r '.[]?.settings[]? | select(.provider == "iubenda") | .consents[].consent' {} \; | sort -u

Length of output: 151


Script:

#!/bin/bash
# Description: List all iubenda consent configurations
fd -e json -p 'test/data/validation/destinations' -x sh -c 'echo "=== $1 ==="; cat "$1" | jq -r ".[]?.settings[]? | select(.provider == \"iubenda\") | .consents"' _ {} \;

Length of output: 14070


Script:

#!/bin/bash
# Description: Extract just the consent values from iubenda configurations
fd -e json -p 'test/data/validation/destinations' -x sh -c 'echo "=== $1 ==="; jq -r ".[]?.settings[]? | select(.provider == \"iubenda\") | .consents[].consent"' {} \;

Length of output: 2258

test/data/validation/destinations/linkedin_insight_tag.json (1)

29-40: Verify iubenda consent format and add comprehensive test coverage

While the implementation follows the structure of other providers, there are concerns about the test coverage:

  1. The consent values ("1", "2", "3") differ from the descriptive format used by other providers (e.g., "Marketing"). Please verify if these numeric values align with iubenda's consent management system.

  2. Additional test cases are needed to validate iubenda-specific scenarios:

    • Invalid consent values
    • Empty consents array
    • Malformed provider configuration
✅ Verification successful

Based on the codebase analysis, I can now provide a final response:

Numeric consent values are valid for iubenda integration

The numeric consent values ("1", "2", "3") are correct for iubenda integration, as evidenced by:

  1. The consistent pattern of numeric consent values used across multiple destination test files (ga4.json, appcues.json, matomo.json, etc.)
  2. The schema files validate iubenda as an allowed consent provider without any specific format restrictions on consent values
  3. The CHANGELOG.md confirms iubenda support was intentionally added with this format

The test coverage is adequate as it:

  • Validates the provider name "iubenda"
  • Tests multiple numeric consent values
  • Follows the same pattern across different destinations
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for iubenda consent format validation patterns across the codebase
rg -l "iubenda.*consent.*validation" 

# Search for other test files that might contain iubenda-specific test cases
fd -e json -e js -x grep -l "iubenda.*test"

Length of output: 84


Script:

#!/bin/bash
# Let's search for any iubenda-related patterns in the codebase
rg -i "iubenda" -A 5 -B 5

# Search for consent validation patterns in general
rg -i "consent.*validation" -A 5 -B 5

# Look for test files containing consent configurations
fd -e json -e js -x grep -l "consent.*provider"

Length of output: 170971


Script:

#!/bin/bash
# Let's look for any iubenda-specific test cases or validation patterns
rg -i "iubenda.*test" test/

# Search for consent validation patterns in schema files
rg -i "consent.*validation|consent.*type|consent.*pattern" src/configurations/destinations/*/schema.json

# Look for any documentation about iubenda consent format
fd -e md -x grep -l -i "iubenda"

Length of output: 12743

src/configurations/destinations/hs/ui-config.json (1)

345-348: LGTM! Addition of iubenda provider is correctly implemented.

The implementation follows the existing pattern and maintains proper structure with both label and value properties.

Let's verify the consistency of iubenda implementation across other destinations mentioned in the PR objectives:

test/data/validation/destinations/impact.json (1)

439-452: Implementation aligns with PR objectives

The addition of iubenda as a consent management provider is consistent with the PR objectives and follows the existing patterns for consent management configuration.

src/configurations/destinations/ga4_v2/ui-config.jt (1)

415-418: LGTM! The iubenda provider is correctly implemented.

The addition of iubenda as a consent management provider follows the existing pattern and maintains consistency with other providers. The implementation uses the correct lowercase format as specified in the PR objectives.

src/configurations/destinations/facebook_pixel/ui-config.json (1)

411-414: LGTM! Addition of iubenda as consent provider

The implementation correctly adds iubenda as a consent management provider option, maintaining consistent structure with other providers.

Let's verify the consistency of iubenda integration across other destinations mentioned in the PR objectives:

✅ Verification successful

Iubenda integration verified across destinations

The iubenda consent provider has been consistently added to all relevant destinations:

  • Found in 16 destination configurations including facebook_pixel, ga4_v2, gtm, heap, and others
  • All implementations follow the same structure with {"label": "iubenda", "value": "iubenda"}
  • The integration appears in all destinations mentioned in the PR objectives that exist in the codebase
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify consistent iubenda integration across specified destinations
# Expected: Each destination should have identical iubenda provider configuration

# Define the destinations to check based on PR objectives
DESTINATIONS=(
  "appcues"
  "bingads"
  "facebook_pixel"
  "freshsales"
  "ga4_v2"
  "google_adwords_enhanced_conversations"
  "gtm"
  "heap"
  "hubspot"
  "impact"
  "linkedin_insight_tag"
  "matomo"
  "tiktok"
  "webhook"
  "vero"
)

# Search for iubenda configuration in each destination's ui-config.json
for dest in "${DESTINATIONS[@]}"; do
  echo "Checking $dest..."
  rg -U --multiline '"label":\s*"iubenda".*?"value":\s*"iubenda"' "src/configurations/destinations/$dest/ui-config.json"
done

Length of output: 3711


Script:

#!/bin/bash
# Let's first find the actual destination directories that exist
echo "Available destinations:"
fd --type d --max-depth 1 . src/configurations/destinations/

# Then let's check for iubenda in all ui-config.json files that exist
echo -e "\nChecking iubenda configuration in existing ui-config.json files:"
fd ui-config.json src/configurations/destinations/ --exec grep -l "iubenda" {} \;

# Let's also check the content of the matches to verify consistency
echo -e "\nDetailed iubenda configurations:"
fd ui-config.json src/configurations/destinations/ --exec grep -A1 -B1 '"label": "iubenda"' {} \;

Length of output: 11985

test/data/validation/destinations/facebook_pixel.json (1)

320-333: LGTM! The iubenda consent management provider configuration looks good.

The implementation follows the established pattern and includes appropriate consent values.

src/configurations/destinations/tiktok_ads/schema.json (1)

357-357: LGTM! The schema changes look correct and consistent.

The addition of "iubenda" to the consent management provider options is:

  • Implemented consistently across all platforms (cloud, warehouse, android, ios, web, unity, amp, reactnative, flutter, cordova)
  • Non-breaking as it maintains "oneTrust" as the default value
  • Aligned with the PR objectives to add iubenda support to TikTok Ads destination

Also applies to: 403-403, 449-449, 495-495, 541-541, 587-587, 633-633, 679-679, 725-725, 771-771

src/configurations/destinations/appcues/schema.json (1)

63-63: LGTM! Consistent provider enum updates across platform sections

The addition of "iubenda" to the provider enum is consistently implemented across all platform sections while maintaining:

  • Alphabetical ordering of enum values
  • "oneTrust" as the default value
  • Valid JSON schema structure

Also applies to: 109-109, 155-155, 201-201, 247-247, 293-293, 339-339, 385-385, 431-431, 477-477

src/configurations/destinations/webhook/schema.json (2)

17-17: LGTM! Changes are well-structured and maintain consistency

The changes to add "iubenda" to the provider enum values are:

  1. Consistently implemented across all platform sections
  2. Maintain the existing enum order
  3. Preserve the default value of "oneTrust"
  4. Follow the JSON schema specification

Also applies to: 63-63, 109-109, 155-155, 201-201, 247-247, 293-293, 339-339, 385-385, 431-431, 477-477


17-17: Verify consistent implementation across all platforms

The addition of "iubenda" to the provider enum is consistent across all platform sections (cloud, warehouse, android, ios, web, unity, amp, reactnative, flutter, cordova, and shopify). Let's verify this implementation.

Also applies to: 63-63, 109-109, 155-155, 201-201, 247-247, 293-293, 339-339, 385-385, 431-431, 477-477

✅ Verification successful

The addition of "iubenda" to the provider enum is consistent across destinations

Based on the verification results, the addition of "iubenda" to the provider enum is consistently implemented across all destination schemas that include consent management functionality. The enum values maintain the same order ["custom", "iubenda", "ketch", "oneTrust"] with "oneTrust" as the default value in all cases.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify consistent implementation of iubenda across all platform sections
# Expected: All provider enums should contain "iubenda" in the same order

# Search for all provider enum definitions in the schema
rg -U --multiline '(?s)"provider":\s*{\s*"type":\s*"string",\s*"enum":\s*\[(.*?)\]' src/configurations/destinations/webhook/schema.json

# Additionally, verify this pattern across other destination schemas that should include iubenda
for dest in appcues bingads facebook_pixel freshsales ga4_v2 google_adwords_enhanced_conversations gtm heap hubspot impact linkedin_insight_tag matomo tiktok_ads webhook vero; do
  if [ -f "src/configurations/destinations/$dest/schema.json" ]; then
    echo "Checking $dest..."
    rg -U --multiline '(?s)"provider":\s*{\s*"type":\s*"string",\s*"enum":\s*\[(.*?)\]' "src/configurations/destinations/$dest/schema.json"
  fi
done

Length of output: 8590


Script:

#!/bin/bash
# Let's try a simpler approach using grep to find the enum values
echo "Checking webhook schema..."
grep -A 1 '"provider":' src/configurations/destinations/webhook/schema.json

# Check other destination schemas
for dest in appcues bingads facebook_pixel freshsales ga4_v2 google_adwords_enhanced_conversations gtm heap hubspot impact linkedin_insight_tag matomo tiktok_ads webhook vero; do
  if [ -f "src/configurations/destinations/$dest/schema.json" ]; then
    echo -e "\nChecking $dest schema..."
    grep -A 1 '"provider":' "src/configurations/destinations/$dest/schema.json"
  fi
done

Length of output: 22671


Script:

#!/bin/bash
# Let's try to get the specific enum values using grep with more context
echo "Checking webhook schema enum values..."
grep -A 2 '"enum": \[' src/configurations/destinations/webhook/schema.json

# Check other destination schemas that might have consent management
for dest in appcues bingads facebook_pixel freshsales ga4_v2 google_adwords_enhanced_conversations gtm heap hubspot impact linkedin_insight_tag matomo tiktok_ads webhook vero; do
  if [ -f "src/configurations/destinations/$dest/schema.json" ]; then
    echo -e "\nChecking $dest schema enum values..."
    grep -A 2 '"enum": \[' "src/configurations/destinations/$dest/schema.json"
  fi
done

Length of output: 40547

src/configurations/destinations/heap/schema.json (1)

244-244: LGTM! Consistent implementation across all platforms.

The addition of "iubenda" to the provider enum is implemented consistently across all platforms (cloud, warehouse, android, ios, web, unity, amp, reactnative, flutter, cordova, and shopify), maintaining alphabetical order and preserving the default value.

Let's verify the consistency of these changes across other destination configurations mentioned in the PR objectives:

Also applies to: 290-290, 336-336, 382-382, 428-428, 474-474, 520-520, 566-566, 612-612, 658-658, 704-704

✅ Verification successful

This script will:

  1. First list all schema.json files in the destinations directory to confirm we're looking in the right place
  2. Then search for enum arrays that contain the specific values we're interested in, showing us where "iubenda" has been added

LGTM! The "iubenda" provider has been consistently added across all destination configurations

The verification confirms that the "iubenda" provider has been correctly added to the provider enum across all destination schema files, maintaining:

  • Consistent ordering (alphabetical: custom, iubenda, ketch, oneTrust)
  • Default value remains "oneTrust"
  • Same implementation pattern across all platforms
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify consistent implementation of iubenda provider across specified destinations
# Expected: All specified destinations should have similar enum updates

# Check provider enum in other destination schemas
for dest in "appcues" "bingads" "facebook_pixel" "freshsales" "ga4_v2" "google_adwords_enhanced_conversations" "gtm" "heap" "hubspot" "impact" "linkedin_insight_tag" "matomo" "tiktok" "webhook" "vero"; do
  echo "Checking $dest destination:"
  fd -t f "schema.json" | grep -i "$dest" | xargs rg -A 1 '"enum".*"provider"' 
done

Length of output: 5351


Script:

#!/bin/bash
# Let's try a different approach to find the schema files and their provider enums
# First, find all destination schema files
echo "Finding all destination schema files:"
fd -t f "schema.json" "src/configurations/destinations"

echo -e "\nChecking provider enums in these files:"
fd -t f "schema.json" "src/configurations/destinations" -x rg -A 1 '"enum".*\["custom".*"iubenda".*"oneTrust"\]' {}

Length of output: 28048

src/configurations/destinations/vero/schema.json (1)

253-253: LGTM! Consistent implementation of iubenda provider across all platforms.

The changes correctly add "iubenda" as a consent management provider option while maintaining existing functionality:

  • Consistent enum ordering across all platforms
  • Preserved backward compatibility with "oneTrust" as default
  • Aligned with the PR objective to add iubenda support

Let's verify the consistency across other destinations mentioned in the PR:

Also applies to: 299-299, 345-345, 391-391, 437-437, 483-483, 529-529, 575-575, 621-621, 667-667, 713-713

✅ Verification successful

Verification shows inconsistent implementation across destinations

The verification reveals that while most destinations have implemented the iubenda provider consistently, two destinations are missing from the implementation:

  • google_adwords_enhanced_conversations (file not found)
  • hubspot (file not found)

This suggests either:

  1. These destinations were missed in the implementation
  2. The destination names in the verification script were incorrect

Let's verify the correct destination names:


Correction needed: destination names in verification were incorrect

The verification revealed that the destination names in our initial check were incorrect:

  • google_adwords_enhanced_conversations should be google_adwords_enhanced_conversions
  • hubspot should be hs

Let's verify these destinations with the correct names:


Implementation verified: consistent across all checked destinations

The verification confirms that the iubenda provider has been consistently implemented across all destinations, including the previously missing ones (google_adwords_enhanced_conversions and hs). All implementations:

  • Maintain the same enum order: ["custom", "iubenda", "ketch", "oneTrust"]
  • Keep "oneTrust" as the default value
  • Follow the same schema structure
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify consistent implementation of iubenda provider across destinations
# Expected: All specified destinations should have the same enum structure

# Check enum implementation in other destinations
for dest in appcues bingads facebook_pixel freshsales ga4_v2 google_adwords_enhanced_conversations gtm heap hubspot impact linkedin_insight_tag matomo tiktok_ads webhook; do
  echo "Checking $dest..."
  rg -A 1 '"enum":\s*\[.*"iubenda"' "src/configurations/destinations/$dest/schema.json"
done

Length of output: 14811


Script:

#!/bin/bash
# List all destination directories to confirm correct names
fd . src/configurations/destinations/ -t d -d 1

Length of output: 10124


Script:

#!/bin/bash
# Check enum implementation in the corrected destinations
echo "Checking google_adwords_enhanced_conversions..."
rg -A 1 '"enum":\s*\[.*"iubenda"' "src/configurations/destinations/google_adwords_enhanced_conversions/schema.json"

echo "Checking hs..."
rg -A 1 '"enum":\s*\[.*"iubenda"' "src/configurations/destinations/hs/schema.json"

Length of output: 2822

src/configurations/destinations/google_adwords_enhanced_conversions/schema.json (2)

297-806: LGTM! The consent management schema structure is well-defined.

The implementation correctly:

  • Supports multiple consent management providers including the new iubenda provider
  • Maintains consistent validation patterns across all platforms
  • Enforces resolution strategy only for custom provider
  • Sets appropriate defaults

297-806: Verify the impact on existing configurations.

The addition of the new consent management structure might affect existing configurations.

Let's verify if there are any existing configurations that might be affected:

✅ Verification successful

Let me analyze the search results and generate additional verification scripts to check the impact.

This will help us understand if there are any existing consent management configurations that might be affected by the schema changes and how providers are currently configured in the test data.


Let me analyze the search results and generate the final response.

The consent management structure is already in use across multiple destinations

The search results show that the consent management structure with providers (custom, iubenda, ketch, oneTrust) and their associated configurations is already implemented and used consistently across many destination configurations in the test data. The new schema follows the same pattern that's already established.

  • Found in multiple destination test files like zendesk.json, zapier.json, yandex_metrica.json, etc.
  • The structure includes the same provider options and configuration patterns
  • The consent pattern with resolutionStrategy for custom providers is consistently implemented
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for existing consent management configurations
rg -l "consentManagement" --type json

# Search for existing provider configurations
rg -l "\"provider\".*:.*\"(custom|ketch|oneTrust)\"" --type json

Length of output: 50110


Script:

#!/bin/bash
# Check for existing consent management configurations in test data
rg -A 5 '"consentManagement".*:.*{' test/data/validation/destinations/*.json

# Check for specific provider configurations in test data
rg -A 5 '"provider".*:.*"(custom|iubenda|ketch|oneTrust)"' test/data/validation/destinations/*.json

Length of output: 602202

src/configurations/destinations/impact/schema.json (1)

295-295: LGTM! Consistent addition of iubenda across all platforms.

The changes correctly add "iubenda" to the consent management provider options while maintaining:

  • Alphabetical ordering of enum values
  • Backward compatibility with "oneTrust" as the default
  • Consistent implementation across all platforms

Let's verify the consistency of these changes across other destination configurations:

Also applies to: 341-341, 387-387, 433-433, 479-479, 525-525, 571-571, 617-617, 663-663, 709-709, 755-755

✅ Verification successful

Verified: iubenda consistently implemented across available destinations

The verification confirms that the consent management provider enum values, including "iubenda", are consistently implemented across all available destination configurations. The enum values follow the same pattern ["custom", "iubenda", "ketch", "oneTrust"] in:

  • appcues
  • bingads
  • facebook_pixel
  • freshsales
  • ga4_v2
  • gtm
  • heap
  • impact
  • linkedin_insight_tag
  • matomo
  • webhook
  • vero

Note: Some destinations listed in the verification script (google_adwords_enhanced_conversations, hubspot) appear to be missing from the codebase, but this doesn't affect the consistency of the implementation in existing destinations.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify consistent implementation of iubenda across specified destinations
# Expected: All specified destinations should have identical enum values for consent management providers

# Check enum values in provider field across specified destinations
for dest in appcues bingads facebook_pixel freshsales ga4_v2 google_adwords_enhanced_conversations gtm heap hubspot impact linkedin_insight_tag matomo tiktok_ads webhook vero; do
  echo "Checking $dest..."
  rg -A 1 '"provider":\s*{' "src/configurations/destinations/$dest/schema.json" | rg '"enum":'
done

Length of output: 6353


Script:

#!/bin/bash
# Let's try a simpler approach to find enum values in schema files
# Using fixed string search for enum values related to consent management

for dest in appcues bingads facebook_pixel freshsales ga4_v2 google_adwords_enhanced_conversations gtm heap hubspot impact linkedin_insight_tag matomo tiktok_ads webhook vero; do
  echo "=== Checking $dest ==="
  rg -F '"enum": ["custom", "iubenda", "ketch", "oneTrust"]' "src/configurations/destinations/$dest/schema.json" || \
  rg "\"enum\".*iubenda" "src/configurations/destinations/$dest/schema.json"
done

Length of output: 13041

src/configurations/destinations/ga4_v2/schema.json (1)

340-340: LGTM! Consistent implementation across all platform sections.

The addition of "iubenda" to the provider enum is implemented consistently across all platform sections (cloud, warehouse, android, ios, web, unity, amp, reactnative, flutter, cordova, shopify) while maintaining:

  • Alphabetical order in the enum array
  • Existing default value of "oneTrust"
  • Schema structure and validation rules

Let's verify the consistency of these changes across other destination configurations mentioned in the PR objectives:

Also applies to: 386-386, 432-432, 478-478, 524-524, 570-570, 616-616, 662-662, 708-708, 754-754, 800-800

✅ Verification successful

LGTM! The "iubenda" provider has been consistently added across all available destinations

The verification confirms that the "iubenda" provider has been consistently added to the enum array ["custom", "iubenda", "ketch", "oneTrust"] across all existing destination schemas. The changes maintain:

  • Consistent enum values and ordering
  • Proper schema structure
  • Default provider settings

Note: Some destinations listed in the PR objectives (google_adwords_enhanced_conversations, hubspot, tiktok) appear to be missing from the codebase, but this doesn't affect the validity of the changes in the existing destinations.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify consistent implementation of iubenda provider across specified destinations
# Expected: All specified destinations should have similar enum changes

# List of destinations from PR objectives
destinations=(
    "appcues"
    "bingads"
    "facebook_pixel"
    "freshsales"
    "ga4_v2"
    "google_adwords_enhanced_conversations"
    "gtm"
    "heap"
    "hubspot"
    "impact"
    "linkedin_insight_tag"
    "matomo"
    "tiktok"
    "webhook"
    "vero"
)

# Search for provider enum definitions in destination schemas
for dest in "${destinations[@]}"; do
    echo "Checking $dest..."
    fd -t f "schema.json" "src/configurations/destinations/$dest" \
        --exec rg -A 1 '"provider":\s*{\s*"type":\s*"string",\s*"enum":'
done

Length of output: 5637


Script:

#!/bin/bash
# Let's fix the regex and try again with a simpler pattern
for dest in "appcues" "bingads" "facebook_pixel" "freshsales" "ga4_v2" "google_adwords_enhanced_conversations" "gtm" "heap" "hubspot" "impact" "linkedin_insight_tag" "matomo" "tiktok" "webhook" "vero"; do
    echo "=== Checking $dest ==="
    fd -t f "schema.json" "src/configurations/destinations/$dest" \
        --exec rg -A 2 '"provider":'
done

Length of output: 28222

src/configurations/destinations/hs/schema.json (1)

342-342: LGTM! Consistent implementation across all platforms.

The addition of "iubenda" as a consent management provider is implemented consistently across all platforms while maintaining:

  • Alphabetical ordering in enum values
  • Existing default value of "oneTrust"
  • Schema structure integrity

Let's verify the corresponding UI configuration changes:

Also applies to: 388-388, 434-434, 480-480, 526-526, 572-572, 618-618, 664-664, 710-710, 756-756, 802-802

✅ Verification successful

UI configurations are properly synchronized with schema changes

The verification confirms that:

  1. The HubSpot UI configuration correctly includes "iubenda" as a consent management provider option in the same alphabetical order as the schema
  2. The implementation is consistent with other destinations that support consent management
  3. The UI configuration maintains proper label-value pairs for all consent management providers

The changes to both schema.json and ui-config.json are properly synchronized, ensuring a complete implementation of the iubenda provider across the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify UI configurations for iubenda provider across destinations

# Check if UI configs have been updated with iubenda
echo "Checking UI configurations for iubenda provider..."
rg -l '"iubenda"' 'src/configurations/destinations/*/ui-config.json'

# Verify the label consistency
echo "Verifying label consistency..."
rg -A 2 '"iubenda"' 'src/configurations/destinations/*/ui-config.json'

Length of output: 503


Script:

#!/bin/bash
# Let's first find the UI configuration files in the destinations directory
echo "Finding UI configuration files..."
fd "ui-config" "src/configurations/destinations"

# Let's also check the entire codebase for any iubenda-related UI configurations
echo "Checking for iubenda in UI configurations..."
rg -l "iubenda" "src/configurations"

# Let's look at the directory structure to understand the configuration layout
echo "Checking directory structure..."
ls -R src/configurations/destinations/hs/

Length of output: 15628


Script:

#!/bin/bash
# Let's check the content of hs/ui-config.json to verify iubenda configuration
echo "Checking HubSpot UI config for iubenda..."
cat src/configurations/destinations/hs/ui-config.json

# Let's also check a few other destinations to verify consistency of iubenda UI labels
echo -e "\nChecking iubenda configuration in other destinations..."
rg -A 5 '"iubenda"' src/configurations/destinations/*/ui-config.json

Length of output: 39617

src/configurations/destinations/facebook_pixel/schema.json (1)

506-506: LGTM! The addition of iubenda is consistent across all platforms.

The changes correctly add "iubenda" to the consent management provider options while maintaining the existing schema structure and validation rules.

Let's verify if iubenda requires additional configuration properties:

Also applies to: 552-552, 598-598, 644-644, 690-690, 736-736, 782-782, 828-828, 874-874, 920-920, 966-966

✅ Verification successful

Let me search for more specific patterns to verify if iubenda requires additional configuration properties.


Based on the search results, I can see that iubenda is consistently implemented across multiple destinations with the standard consent configuration pattern. The test data shows that iubenda requires consent values (1, 2, 3) similar to other consent management providers, and the schema maintains the same structure for consents array across all destinations.

The iubenda integration follows the standard consent management configuration pattern

The implementation is consistent with other consent providers:

  • Uses the standard consents array structure
  • Follows the same pattern validation for consent values
  • Maintains default value as "oneTrust"
  • No additional configuration properties required
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for iubenda-specific configuration patterns across the codebase
echo "Searching for iubenda configuration patterns..."
rg -i "iubenda.*config" -A 5
rg -i "iubenda.*setup" -A 5

# Search for any existing iubenda implementation files
echo "Searching for iubenda implementation files..."
fd -i iubenda

Length of output: 1020


Script:

#!/bin/bash
# Search for iubenda-related code patterns in the codebase
echo "Searching for iubenda patterns in schema files..."
rg -i "iubenda" -A 10 --type json

# Search for any consent management provider configuration patterns
echo "Searching for consent provider configuration patterns..."
rg -i "\"provider\".*enum" -A 10 --type json

Length of output: 169732

test/data/validation/destinations/webhook.json (2)

294-307: Verify iubenda consent value format.

The implementation adds iubenda as a consent management provider with numeric consent values ("1", "2", "3"). Please verify if these are the correct consent identifiers for iubenda integration.

Would you like me to help create additional test cases for invalid iubenda consent values?


Line range hint 1-1000: LGTM! Comprehensive test coverage for webhook URL validation.

The test suite effectively validates:

  • SSRF prevention (localhost, IP addresses, etc.)
  • Port number constraints
  • URL format and structure
  • Consent management configurations

The implementation maintains strong security controls while accommodating the new iubenda provider.

@mohamedkhattab
Copy link
Contributor Author

Hi @saikumarrs, can you please take a look here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants