Skip to content

Commit

Permalink
✨amp-consent: Add Chandago's AppConsent to CMPs list (#25834) (#26539)
Browse files Browse the repository at this point in the history
* Configuration for AppConsent CMP (#25834)

- Add a new configuration object to amp-consent component
- Provide an example and additionnal documentation for AppConsent

* fixing formatting error in appconsent documentation (#25834)

* Add real life example for appconsent (25834)
  • Loading branch information
dav-m85 committed Feb 7, 2020
1 parent a762bfc commit 63694fa
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 0 deletions.
18 changes: 18 additions & 0 deletions examples/amp-consent/cmp-vendors.amp.html
Expand Up @@ -95,6 +95,7 @@
<option>[Select a vendor]</option>
<!-- This should be in alphabetical order. _ping_ should be the first -->
<option>_ping_</option>
<option>appconsent</option>
<option>didomi</option>
<option>sirdata</option>
<option>Marfeel</option>
Expand Down Expand Up @@ -138,6 +139,23 @@ <h3>Image that is NOT blocked by consent</h3>
</amp-consent>
<!-- End _ping_ example -->

<!-- appconsent example -->
<amp-consent id='ABC' layout='nodisplay' type='appconsent'>
<script type="application/json">
{
"postPromptUI": "postPromptUI",
"clientConfig": {
"id": "1/10/v5eCA1JV4"
}
}
</script>
<div id="postPromptUI">
Post Prompt UI
<button on="tap:ABC.prompt(consent=appconsent)" role="button">Manage</button>
</div>
</amp-consent>
<!-- End appconsent example -->

<!-- didomi example -->
<amp-consent id='didomi' layout='nodisplay' type='didomi'>
<script type="application/json">
Expand Down
6 changes: 6 additions & 0 deletions extensions/amp-consent/0.1/cmps.js
Expand Up @@ -35,6 +35,12 @@ if (getMode().test || getMode().localDev) {
};
}

CMP_CONFIG['appconsent'] = {
'consentInstanceId': 'appconsent',
'checkConsentHref': 'https://collector.appconsent.io/amp/check-consent',
'promptUISrc': 'https://cdn.appconsent.io/loader.html',
};

CMP_CONFIG['didomi'] = {
'consentInstanceId': 'didomi',
'checkConsentHref': 'https://api.privacy-center.org/amp/check-consent',
Expand Down
1 change: 1 addition & 0 deletions extensions/amp-consent/amp-consent.md
Expand Up @@ -642,6 +642,7 @@ Join in on the discussion where we are discussing [upcoming potential features](

## Supported Consent Management Platforms

- AppConsent : [Website](https://appconsent.io/en) - [Documentation](https://github.com/ampproject/amphtml/master/extensions/amp-consent/cmps/appconsent.md)
- Didomi : [Website](https://www.didomi.io/) - [Documentation](https://developers.didomi.io/cmp/amp)
- Sirdata : [Website](http://www.sirdata.com/) - [Documentation](https://cmp.sirdata.com/#/docs)
- Marfeel : [Website](https://www.marfeel.com/) - [Documentation](https://github.com/ampproject/amphtml/blob/master/extensions/amp-consent/cmps/marfeel.md)
Expand Down
48 changes: 48 additions & 0 deletions extensions/amp-consent/cmps/appconsent.md
@@ -0,0 +1,48 @@
<!---
Copyright 2020 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS-IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

# AppConsent

CMP used through AppConsent platform in order to handle and enforce user consent.

## Example

```html
<amp-consent id="ABC" layout="nodisplay" type="appconsent">
<script type="application/json">
{
"postPromptUI": "postPromptUI",
"clientConfig": {
"id": "1/10/v5eCA1JV4"
}
}
</script>
<div id="postPromptUI">
Post Prompt UI
<button on="tap:ABC.prompt(consent=appconsent)" role="button">
Manage
</button>
</div>
</amp-consent>
```

## Configuration

| Attribute | Type | Mandatory | Description |
| --------- | :----: | :-------: | ------------------------------------------------------- |
| id | String | yes | AppConsent Notice identifier, provided upon registering |

Please contact [AppConsent](https://appconsent.io/en) for further details regarding the configuration of this CMP.

0 comments on commit 63694fa

Please sign in to comment.