Skip to content

Commit

Permalink
✨ [AMP-Digiteka] ADD a new vendor Digiteka (#33135)
Browse files Browse the repository at this point in the history
* add digiteka

* WIP

* WIP

* Update ads.amp.html

* fix avec review

* remove useless file

* don't touch other files

* update MarkDown

* WIP

* updates

Co-authored-by: cedric <cedric.ambrugeat@gmail.com>
Co-authored-by: Marc Mulvidson <marc@digiteka.com>
Co-authored-by: Marc Mulvidson <46680685+marcDigiteka@users.noreply.github.com>
  • Loading branch information
4 people committed Mar 18, 2021
1 parent feed790 commit cad3130
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 1 deletion.
2 changes: 2 additions & 0 deletions 3p/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ import {contentad} from '../ads/vendors/contentad';
import {criteo} from '../ads/vendors/criteo';
import {csa} from '../ads/vendors/csa';
import {dable} from '../ads/vendors/dable';
import {digiteka} from '../ads/vendors/digiteka';
import {directadvert} from '../ads/vendors/directadvert';
import {distroscale} from '../ads/vendors/distroscale';
import {dotandads} from '../ads/vendors/dotandads';
Expand Down Expand Up @@ -543,6 +544,7 @@ register('swoop', swoop);
register('taboola', taboola);
register('tcsemotion', tcsemotion);
register('teads', teads);
register('digiteka', digiteka);
register('temedya', temedya);
register('torimochi', torimochi);
register('tracdelight', tracdelight);
Expand Down
4 changes: 4 additions & 0 deletions ads/_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,10 @@ const adConfig = jsonConfiguration({
renderStartImplemented: true,
},

'digiteka': {
renderStartImplemented: true,
},

'directadvert': {
renderStartImplemented: true,
},
Expand Down
38 changes: 38 additions & 0 deletions ads/vendors/digiteka.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/**
* Copyright 2021 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 digiteka(global, data) {
/*eslint "google-camelcase/google-camelcase": 0*/
global._digiteka_amp = {
allowed_data: ['mdtk', 'zone', 'adunit'],
mandatory_data: ['mdtk', 'zone'],
data,
};

validateData(
data,
global._digiteka_amp.mandatory_data,
global._digiteka_amp.allowed_data
);

loadScript(global, 'https://ot.digiteka.com/amp.js');
}
44 changes: 44 additions & 0 deletions ads/vendors/digiteka.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!---
Copyright 2021 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.
-->

# Digiteka

## Example

### Basic

```html
<amp-ad
width="300"
height="1"
type="digiteka"
layout="responsive"
data-mdtk="01212121"
data-zone="1"
data-adunit="/accountId/AdUnitCode"
>
</amp-ad>
```

## Configuration

For configuration semantics, please [contact Digiteka](http://digiteka.com).

Supported parameters:

- `mdtk` (required)
- `zone` (required)
- `adunit` (optionnal)
14 changes: 13 additions & 1 deletion examples/amp-ad/ads.amp.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@
margin: 18px auto;
padding: 0;
}
amp-ad[type="digiteka"] {
width: 300px;
height: 250px;
max-width: 980px;
margin: 18px auto;
padding: 0;
}
</style>
<script async custom-element="amp-ad" src="https://cdn.ampproject.org/v0/amp-ad-0.1.js"></script>
<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
Expand Down Expand Up @@ -215,6 +222,7 @@
<option>csa</option>
<option>custom</option>
<option>dable</option>
<option>digiteka</option>
<option>directadvert</option>
<option>distroscale</option>
<option>dotandads</option>
Expand Down Expand Up @@ -1053,6 +1061,10 @@ <h2>Dable</h2>
<amp-embed width="336" height="280" type="dable" data-widget-id="G7ZdEWXW" data-item-id="testitem">
</amp-embed>

<h2>Digiteka</h2>
<amp-ad width="300" height="250" type="digiteka" layout="responsive" data-zone="1" data-mdtk="01540779">
</amp-ad>

<h2>Directadvert</h2>
<amp-ad width="320" height="250" type="directadvert" data-block-id="1953045">
</amp-ad>
Expand Down Expand Up @@ -2146,4 +2158,4 @@ <h2>Zucks</h2>
</amp-ad>
</body>

</html>
</html>
1 change: 1 addition & 0 deletions extensions/amp-ad/amp-ad.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ See [amp-ad rules](validator-amp-ad.protoascii) in the AMP validator specificati
- [Content.ad](../../ads/vendors/contentad.md)
- [Criteo](../../ads/vendors/criteo.md)
- [CSA](../../ads/vendors/csa.md)
- [Digiteka](../../ads/vendors/digiteka.md)
- [Directadvert](../../ads/vendors/directadvert.md)
- [DistroScale](../../ads/vendors/distroscale.md)
- [Dot and Media](../../ads/vendors/dotandads.md)
Expand Down

0 comments on commit cad3130

Please sign in to comment.