Amphtml: Add e2e test for all amp-consent metadata values

Created on 29 May 2020  路  18Comments  路  Source: ampproject/amphtml

  • consentStringType #28028
  • gdprApplies
  • additionalConsent

Use external API provided to test (or analytics variable substations).

amp-consent When Possible analytics

Most helpful comment

My apologies, this got lost in the weeds. I have submitted a PR (https://github.com/ampproject/amphtml/pull/30465) to fix this.

All 18 comments

Hi @micajuine-ho
I'm not sure if it's related to this issue but I have the following error in the console since a couple of days on one of our publisher's website.
log.js:258 [amp-consent] CMP metadata is invalid or no consent string is found.

It occurs whether there's an existing consent string or not. Can you tell me what is it related to ?
It doesn't seem to impact the consent string processing though.

Thanks

Hi @micajuine-ho

We also have this error since a couple of days on our clients website, either the consent string is present or not.
[amp-consent] CMP metadata is invalid or no consent string is found
It seems related to the metadata JSON object.

Thank you

@MaximePlancke @tla-sirdata Thanks for your reports.

The error your clients are seeing is a bug that was resolved in #28623. Fix should be in stable next Monday.

Hi @micajuine-ho
We still have the error in the console when there's no existing consent string. Is it expected ?
Thanks

Hi @tla-sirdata, AMP was on freeze last week due to the holiday schedule. This may be why you're not seeing the error removed.

Hi @micajuine-ho,

We are still seeing error CMP metadata is invalid or no consent string is found. before the user gives consent. After the consent is given, there is no error message.

Are you planning to remove this error message logging before consent giving?

Hi @kemalmustafic can I see the a webpage where you are seeing this error?

Sure @micajuine-ho,

TCFv1 example: https://sandbox.didomi.io/amp.html
TCFv2 example: https://sandbox.didomi.io/amp-tcf-v2.html

In both cases, you will see the error message CMP metadata is invalid or no consent string is found. before giving consent.

After you give consent and reload the page, there will be no error message

Hi @kemalmustafic, this is occuring because the checkConsentHref endpoint is returning metadata but no consentString. We assumed that metadata and consentString would operate in conjunction. Is this case with metadata but no consentString very prevalent?

Hi @micajuine-ho
We always use metadata to transmit the new gdprApplies flag whether there's an existing consent string or not so yes this case is prevalent for us.
My understanding is that metadata.gdprApplies is supposed to replace consentRequired in the long term. Is that correct ?

We always use metadata to transmit the new gdprApplies flag whether there's an existing consent string or not so yes this case is prevalent for us.

In that case I'll remove the requirement for consentString to be present for metadata to be updated.

My understanding is that metadata.gdprApplies is supposed to replace consentRequired in the long term. Is that correct ?

This was not the intention, as we figured that consent may still be required outside of gdpr regulation areas.

Yes that's why I suggested creating a ccpaApplies flag so anyone can easily identify which regulation is applied but it's probably not a priority at the moment.
Thanks !

Hi @kemalmustafic, this is occuring because the checkConsentHref endpoint is returning metadata but no consentString. We assumed that metadata and consentString would operate in conjunction. Is this case with metadata but no consentString very prevalent?

@micajuine-ho Right, we have a case where metadata is present but the consent string is not.

Is it possible to not display the error message in this case?

My apologies, this got lost in the weeds. I have submitted a PR (https://github.com/ampproject/amphtml/pull/30465) to fix this.

@kemalmustafic @tla-sirdata

When you are sending in new metadata, is there a reason why you are not sending a consent string?

If we were to remove the restriction right now as it is, when new metadata would be sent without a consent string, the existing consent string in storage would be erased. Is this the behavior you would expect?

@micajuine-ho The reasons why the consent string is not sent can be :

  • consentStateValue=unknown in the request (non existing string)
  • isDirty=true in the request (string must be erased)
  • consent is not required (consentRequired=false in the response)

Most of the time, that means there's no existing consent string. If we want to erase a consent string, we send expireCache=true but the consent string is still sent with it.

Got it. Sounds like there is a good use case for this behavior!

I believe this change will be in before the holiday freeze.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dvoytenko picture dvoytenko  路  70Comments

choumx picture choumx  路  113Comments

jpettitt picture jpettitt  路  77Comments

choumx picture choumx  路  50Comments

jpettitt picture jpettitt  路  42Comments