Skip to content
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

✨ Update path for openadstream ads url #40091

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions ads/vendors/openadstream.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import {validateData, writeScript} from '#3p/3p';
import {validateData, writeScript } from '#3p/3p';

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: space

/**
* @param {!Window} global
* @param {!Object} data
*/
export function openadstream(global, data) {
validateData(data, ['adhost', 'sitepage', 'pos'], ['query']);
validateData(data, ['adhost', 'urlpath', 'sitepage', 'pos'], ['query']);

let url =
'https://' +
encodeURIComponent(data.adhost) +
'/3/' +
'/' +
data.urlpath +
'/' +
data.sitepage +
'/1' +
String(Math.random()).substring(2, 11) +
'@' +
data.pos;

Expand Down
4 changes: 4 additions & 0 deletions ads/vendors/openadstream.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
height="250"
type="openadstream"
data-adhost="oasc-training7.247realmedia.com"
data-urlpath="/RealMedia/ads/ads_path"
data-sitepage="dx_tag_pvt_site"
data-pos="x04"
data-query="keyword=keyvalue&key2=value2"
Expand All @@ -25,6 +26,7 @@
height="90"
type="openadstream"
data-adhost="oasc-training7.247realmedia.com"
data-urlpath="/RealMedia/ads/ads_path"
data-sitepage="dx_tag_pvt_site"
data-pos="x50,x51!x50"
>
Expand All @@ -34,6 +36,7 @@
height="250"
type="openadstream"
data-adhost="oasc-training7.247realmedia.com"
data-urlpath="/RealMedia/ads/ads_path"
data-sitepage="dx_tag_pvt_site"
data-pos="x50,x51!x51"
>
Expand All @@ -47,6 +50,7 @@ For details on the configuration semantics, please contact the ad network or ref
### Required parameters

- `adhost`: OAS cname. Must start with HTTPS.
- `urlpath`: path for ads tag.
- `sitepage`: Sitepage configured for this ad spot.
- `pos`: Position for the this ad spot.

Expand Down
Loading