Skip to content

Commit

Permalink
Add felmat support for amp-ad (ampproject#6076)
Browse files Browse the repository at this point in the history
* Add felmat support for amp-ad

* Add felmat support for amp-ad

* examples edit

* add renderStart

* add renderStart

* change param

* space-infix-ops

* change encode
  • Loading branch information
felmat authored and zhouyx committed Nov 18, 2016
1 parent a871915 commit 59e874a
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 3p/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ import {ezoic} from '../ads/ezoic';
import {dotandads} from '../ads/dotandads';
import {doubleclick} from '../ads/google/doubleclick';
import {eplanning} from '../ads/eplanning';
import {felmat} from '../ads/felmat';
import {flite} from '../ads/flite';
import {genieessp} from '../ads/genieessp';
import {gmossp} from '../ads/gmossp';
Expand Down Expand Up @@ -175,6 +176,7 @@ register('doubleclick', doubleclick);
register('eplanning', eplanning);
register('ezoic', ezoic);
register('facebook', facebook);
register('felmat', felmat);
register('flite', flite);
register('genieessp', genieessp);
register('gmossp', gmossp);
Expand Down
5 changes: 5 additions & 0 deletions ads/_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ export const adConfig = {

fake: {},

felmat: {
prefetch: 'https://t.felmat.net/js/fmamp.js',
renderStartImplemented: true,
},

flite: {},

genieessp: {
Expand Down
27 changes: 27 additions & 0 deletions ads/felmat.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* Copyright 2016 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 {writeScript, validateData} from '../3p/3p';

/**
* @param {!Window} global
* @param {!Object} data
*/
export function felmat(global, data) {
validateData(data, ['host', 'fmt', 'fmk', 'fmp']);
global.fmParam = data;
writeScript(global, 'https://t.' + encodeURIComponent(data.host) + '/js/fmamp.js');
}
41 changes: 41 additions & 0 deletions ads/felmat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!---
Copyright 2016 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.
-->

# felmat

## Example

```html
<amp-ad width="300" height="250"
type="felmat"
data-host="felmat.net"
data-fmt="banner"
data-fmk="U12473_n2cJD"
data-fmp="0">
</amp-ad>
```

## Configuration

For configuration details and to generate your tags, please contact https://www.felmat.net/service/inquiry

Supported parameters:

- data-host
- data-fmt
- data-fmk
- data-fmp

12 changes: 12 additions & 0 deletions examples/ads.amp.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ <h2>Ad networks in <span class="broken">red color</span> have broken examples, p
<a href="#doubleclick">Doubleclick</a> |
<a href="#eplanning">E-Planning</a> |
<a href="#ezoic">Ezoic</a> |
<a href="#felmat">Felmat</a> |
<a href="#flite">Flite</a> |
<a href="#genieessp"></a> |
<a href="#gmossp" class="broken"></a> |
Expand Down Expand Up @@ -559,6 +560,17 @@ <h2 id="ezoic">Ezoic</h2>
<div fallback></div>
</amp-ad>

<h2 id="felmat">Felmat</h2>
<amp-ad width=300 height=250
type="felmat"
data-host="felmat.net"
data-fmt="banner"
data-fmk="U12473_n2cJD"
data-fmp="0">
<div placeholder></div>
<div fallback></div>
</amp-ad>

<h2 id="flite">Flite</h2>
<amp-ad width=320 height=568
type="flite"
Expand Down
1 change: 1 addition & 0 deletions extensions/amp-ad/amp-ad.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ resources in AMP. It requires a `type` argument that select what ad network is d
- [Doubleclick](../../ads/google/doubleclick.md)
- [E-Planning](../../ads/eplanning.md)
- [Ezoic](../../ads/ezoic.md)
- [Felmat](../../ads/felmat.md)
- [Flite](../../ads/flite.md)
- [GenieeSSP](../../ads/genieessp.md)
- [GMOSSP](../../ads/gmossp.md)
Expand Down

0 comments on commit 59e874a

Please sign in to comment.