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

Integrate Google AdSense for Search and Adsense for Shopping (on the Custom Search Ads protocol) with AMP #6518

Merged
merged 37 commits into from
Dec 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
9141d53
Initial commit for CSA AMP ad integration
megankj Nov 4, 2016
743b5c7
update ads example
megankj Nov 4, 2016
3aa6786
assign throwaway variable so compiler doesn't complain
megankj Nov 4, 2016
2d8301c
fix lint errors
megankj Nov 4, 2016
61b027f
define _googCsa in backfill function
megankj Nov 5, 2016
66b2794
Add link to CSA docs in AdSense docs
megankj Nov 8, 2016
ae8e9a4
fix test error
megankj Nov 8, 2016
321b74a
fix type error
megankj Nov 8, 2016
dbac823
feedback from jeff
megankj Nov 11, 2016
fb23abf
update css example
megankj Nov 11, 2016
2dc8c7f
create overflow on resize denied if it doesn't exist
megankj Nov 14, 2016
968d93a
fix from jeff's comments
megankj Nov 21, 2016
30b88ca
initial stab at unit tests
megankj Nov 30, 2016
02e5f43
first stab at unit tests
megankj Dec 5, 2016
25d7cac
add test for backfill
megankj Dec 5, 2016
b38e6a4
lint issues
megankj Dec 7, 2016
6148cc2
create helper functions and move to bottom
megankj Dec 8, 2016
2803f73
hongfei's feedback
megankj Dec 16, 2016
8a0588f
use Object.assign and tryparsejson
megankj Dec 16, 2016
3186351
update tests
megankj Dec 16, 2016
0edfe45
code review changes
megankj Dec 16, 2016
a907f54
change global.innerHeight back to initial height
megankj Dec 16, 2016
2040f76
force dom reflow after appending overflow
megankj Dec 17, 2016
733eea8
Revert "force dom reflow after appending overflow"
megankj Dec 17, 2016
368aec7
hide overflow of CSA iframe
megankj Dec 17, 2016
594787c
Set iframe width to 100% to prevent ios9 from breaking the overflow i…
megankj Dec 19, 2016
f152a6b
move code into functions
megankj Dec 20, 2016
8ad6f35
Move resize handlers to own functions, register in CSA function, not …
megankj Dec 20, 2016
8183a36
nitpicks
megankj Dec 20, 2016
579a4a5
add forgotten breaks to switch statement
megankj Dec 20, 2016
e06b1e3
Create two callback functions, one for backfill and one without.
megankj Dec 21, 2016
ad7721d
Merge remote-tracking branch 'ampproject/master' into csa-integration
megankj Dec 21, 2016
d2fcd09
Merge branch 'ampproject/master' into csa-integration
megankj Dec 21, 2016
2ada432
Inline backfill ads function
megankj Dec 21, 2016
3f3617f
Merge with adsense.md accidentally replaced HC link
megankj Dec 21, 2016
d30ff10
travis errors
megankj Dec 21, 2016
ad9b7e5
more travis errors
megankj Dec 22, 2016
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: 2 additions & 0 deletions 3p/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ import {chargeads} from '../ads/chargeads';
import {colombia} from '../ads/colombia';
import {contentad} from '../ads/contentad';
import {criteo} from '../ads/criteo';
import {csa} from '../ads/google/csa';
import {distroscale} from '../ads/distroscale';
import {ezoic} from '../ads/ezoic';
import {dotandads} from '../ads/dotandads';
Expand Down Expand Up @@ -198,6 +199,7 @@ register('chargeads', chargeads);
register('colombia', colombia);
register('contentad', contentad);
register('criteo', criteo);
register('csa', csa);
register('distroscale', distroscale);
register('dotandads', dotandads);
register('doubleclick', doubleclick);
Expand Down
4 changes: 4 additions & 0 deletions ads/_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ export const adConfig = {
preconnect: 'https://cas.criteo.com',
},

csa: {
prefetch: 'https://www.google.com/adsense/search/ads.js',
},

distroscale: {
preconnect: [
'https://c.jsrdn.com',
Expand Down
3 changes: 3 additions & 0 deletions ads/ads.extern.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ googletag.pubads;
googletag.defineSlot
data.slot;

var _googCsa;
window._googCsa;

var _inmobi;
window._inmobi;
_inmobi.getNewAd;
Expand Down
2 changes: 1 addition & 1 deletion ads/google/adsense.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ limitations under the License.

## Configuration

For semantics of configuration, please see [ad network documentation](https://support.google.com/adsense/answer/7183212?hl=en).
For semantics of configuration, please see [ad network documentation](https://support.google.com/adsense/answer/7183212?hl=en). For AdSense for Search and AdSense for Shopping, please see the [CSA AMP ad type](https://github.com/ampproject/amphtml/blob/master/ads/google/csa.md).

Supported parameters:

Expand Down
Loading