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
adding sekindo ads #11935
adding sekindo ads #11935
Changes from 5 commits
63755b4
2ca8775
26a1084
eb02707
14d35c4
ce4f324
bb9f3e0
df6bca3
6290e03
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/** | ||
* Copyright 2017 The AMP HTML Authors. All Rights Reserved. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: 2018 |
||
* | ||
* 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 {validateData, loadScript} from '../3p/3p'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please sort in alphabetical order to fix lint check |
||
|
||
/** | ||
* @param {!Window} global | ||
* @param {!Object} data | ||
*/ | ||
export function sekindo(global, data) { | ||
validateData(data, ['spaceid']); | ||
const pubUrl = encodeURIComponent(global.context.sourceUrl); | ||
const excluedsSet = {ampSlotIndex: 1, type: 1}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: typo? |
||
const customParamMap = {spaceid: 's',width: 'x',height: 'y'}; | ||
let query = 'isAmpProject=1&pubUrl=' + pubUrl + '&cbuster=' + | ||
global.context.startTime + '&'; | ||
let getParam = ''; | ||
for (const key in data) { | ||
if (data.hasOwnProperty(key)) { | ||
if (typeof excluedsSet[key] == 'undefined') { | ||
getParam = (typeof customParamMap[key] == 'undefined') ? | ||
key : customParamMap[key]; | ||
query += getParam + '=' + encodeURIComponent(data[key]) + '&'; | ||
} | ||
} | ||
} | ||
loadScript(global, 'https://live.sekindo.com/live/liveView.php?' + query, () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: 80 chars limit |
||
global.context.renderStart(); | ||
}, () => { | ||
global.context.noContentAvailable(); | ||
}); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!--- | ||
Copyright 2017 The AMP HTML Authors. All Rights Reserved. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: 2018 |
||
|
||
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. | ||
--> | ||
|
||
# Sekindo | ||
|
||
Please visit our web (http://www.sekindo.com) for more details | ||
## Example | ||
|
||
```html | ||
<amp-ad width="300" height="250" | ||
type="sekindo" | ||
data-spaceId="14071"> | ||
</amp-ad> | ||
``` | ||
|
||
## Configuration | ||
|
||
__Required:__ | ||
|
||
- `data-spaceId` - Adunit unique id | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just FYI: |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1194,6 +1194,12 @@ <h2>Rubicon Project Smart Tag</h2> | |
json='{"visitor":{"age":"18-24","gender":"male"},"inventory":{"section":"amp"}}'> | ||
</amp-ad> | ||
|
||
<h2>Sekindo</h2> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add your example to this form as well. |
||
<amp-ad width="300" height="250" | ||
type="sekindo" | ||
data-spaceId="14071"> | ||
</amp-ad> | ||
|
||
<h2>Rubicon Project FastLane Single Slot</h2> | ||
<amp-ad width="320" height="50" | ||
type="rubicon" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: new line