Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amp-consent ✨ 📖 Add SourcePoint to CMPs list #23917

Merged
merged 9 commits into from
Sep 9, 2019
25 changes: 25 additions & 0 deletions examples/cmp-vendors.amp.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
<!-- This should be in alphabetical order. _ping_ should be the first -->
<option>_ping_</option>
<option>didomi</option>
<option>SourcePoint</option>
</select>
<input type="submit" value="Go">
<button type="button" class="clearLocalStorage" onclick="localStorage.clear(); alert('localStorage Cleared!')">Clear localStorage</button>
Expand Down Expand Up @@ -163,6 +164,30 @@ <h3>Image that is NOT blocked by consent</h3>
</amp-consent>
<!-- End didomi example -->

<!-- SourcePoint example -->
andresilveirah marked this conversation as resolved.
Show resolved Hide resolved
<amp-consent id='consent' layout='nodisplay' type='SourcePoint'>
<script type="application/json">
{
"postPromptUI": "my-consent-prompt-ui",
"clientConfig": {
"accountId": 22,
"siteName": "mobile.demo",
"siteId": 2372,
"privacyManagerId": "5c0e81b7d74b3c30c6852301",
andresilveirah marked this conversation as resolved.
Show resolved Hide resolved
"stageCampaign": false,
"authId": "MY-UUID",
"targetingParams": {
"MyPrivacyManager": "false"
}
}
}
</script>
<div id="my-consent-prompt-ui">
Post Prompt UI
<button on="tap.consent.prompt(consent=SourcePoint)" role="button">Privacy Settings</button>
andresilveirah marked this conversation as resolved.
Show resolved Hide resolved
</div>
</amp-consent>
<!-- End SourcePoint example -->
</div>
</body>
</html>
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 @@ -40,3 +40,9 @@ CMP_CONFIG['didomi'] = {
'checkConsentHref': 'https://api.privacy-center.org/amp/check-consent',
'promptUISrc': 'https://sdk-amp.privacy-center.org/loader.html',
};

CMP_CONFIG['SourcePoint'] = {
'consentInstanceId': 'SourcePoint',
'checkConsentHref': 'https://sourcepoint.mgr.consensu.org/consent/v2/amp',
'promptUISrc': 'https://amp.pm.sourcepoint.mgr.consensu.org/',
};
1 change: 1 addition & 0 deletions extensions/amp-consent/amp-consent.md
Original file line number Diff line number Diff line change
Expand Up @@ -525,4 +525,5 @@ Join in on the discussion where we are discussing [upcoming potential features](
## Supported Consent Management Platforms

- Didomi : [Website](https://www.didomi.io/) - [Documentation](https://developers.didomi.io/cmp/amp)
- SourcePoint : [Website](https://www.sourcepoint.com/) - [Documentation](/extensions/amp-consent/cmps/sourcepoint.md)
- Your Integrated platform here!
68 changes: 68 additions & 0 deletions extensions/amp-consent/cmps/sourcepoint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<!---
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.
-->

# SourcePoint

## Example

```html
<amp-consent id='consent' layout='nodisplay' type='SourcePoint'>
<script type="application/json">
{
"postPromptUI": "my-consent-prompt-ui",
"clientConfig": {
"accountId": 22,
"siteName": "amp.demo",
"siteId": 4400,
"privacyManagerId": "5d566301ab45d123ed973688",
"stageCampaign": false,
"authId": "MY-UUID",
"targetingParams": {
"foo": "bar"
}
}
}
</script>
<div id="my-consent-prompt-ui">
Post Prompt UI
<button on="tap.consent.prompt(consent=SourcePoint)" 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 `my-consent-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.consent.prompt(consent=SourcePoint)"`. 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=SourcePoint)"

## Configuration (`clientConfig`)


| Attribute | Type | Mandatory | Description |
|------------------|:------:|:---------:|--------------------------------------------------------------------------------------------------------------------|
| accountId | Number | yes | Your account id can be found in the SP's dashboard. |
| siteName | String | yes | The name of the site you used in the SP's dashboard. eg. `example.com` |
| siteId | Number | yes | The siteId can be found in the PrivacyManager page. |
| privacyManagerId | String | yes | The privacyManagerId can be found in the PrivacyManager page. |
| stageCampaign | Bool | no | Indicates if the campaign to load is staging or published. The default value is `false`, meaning published campaign. |
| authId | String | no | If a `authId` is present, we'll try to find the consent profile for that user if she/he has one stored. |
| targetingParams | Object | no | A collection of key values to be used in the scenario manager. |

## Getting Help
For more information on how to integrate AMP to your page please visit our [help portal](http://help.sourcepoint.com/en) or contact your account manager directly.