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 all instances of googletagservices gpt url to securepubads gpt url #20

Merged
merged 4 commits into from
Feb 16, 2022
Merged
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
2 changes: 1 addition & 1 deletion docs/api/ReactGPT.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ React GPT makes sure that those APIs are called right before the service is enab

Global configuration applies to the all React GPT instances. You can set the following configuration through `Bling.configure(config)`.

* `seedFileUrl` - An optional string for GPT seed file url to override. Default value is `//www.googletagservices.com/tag/js/gpt.js`.
* `seedFileUrl` - An optional string for GPT seed file url to override. Default value is `https://securepubads.g.doubleclick.net/tag/js/gpt.js`.
* `renderWhenViewable` - An optional flag to indicate whether an ad should only render when it's fully in the viewport area. Default is `true`.
* `viewableThreshold` - An optional number to indicate how much percentage of an ad area needs to be in a viewable area before rendering. Default value is `0.5`. Acceptable range is between `0` and `1.0`.
* `filterProps` - An optional function to create an object with filtered current props and next props for a given keys to perform equality check. Default value is [`filterProps`](../../src/utils/filterProps.js).
Expand Down
2 changes: 1 addition & 1 deletion examples/apps/routing/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class AppContainer extends Component {
routeComponent: this.routes["/Travel/Europe"].component
};

componentWillMount() {
UNSAFE_componentWillMount() {
this.unlisten = this.history.listen(location => {
const route =
this.routes[location.pathname] || this.routes["/Travel/Europe"];
Expand Down
2 changes: 1 addition & 1 deletion scripts/updateAPIList.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ phantom.create().then(function (ph) {
}
});
page.open(process.cwd() + "/scripts/empty.html").then(function () {
page.includeJs("http://www.googletagservices.com/tag/js/gpt.js").then(function () {
page.includeJs("https://securepubads.g.doubleclick.net/tag/js/gpt.js").then(function () {
setTimeout(function () {
page.evaluate(function () {
var EXCLUDES = ["constructor"].concat(Object.getOwnPropertyNames(Object.getPrototypeOf({})));
Expand Down
4 changes: 2 additions & 2 deletions src/Bling.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ class Bling extends Component {
/**
* An optional string for GPT seed file url to override.
*/
seedFileUrl: "//www.googletagservices.com/tag/js/gpt.js",
seedFileUrl: "https://securepubads.g.doubleclick.net/tag/js/gpt.js",
/**
* An optional flag to indicate whether an ad should only render when it's fully in the viewport area. Default is `true`.
*/
Expand Down Expand Up @@ -406,7 +406,7 @@ class Bling extends Component {
.catch(this.onScriptError.bind(this));
}

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const {propsEqual} = Bling._config;
const {sizeMapping} = this.props;
if (
Expand Down
6 changes: 3 additions & 3 deletions test/createManager.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ describe("createManager", () => {

it("loads gpt", done => {
adManager
.load("//www.googletagservices.com/tag/js/gpt.js")
.load("//securepubads.g.doubleclick.net/tag/js/gpt.js")
.then(result => {
expect(result).to.be.an("object");
expect(adManager.isLoaded).to.be.true;
Expand All @@ -113,7 +113,7 @@ describe("createManager", () => {
it("uses gpt when already exists", done => {
window.googletag = googletag;
adManager
.load("//www.googletagservices.com/tag/js/gpt-invalid.js")
.load("//securepubads.g.doubleclick.net/tag/js/gpt-invalid.js")
.then(() => {
expect(adManager.isLoaded).to.be.true;
done();
Expand All @@ -132,7 +132,7 @@ describe("createManager", () => {
it("handles invalid url", done => {
adManager = createManager();
adManager
.load("//www.googletagservices.com/tag/js/gpt-invalid.js")
.load("//securepubads.g.doubleclick.net/tag/js/gpt-invalid.js")
.catch(err => {
expect(err.message).to.equal("failed to load script");
done();
Expand Down