Skip to content

Commit

Permalink
Add finative support to amp-ad (#32822)
Browse files Browse the repository at this point in the history
* add finative support

* ...

* 3p integration.js issue fix
  • Loading branch information
SeedingAllianceTech committed Feb 26, 2021
1 parent 55b6a98 commit dbb2d6a
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 3p/integration.js
Expand Up @@ -132,6 +132,7 @@ import {f1h} from '../ads/vendors/f1h';
import {fakeDelayed} from '../ads/vendors/_fakedelayed_';
import {feedad} from '../ads/vendors/feedad';
import {felmat} from '../ads/vendors/felmat';
import {finative} from '../ads/vendors/finative';
import {firstimpression} from '../ads/vendors/firstimpression';
import {flite} from '../ads/vendors/flite';
import {fluct} from '../ads/vendors/fluct';
Expand Down Expand Up @@ -401,6 +402,7 @@ register('f1h', f1h);
register('facebook', facebook);
register('feedad', feedad);
register('felmat', felmat);
register('finative', finative);
register('firstimpression', firstimpression);
register('flite', flite);
register('fluct', fluct);
Expand Down
2 changes: 2 additions & 0 deletions ads/_config.js
Expand Up @@ -502,6 +502,8 @@ const adConfig = jsonConfiguration({
renderStartImplemented: true,
},

'finative': {},

'firstimpression': {
prefetch: 'https://ecdn.firstimpression.io/static/js/fiamp.js',
preconnect: 'https://cdn.firstimpression.io',
Expand Down
29 changes: 29 additions & 0 deletions ads/vendors/finative.js
@@ -0,0 +1,29 @@
/**
* Copyright 2015 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} from '../../3p/3p';

/**
* @param {!Window} global
* @param {!Object} data
*/
export function finative(global, data) {
writeScript(
global,
'https://d.finative.cloud/cds/delivery/init?url=' +
encodeURIComponent(data.url)
);
}
44 changes: 44 additions & 0 deletions ads/vendors/finative.md
@@ -0,0 +1,44 @@
<!---
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.
-->

# finative


## Example


```html
<amp-ad
height="250"
type="finative"
data-url="https://amp.yoursite.com/amp/"
>
</amp-ad>
```


## Configuration

Before starting any finative AMP setup, please reach out to your account manager for the most up to date documentation or contact [support@finative.com](mailto:support@finative.com).
Supported parameters:

- `url`: Domain or URL from your Project
8 changes: 8 additions & 0 deletions examples/amp-ad/ads.amp.html
Expand Up @@ -155,6 +155,7 @@
<option>f1h</option>
<option>feedad</option>
<option>felmat</option>
<option>finative</option>
<option>flite</option>
<option>fluct</option>
<option>forkmedia</option>
Expand Down Expand Up @@ -1274,6 +1275,13 @@ <h2>Flite</h2>
data-mixins="">
</amp-ad>

<h2>finative</h2>
<amp-ad
height="250"
type="finative"
data-url="https://mockup.finative.cloud">
</amp-ad>

<h2>fluct</h2>
<amp-ad width="300" height="250"
type="fluct"
Expand Down
1 change: 1 addition & 0 deletions extensions/amp-ad/amp-ad.md
Expand Up @@ -336,6 +336,7 @@ See [amp-ad rules](validator-amp-ad.protoascii) in the AMP validator specificati
- [Ezoic](../../ads/vendors/ezoic.md)
- [FeedAd](../../ads/vendors/feedad.md)
- [Felmat](../../ads/vendors/felmat.md)
- [finative](../../ads/vendors/finative.md)
- [FlexOneELEPHANT](../../ads/vendors/f1e.md)
- [FlexOneHARRIER](../../ads/vendors/f1h.md)
- [Flite](../../ads/vendors/flite.md)
Expand Down

0 comments on commit dbb2d6a

Please sign in to comment.