Skip to content

Commit

Permalink
📖 amp-consent: Add Ogury CMP doc + example (#25975)
Browse files Browse the repository at this point in the history
  • Loading branch information
PierigOgury committed Feb 12, 2020
1 parent c1f26f8 commit 8099fd3
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 1 deletion.
25 changes: 24 additions & 1 deletion examples/amp-consent/cmp-vendors.amp.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
<option>didomi</option>
<option>sirdata</option>
<option>Marfeel</option>
<option>Ogury</option>
<option>SourcePoint</option>
</select>
<input type="submit" value="Go">
Expand Down Expand Up @@ -204,7 +205,7 @@ <h3>Image that is NOT blocked by consent</h3>
</div>
</amp-consent>
<!-- End sirdata example -->

<!-- Marfeel example -->
<amp-consent id='marfeelConsent' layout='nodisplay' type='Marfeel'>
<script type="application/json">
Expand All @@ -223,6 +224,28 @@ <h3>Image that is NOT blocked by consent</h3>
</amp-consent>
<!-- End Marfeel example -->

<!-- Ogury example -->
<amp-consent id='ogury' layout='nodisplay' type='Ogury'>
<script type="application/json">
{
"postPromptUI": "custom-prompt-ui",
"clientConfig": {
"assetKey": "OGY-316B32F7E5B7"
},
"uiConfig": {
"overlay": true
}
}
</script>
<div id="custom-prompt-ui">
Post Prompt UI
<button on="tap:ogury.prompt(consent=Ogury)" role="button">
Privacy Settings
</button>
</div>
</amp-consent>
<!-- End Ogury example -->

<!-- SourcePoint example -->
<amp-consent id='consent' layout='nodisplay' type='SourcePoint'>
<script type="application/json">
Expand Down
6 changes: 6 additions & 0 deletions extensions/amp-consent/0.1/cmps.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ CMP_CONFIG['Marfeel'] = {
'promptUISrc': 'https://marfeel.mgr.consensu.org/amp/index.html',
};

CMP_CONFIG['Ogury'] = {
'consentInstanceId': 'Ogury',
'checkConsentHref': 'https://api.ogury.mgr.consensu.org/v1/check-for-consent',
'promptUISrc': 'https://www.ogury.mgr.consensu.org/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
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,7 @@ Join in on the discussion where we are discussing [upcoming potential features](
- 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](./cmps/marfeel.md)
- Ogury : [Website](https://www.ogury.com/) - [Documentation](./cmps/ogury.md)
- SourcePoint : [Website](https://www.sourcepoint.com/) - [Documentation](./cmps/sourcepoint.md)

- Your Integrated platform here!
63 changes: 63 additions & 0 deletions extensions/amp-consent/cmps/ogury.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<!---
Copyright 2019 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.
-->

# Ogury

## Prerequisite

1. Connect to your [publisher dashboard](http://publishers.ogury.co/)
1. Create web asset for your domain, if needed
1. Use the generated asset key in the `amp-consent` component JSON configuration

## Example

```html
<amp-consent id="ogury" layout="nodisplay" type="Ogury">
<script type="application/json">
{
"postPromptUI": "custom-prompt-ui",
"clientConfig": {"assetKey": "OGY-316B32F7E5B7"},
"uiConfig": {"overlay": true}
}
</script>
<div id="custom-prompt-ui">
Post Prompt UI
<button on="tap:ogury.prompt(consent=Ogury)" 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 `custom-prompt-ui` since we have a div with that id.

### Opening the Privacy Manager

Notice in the example above, we have a `button` with the attribute `on="tap.ogury.prompt(consent=Ogury)"`. The id of your `<amp-consent>` element is relevant here. Notice how the id of our `<amp-consent>` is `consent`, that's why the `on` attribute has the value "tap.**consent**.prompt(consent=Ogury)"

## Configuration (`clientConfig`)

| Attribute | Type | Mandatory | Description |
| --------- | :----: | :-------: | --------------------------------------------------------------------------------------- |
| assetKey | String | yes | Your asset key can be found in your [publisher dashboard](http://publishers.ogury.co/). |

## Getting Help

For more information on how to integrate AMP to your page please visit our integration documentation in your [publisher dashboard](http://publishers.ogury.co/) or contact your account manager directly.

0 comments on commit 8099fd3

Please sign in to comment.