Skip to content

Commit

Permalink
✨ Add Quantcast type for amp-consent (#30902)
Browse files Browse the repository at this point in the history
* Add Quantcast type for amp-consent

* Fix Quantcast amp-consent tap:consent

* Fix linter issues
  • Loading branch information
nicobatalla committed Nov 2, 2020
1 parent 5d578f6 commit 57f6479
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 0 deletions.
19 changes: 19 additions & 0 deletions examples/amp-consent/cmp-vendors.amp.html
Expand Up @@ -103,6 +103,7 @@
<option>Marfeel</option>
<option>Ogury</option>
<option>opencmp</option>
<option>quantcast</option>
<option>sirdata</option>
<option>SourcePoint</option>
<option>Usercentrics</option>
Expand Down Expand Up @@ -318,6 +319,24 @@ <h3>Image that is NOT blocked by consent</h3>
</amp-consent>
<!-- End opencmp example -->

<!-- Quantcast Example -->
<amp-consent id="quantcast" layout="nodisplay" type="quantcast">
<script type="application/json">
{
"postPromptUI": "quantcast-post-prompt",
"clientConfig": {
"coreConfig": {
"googleEnabled": false
}
}
}
</script>
<div id="quantcast-post-prompt">
<button on="tap:conset.prompt(consent=quantcast)" role="button">Privacy settings</button>
</div>
</amp-consent>
<!-- End Quantcast example -->

<!-- sirdata example -->
<amp-consent id="consent" layout="nodisplay" type="sirdata">
<script type="application/json">
Expand Down
7 changes: 7 additions & 0 deletions extensions/amp-consent/0.1/cmps.js
Expand Up @@ -91,6 +91,13 @@ CMP_CONFIG['opencmp'] = {
'promptUISrc': 'https://cdn.opencmp.net/tcf-v2/amp/cmp.html',
};

CMP_CONFIG['quantcast'] = {
'consentInstanceId': 'quantcast',
'checkConsentHref':
'https://apis.quantcast.mgr.consensu.org/amp/check-consent',
'promptUISrc': 'https://quantcast.mgr.consensu.org/tcfv2/amp.html',
};

CMP_CONFIG['SourcePoint'] = {
'consentInstanceId': 'SourcePoint',
'checkConsentHref': 'https://sourcepoint.mgr.consensu.org/consent/v2/amp',
Expand Down
1 change: 1 addition & 0 deletions extensions/amp-consent/amp-consent.md
Expand Up @@ -629,6 +629,7 @@ Join in on the discussion where we are discussing [upcoming potential features](
- Ogury : [Website](https://www.ogury.com/) - [Documentation](./cmps/ogury.md)
- OneTrust: [Website](https://www.onetrust.com/) - [Documentation](./cmps/onetrust.md)
- opencmp : [Documentation](./cmps/opencmp.md)
- Quantcast : [Website](https://www.quantcast.com) - [Documentation](https://help.quantcast.com/hc/en-us/categories/360002940873-Quantcast-Choice)
- Sirdata : [Website](http://www.sirdata.com/) - [Documentation](https://cmp.sirdata.com/#/docs)
- SourcePoint : [Website](https://www.sourcepoint.com/) - [Documentation](./cmps/sourcepoint.md)
- Usercentrics : [Website](https://www.usercentrics.com/) - [Documentation](./cmps/usercentrics.md)
Expand Down
51 changes: 51 additions & 0 deletions extensions/amp-consent/cmps/quantcast.md
@@ -0,0 +1,51 @@
<!---
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.
-->

# Quantcast

## Example

```html
<amp-consent id="quantcast" layout="nodisplay" type="quantcast">
<script type="application/json">
{
"postPromptUI": "quantcast-post-prompt",
"clientConfig": {
"coreConfig": {
"googleEnabled": true
}
}
}
</script>
<div id="quantcast-post-prompt">
<button on="tap:consent.prompt(consent=quantcast)" role="button">Privacy settings</button>
</div>
</amp-consent>
```

## Notes

### `postPromptUI`

The value of `postPromptUI` should be the id of the html tag in which the consent ui will be attached to. In our example above, the value of `postPromptUI` is `quantcast-post-prompt` since we have a div with that id.

## Configuration

Visit the [Privacy Portal](https://www.quantcast.com/protect/sites) to get a tag with your latest configuration.

## Getting Help

For more information on how to integrate AMP to your page please visit our [help portal](https://help.quantcast.com/hc/en-us/categories/360002940873-Quantcast-Choice) or contact your account manager directly.

0 comments on commit 57f6479

Please sign in to comment.