Skip to content

Commit

Permalink
✨ Add support for the SHE Media ad network. (#24602)
Browse files Browse the repository at this point in the history
* Add support for the SHE Media ad network.

* Fix linting issue.

* Fix CI issue.
  • Loading branch information
mgriego authored and lannka committed Sep 19, 2019
1 parent 2d5e175 commit f0119a5
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 3p/integration.js
Expand Up @@ -224,6 +224,7 @@ import {runative} from '../ads/runative';
import {sas} from '../ads/sas';
import {sekindo} from '../ads/sekindo';
import {sharethrough} from '../ads/sharethrough';
import {shemedia} from '../ads/shemedia';
import {sklik} from '../ads/sklik';
import {slimcutmedia} from '../ads/slimcutmedia';
import {smartadserver} from '../ads/smartadserver';
Expand Down Expand Up @@ -497,6 +498,7 @@ register('runative', runative);
register('sas', sas);
register('sekindo', sekindo);
register('sharethrough', sharethrough);
register('shemedia', shemedia);
register('sklik', sklik);
register('slimcutmedia', slimcutmedia);
register('smartadserver', smartadserver);
Expand Down
13 changes: 13 additions & 0 deletions ads/_config.js
Expand Up @@ -892,6 +892,19 @@ const adConfig = jsonConfiguration({
renderStartImplemented: true,
},

'shemedia': {
prefetch: [
'https://securepubads.g.doubleclick.net/tag/js/gpt.js',
'https://ads.shemedia.com/static/amp.js',
],
preconnect: [
'https://partner.googleadservices.com',
'https://tpc.googlesyndication.com',
'https://ads.blogherads.com',
],
renderStartImplemented: true,
},

'sklik': {
prefetch: 'https://c.imedia.cz/js/amp.js',
},
Expand Down
27 changes: 27 additions & 0 deletions ads/shemedia.js
@@ -0,0 +1,27 @@
/**
* 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.
*/

import {loadScript, validateData} from '../3p/3p';

/**
* @param {!Window} global
* @param {!Object} data
*/
export function shemedia(global, data) {
validateData(data, ['slotType', 'boomerangPath']);

loadScript(global, 'https://ads.shemedia.com/static/amp.js');
}
47 changes: 47 additions & 0 deletions ads/shemedia.md
@@ -0,0 +1,47 @@
<!---
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.
-->

# SHE Media

Your site must be an active member of the [SHE Media Partner Network](http://www.shemedia.com). Please contact [Support](mailto:support@shemedia.com) for specific tags for your site and information on configuration semantics.


## Examples

```html
<amp-ad width="300" height="250"
type="shemedia"
data-slot-type="medrec"
data-boomerang-path="/amp-example/26403"
json='{"boomerangConfig": {"vertical": "parenting"}, "targeting":{"abc":["xyz"]}}'>
</amp-ad>
```


## Configuration

### Required parameters

* `data-slot-type` - SHE Media slot type.
* `data-boomerang-path` - Boomerang path.

### Optional parameters

* `json` - Boomerang configuration key values can be passed using the `boomerangConfig` property. Custom targeting key values can be passed to Boomerang using the `targeting` property.

### Support

Please contact support@shemedia.com with any questions.
11 changes: 11 additions & 0 deletions examples/ads.amp.html
Expand Up @@ -228,6 +228,7 @@
<option>sas</option>
<option>sekindo</option>
<option>sharethrough</option>
<option>shemedia</option>
<option>sklik</option>
<option>slimcutmedia</option>
<option>smartadserver</option>
Expand Down Expand Up @@ -1863,6 +1864,16 @@ <h2>Sharethrough</h2>
data-pkey="c0fa8367">
</amp-ad>

<h2>SHE Media</h2>
<amp-ad width="300" height="250"
type="shemedia"
data-slot-type="medrec"
data-boomerang-path="/amp-example/26403"
json='{"boomerangConfig": {"vertical": "parenting", "targeting":{"abc":["xyz"]}}'>
<div placeholder></div>
<div fallback></div>
</amp-ad>

<h2>Sklik</h2>
<amp-ad width="970" height="310"
type="sklik"
Expand Down
1 change: 1 addition & 0 deletions extensions/amp-ad/amp-ad.md
Expand Up @@ -384,6 +384,7 @@ See [amp-ad rules](https://github.com/ampproject/amphtml/blob/master/extensions/
- [SAS CI 360 Match](../../ads/sas.md)
- [Sekindo](../../ads/sekindo.md)
- [Sharethrough](../../ads/sharethrough.md)
- [SHE Media](../../ads/shemedia.md)
- [Sklik](../../ads/sklik.md)
- [SlimCut Media](../../ads/slimcutmedia.md)
- [Smart AdServer](../../ads/smartadserver.md)
Expand Down

0 comments on commit f0119a5

Please sign in to comment.