iabtcf-es icon indicating copy to clipboard operation
iabtcf-es copied to clipboard

Saving Vendor Id 126 for Double Verify doesn't save into TC Consent string

Open n-lee-commits opened this issue 2 years ago • 6 comments

Version

1.5.9

Module (core, cmpapi, cli, stub, or testing) core

Describe with reproduction steps – What is the expected behavior?

Currently trying to save vendor 126 Double Verify into TC String using the encode functionality. The encode functionality doesn't directly save 126 into the cookie.

Screen Shot 2023-10-26 at 4 01 29 PM

This is the output I got from the decoder:

Screen Shot 2023-10-26 at 4 24 59 PM

And the encoded TC String:

CPywmUAPywmUADgACMENAYEgAAAAAAAAAAAAAZQAwAQAAqABkAAAAAAA.YAAAAAAAAAAA

n-lee-commits avatar Oct 26 '23 21:10 n-lee-commits

Hi, I also tried it with version 1.4.0 and it does the same thing, so I think it's something (I don't know if it's an actual bug) that has been around for a long time.

I see that the vendor doesn't have any purposes but only legInt purposes, maybe that is the problem?

marco-prontera avatar Oct 27 '23 14:10 marco-prontera

Hello! We are also struggling with this issue. Same thing happens when you are trying to accept for example "Mirando" ID: 279. Any updates about planned fixes?

jedlikk avatar Feb 13 '24 15:02 jedlikk

If there is no purpose to consent specified for a vendor that vendor cannot be written out as having consent. If the vendor specifies LegInt for purposes, the vendor can continue operating for the declared purposes under LegInt unless the user opted out of LegInt. If the vendor specifies FlexPurposes that will allow the publisher through the CMP to override the purpose declaration and if in this case the purpose(s) is/are set to consent, the vendor bit will be written for consent if consent is given. the library handles publisher overrides, hence you can mimic this behavior through library calls. I hope this makes sense.

HeinzBaumann avatar Feb 13 '24 18:02 HeinzBaumann

Thank you for your answer. I think i understand the idea but not sure how to handle it within TcModel. For example: I use tcModel.vendorConsents.set() to set every vendor that user has consented to. When i check tcModel i ineed have 728 vendorsConsented, but when i take encoded tcString to decoder it shows only 665. Example encoded tcstring: "CP5-BkAP5-BkAF-feBENAXEsAP_gAEPgAAQ4JutV_H__bW9r8Tr1aft0eYlH99j77uQxBhfJE-4FyDvW_JwVh2EwNA06tqIKmRIEuzZBIQFkHJHURVigSogVryHsYkGMhTMIJ6BkgFMRI2dYCFxvmYtjEQIY5_p_d3fx2B-t_dn83czjT8FHnzU5P2ckcKCdQ58tDfl9bRKb-5IOd-70v4v09lfrkW_eTVm_pcvr7B-ufs8r_XU-9-CbgBJhoXEAXYEAIRaBhFAgBEFYQEUCgAAAEgaICAEgYFOwMAB1gIgAACgAGCAEAAKMgAQAAAAAIRABIAUCAACAQCAAAAAAQCAAgYABQAWAgEAAIDoGKYQACAWECRGREKYEIUCQQEtlAgkBQIK4QBBlgBQCImAgAQAAAKwAAAWKwGAJAQoSCBLKDaAAAgAQCilCoQSeGAAYEjZagcETAAAA.YAAAAAAAAAAA" image

My component and how i handle it: `const tcModel = new TCModel(new GVL(gvl)); tcModel.cmpId = TCF_CMP_ID // my CMP ID tcModel.cmpVersion = convertSemanticVersion(APP_VERSION) // my CMP Version tcModel.consentScreen = TCF_CONSENT_SCREEN // On which 'screen' consent was captured; tcModel.consentLanguage = userLang; tcModel.publisherCountryCode = state.tcfCountry; tcModel.isServiceSpecific = TRUE;

// Convert user consent to arrays where in array are only options that are enabled by user
// Convert it to array ids as numbers. Expected result: [id1, id2, id3]
tcModel.vendorConsents.set(TCFConvertConsentToSupportedFormat(state.userConsent.vendors));
tcModel.vendorLegitimateInterests.set(TCFConvertConsentToSupportedFormat(state.userConsent.vendorsLegitimateInterest));

// Loop through all categories and add them
TCF_VENDOR_CATEGORIES_TYPES.forEach(category => {
  if (category.hasSwitch) {
    if (!category.IABLibName) {
      console.error("TCF category with switch is missing IAB LIB name")
      return;
    }

    // Add purposes and special features if they exist in user consent
    if (state.userConsent.categories[category.key]) {
      tcModel[category.IABLibName].set(TCFConvertConsentToSupportedFormat(state.userConsent.categories[category.key]));
    }

    if (category.hasLegitimateInterest) {
      if (!category.IABLibLegitimateInterestName) {
        console.error("TCF category with switch is missing IAB LIB legitimate interest name")
        return;
      }

      if (state.userConsent.categoriesLegitimateInterest[category.key] && category.hasLegitimateInterest) {
        tcModel[category.IABLibLegitimateInterestName].set(TCFConvertConsentToSupportedFormat(state.userConsent.categoriesLegitimateInterest[category.key]));
      }
    }
  }
})

console.log({ tcModel, code: TCString.encode(tcModel) })
return TCString.encode(tcModel);`

jedlikk avatar Feb 14 '24 06:02 jedlikk