Skip to content

Commit

Permalink
Update all instances of googletagservices gpt url to securepubads gpt…
Browse files Browse the repository at this point in the history
… url (#20)

* Update all instances of googletagservices gpt url to securepubads gpt url

* Add UNSAFE so we can look to update REACT

* update remaining paths; use https to avoid redirect

Co-authored-by: Andrew Berry <[email protected]>
  • Loading branch information
andrew-sotiriou and andrewb authored Feb 16, 2022
1 parent a175219 commit 8e94458
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
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

0 comments on commit 8e94458

Please sign in to comment.