Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
02bd176
Insurads Implementation Testing
JoseClimaco Feb 11, 2025
9dd6f1e
Fast Fetch InsurAds - Functionalities Validation
JoseClimaco Mar 12, 2025
7c78252
Separate insurads business logic
JoseClimaco Mar 13, 2025
e824f43
code cleanup
JoseClimaco Mar 26, 2025
7f83300
Extension and Visibility modules WIP
JoseClimaco Mar 26, 2025
4b372d9
use decorator pattern with reusable util method for doubleclick metho…
JoseClimaco Mar 26, 2025
1c60511
Implement Messages models, factory and handlers
JoseClimaco Apr 7, 2025
bc8a976
Fix
JoseClimaco Apr 8, 2025
9abae28
tests
JoseClimaco Apr 8, 2025
5a1a5d3
Fix Messages
JoseClimaco Apr 8, 2025
1684d28
Working WS, handshake and init
JoseClimaco Apr 9, 2025
777c466
Add DoubleClick logic to own class. Add Engagement Tracking. Many imp…
JoseClimaco Apr 10, 2025
f456db2
Fix extension ids
JoseClimaco Apr 10, 2025
3732dfe
Extension Update. Working
JoseClimaco Apr 11, 2025
af12745
rebuilt realtime and messaging
JoseClimaco Jun 5, 2025
2d9a57e
Add bound reference for easy cleanup + others
JoseClimaco Jun 5, 2025
be75642
Engagement Tracker improvements
JoseClimaco Jun 6, 2025
663f2e6
Remove unused import
JoseClimaco Jun 11, 2025
b0d1497
Implement slot teardown
JoseClimaco Jun 11, 2025
76939b7
Implement slot teardown
JoseClimaco Jun 11, 2025
f1270fc
Update extension
JoseClimaco Jun 11, 2025
15eaafc
Update to use parameters map
JoseClimaco Jun 12, 2025
95da497
Update to use parameters map
JoseClimaco Jun 12, 2025
263dd64
Code Cleanup
JoseClimaco Jun 12, 2025
f30f1fa
Add reconnect logic
JoseClimaco Jun 12, 2025
4bfb8fa
Limit visibility thresholds to improve performance
JoseClimaco Jun 23, 2025
fbb9126
Retry failed websocket connection WIP
JoseClimaco Jun 23, 2025
3069d07
add lockedid test
aribeiro-insurads Jun 24, 2025
48c36c8
Update Engagement Tracker
JoseClimaco Jun 24, 2025
4b0395e
Remove unused imports, fix param
JoseClimaco Jun 25, 2025
1ff3c86
Merge branch 'fast-fetch-insurads' of https://github.com/JoseClimaco/…
aribeiro-insurads Jun 25, 2025
dddcf61
add insurads test
aribeiro-insurads Jun 25, 2025
00293a7
Self-destruct / disconnect for when the ad is collapsed / deleted fro…
JoseClimaco Jun 26, 2025
b7e2650
InsurAds impl test
aribeiro-insurads Jun 30, 2025
bf2d599
Next Refresh
JoseClimaco Jun 30, 2025
72807ce
Merge branch 'fast-fetch-insurads' of https://github.com/JoseClimaco/…
JoseClimaco Jun 30, 2025
2919f75
fixing app-init
aribeiro-insurads Jul 2, 2025
8b6010c
adjusting namings
aribeiro-insurads Jul 2, 2025
d219bff
no message
JoseClimaco Jul 3, 2025
fcb221a
Core as singleton, extension singleton
JoseClimaco Jul 3, 2025
ba10e1b
Move engagement to Core, Dispatch Message to the correct adUnit Handl…
JoseClimaco Jul 3, 2025
26dfd54
Move extension setup to core, unit init with reconnect, process app i…
JoseClimaco Jul 3, 2025
dac6488
New Waterfall Logic, Waterfall models update, Remove Engagement Singl…
JoseClimaco Jul 3, 2025
1fb9522
Get Required Key Values, Parse all key values for url, update rtc con…
JoseClimaco Jul 3, 2025
2bd8e77
Add unit info to simplify code
aribeiro-insurads Jul 4, 2025
c66e56a
Merge branch 'fast-fetch-insurads' of github.com:JoseClimaco/amphtml-…
aribeiro-insurads Jul 4, 2025
159b7ef
Move processing required key values to correct place
JoseClimaco Jul 4, 2025
3b08032
New Cookie class
JoseClimaco Jul 4, 2025
1e8353e
Remove Context Id from extension
JoseClimaco Jul 4, 2025
0f2ec36
Hash canvas info in locked data
JoseClimaco Jul 4, 2025
fb647df
Use Cookie class to get new visitor info
JoseClimaco Jul 4, 2025
4ba4b98
Merge branch 'fast-fetch-insurads' of https://github.com/JoseClimaco/…
JoseClimaco Jul 4, 2025
be47050
Remove unnecessary code
aribeiro-insurads Jul 4, 2025
e6ac976
Merge branch 'fast-fetch-insurads' of github.com:JoseClimaco/amphtml-…
aribeiro-insurads Jul 4, 2025
3238036
Cleanup, reuse unit info
JoseClimaco Jul 4, 2025
f941219
Merge branch 'fast-fetch-insurads' of https://github.com/JoseClimaco/…
JoseClimaco Jul 4, 2025
a435595
send unit int on reconnect and send it when app init is ready
aribeiro-insurads Jul 4, 2025
25a1f2a
Merge branch 'fast-fetch-insurads' of github.com:JoseClimaco/amphtml-…
aribeiro-insurads Jul 4, 2025
573063a
Parse only relevant app init response for each case
JoseClimaco Jul 4, 2025
c61eefe
Merge branch 'fast-fetch-insurads' of https://github.com/JoseClimaco/…
JoseClimaco Jul 4, 2025
d75335b
change code position
aribeiro-insurads Jul 4, 2025
d653570
Merge branch 'fast-fetch-insurads' of github.com:JoseClimaco/amphtml-…
aribeiro-insurads Jul 4, 2025
8b1e45a
Save lockedid and server time stamp on cookie, update realtime endpoint
JoseClimaco Jul 4, 2025
2a4c1ad
Merge branch 'fast-fetch-insurads' of https://github.com/JoseClimaco/…
JoseClimaco Jul 4, 2025
fe4aee4
Minor fixes, Amp compiles, everything runs.
JoseClimaco Jul 7, 2025
ad64b7a
Fix callback attribution. Minor improvements.
JoseClimaco Jul 7, 2025
b336981
Fixes
JoseClimaco Jul 7, 2025
6450e11
Split the start logic and ad unit registration to have a better reada…
JoseClimaco Jul 7, 2025
daa5e5c
Fix core destroy
JoseClimaco Jul 7, 2025
5b7ab51
Update waterfall
JoseClimaco Jul 7, 2025
e58311d
Update unit init message model
JoseClimaco Jul 7, 2025
63d86d8
fix position type
JoseClimaco Jul 7, 2025
d49cabc
No need to keep nextRefresh globally. Get it from waterfall when needed.
JoseClimaco Jul 7, 2025
fe10c15
set fields for unit init
aribeiro-insurads Jul 7, 2025
65aafba
Refactor app init model
JoseClimaco Jul 8, 2025
1a83163
Update models
JoseClimaco Jul 8, 2025
97f03d9
Refactoring
JoseClimaco Jul 8, 2025
fdeca3f
Update engagement tracking
JoseClimaco Jul 8, 2025
68baddf
Update cookie class
JoseClimaco Jul 8, 2025
286c949
adjust variables and code
aribeiro-insurads Jul 8, 2025
df81884
remove unnecessary code
aribeiro-insurads Jul 8, 2025
a540b98
Make methods private
JoseClimaco Jul 9, 2025
9162a82
Merge branch 'fast-fetch-insurads' of https://github.com/JoseClimaco/…
JoseClimaco Jul 9, 2025
e8f8842
adjust code
aribeiro-insurads Jul 9, 2025
ef483ef
Merge branch 'fast-fetch-insurads' of github.com:JoseClimaco/amphtml-…
aribeiro-insurads Jul 9, 2025
22a3ec4
Update typings. Update RTC config logic
JoseClimaco Jul 9, 2025
7e216a4
Merge branch 'fast-fetch-insurads' of https://github.com/JoseClimaco/…
JoseClimaco Jul 9, 2025
b11f7ad
Update rtc-config logic
JoseClimaco Jul 9, 2025
022cde9
removing console log's and comments
aribeiro-insurads Jul 9, 2025
b65c9a3
Fix Typings
JoseClimaco Jul 9, 2025
896ac94
Update required key values logic
JoseClimaco Jul 9, 2025
e0a1908
Merge branch 'fast-fetch-insurads' of https://github.com/JoseClimaco/…
JoseClimaco Jul 9, 2025
673f6e7
Better waterfall usage
JoseClimaco Jul 9, 2025
adae06e
Refactoring
JoseClimaco Jul 9, 2025
878d918
reviewing extension comunication
aribeiro-insurads Jul 9, 2025
18cdaea
Merge branch 'fast-fetch-insurads' of github.com:JoseClimaco/amphtml-…
aribeiro-insurads Jul 9, 2025
d908e4f
Updates
JoseClimaco Jul 9, 2025
1303e40
Merge branch 'fast-fetch-insurads' of https://github.com/JoseClimaco/…
JoseClimaco Jul 9, 2025
eabca65
Remove duplicated
JoseClimaco Jul 9, 2025
2e2c341
Update extension with logic for message send to adunit
JoseClimaco Jul 9, 2025
d63986d
code review
aribeiro-insurads Jul 10, 2025
2455532
Models for extension
JoseClimaco Jul 10, 2025
54a700d
AdUnit becomes Unit
JoseClimaco Jul 10, 2025
6a7f126
implement adunit create and banner changed
aribeiro-insurads Jul 10, 2025
9eaebda
Merge branch 'fast-fetch-insurads' of github.com:JoseClimaco/amphtml-…
aribeiro-insurads Jul 10, 2025
6611e12
Refactoring
JoseClimaco Jul 10, 2025
333a08b
Every AdUnit becomes simply an Unit.
JoseClimaco Jul 10, 2025
0cbe87f
adjust fields
aribeiro-insurads Jul 10, 2025
4a912e5
Merge branch 'fast-fetch-insurads' of github.com:JoseClimaco/amphtml-…
aribeiro-insurads Jul 10, 2025
e1702c9
Fix validation errors
JoseClimaco Jul 10, 2025
40c9476
Improve app destroy
JoseClimaco Jul 10, 2025
60dbf17
Remove tests for now
JoseClimaco Jul 10, 2025
8d7ec86
Creating utilities file
aribeiro-insurads Jul 10, 2025
9602e40
Merge branch 'fast-fetch-insurads' of github.com:JoseClimaco/amphtml-…
aribeiro-insurads Jul 10, 2025
6ac5f8a
Fix page status
JoseClimaco Jul 10, 2025
58dbcbd
Merge branch 'fast-fetch-insurads' of https://github.com/JoseClimaco/…
JoseClimaco Jul 10, 2025
c86e383
code cleaning
aribeiro-insurads Jul 10, 2025
51875b8
Merge branch 'fast-fetch-insurads' of github.com:JoseClimaco/amphtml-…
aribeiro-insurads Jul 10, 2025
4bf5f3e
code cleaning
aribeiro-insurads Jul 10, 2025
d0cb815
clean unitHandlerMap on destroy
aribeiro-insurads Jul 10, 2025
ae3dbb2
Remove TODO, fix ivm
JoseClimaco Jul 10, 2025
3d21436
Merge branch 'fast-fetch-insurads' of https://github.com/JoseClimaco/…
JoseClimaco Jul 10, 2025
9f71f77
Merge branch 'temp-cenas-branch' into pr-with-merge
JoseClimaco Jul 11, 2025
63ae771
Move merged subtree into extensions/amp-ad-network-cenas-impl
JoseClimaco Jul 11, 2025
635d4a2
InsurAds Configs
JoseClimaco Jul 11, 2025
c93fda0
InsurAds Configs
JoseClimaco Jul 11, 2025
31fdbd3
code cleaning
aribeiro-insurads Jul 11, 2025
9a303a7
Code cleanup
JoseClimaco Jul 11, 2025
0246fdf
Remove unused contructors
JoseClimaco Jul 11, 2025
2b7f9dc
InsurAds Example
JoseClimaco Jul 11, 2025
f469575
Fixing Errors
JoseClimaco Jul 11, 2025
3b3635c
Fixing using modulo on a cryptographically secure random number prod…
JoseClimaco Jul 11, 2025
62167f5
New owner
JoseClimaco Jul 11, 2025
e54ea1b
Fix missing named parameters
JoseClimaco Jul 11, 2025
fbafe9d
Fix incorrect typings
JoseClimaco Jul 11, 2025
e553931
Use getCookie and setCookie as suggest by @powerivq
JoseClimaco Jul 14, 2025
0d4887c
Fix reference
JoseClimaco Jul 14, 2025
27c7dd1
WIP Consent Block
JoseClimaco Jul 16, 2025
86a8d19
Fix returning type
JoseClimaco Jul 16, 2025
f34a3ef
Update extensions/amp-ad-network-insurads-impl/0.1/realtime-manager.js
JoseClimaco Jul 16, 2025
412cbc1
Update extensions/amp-ad-network-insurads-impl/0.1/realtime-manager.js
JoseClimaco Jul 16, 2025
804718c
Update extensions/amp-ad-network-insurads-impl/0.1/realtime-manager.js
JoseClimaco Jul 16, 2025
0273093
Change waterfall handler name for better consistency
JoseClimaco Jul 16, 2025
fa9a1aa
Temporary readme
JoseClimaco Jul 16, 2025
21e73a8
Merge branch 'fast-fetch-insurads' of https://github.com/JoseClimaco/…
JoseClimaco Jul 16, 2025
b2ff0e9
Move all consent logic to impl WIP
JoseClimaco Jul 16, 2025
0241761
Change waterfall handler name for better consistency
JoseClimaco Jul 16, 2025
5ef8eea
Remove unused handshake callback. Fix double socket.
JoseClimaco Jul 16, 2025
808e81a
Remove logs
JoseClimaco Jul 16, 2025
edd1480
Merge branch 'main' into fast-fetch-insurads
JoseClimaco Jul 18, 2025
abef910
Fix infinite reconnect retries
JoseClimaco Aug 5, 2025
59b463a
Allow InsurAds in story ads
JoseClimaco Aug 5, 2025
20f096e
Move updates
JoseClimaco Aug 5, 2025
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
1 change: 1 addition & 0 deletions ads/_a4a-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export function getA4ARegistry() {
'mgid': (win, adTag) =>
!adTag.hasAttribute('data-container') &&
!adTag.hasAttribute('data-website'),
'insurads': () => true,
'nws': () => true,
'smartadserver': () => true,
'valueimpression': () => true,
Expand Down
5 changes: 5 additions & 0 deletions build-system/compile/bundles.config.extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@
"version": "0.1",
"latestVersion": "0.1"
},
{
"name": "amp-ad-network-insurads-impl",
"version": "0.1",
"latestVersion": "0.1"
},
{
"name": "amp-ad-network-mgid-impl",
"version": "0.1",
Expand Down
1 change: 1 addition & 0 deletions build-system/compile/bundles.legacy-latest-versions.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"amp-ad-network-dianomi-impl": "0.1",
"amp-ad-network-doubleclick-impl": "0.1",
"amp-ad-network-fake-impl": "0.1",
"amp-ad-network-insurads-impl": "0.1",
"amp-ad-network-nws-impl": "0.1",
"amp-ad-network-valueimpression-impl": "0.1",
"amp-ad": "0.1",
Expand Down
8 changes: 8 additions & 0 deletions build-system/test-configs/dep-check-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ exports.rules = [
// a4a ads depend on a4a.
'extensions/amp-ad-network-nws-impl/0.1/amp-ad-network-nws-impl.js->extensions/amp-a4a/0.1/amp-a4a.js',
'extensions/amp-ad-network-fake-impl/0.1/amp-ad-network-fake-impl.js->extensions/amp-a4a/0.1/amp-a4a.js',
'extensions/amp-ad-network-insurads-impl/0.1/amp-ad-network-insurads-impl.js->extensions/amp-a4a/0.1/amp-a4a.js',
'extensions/amp-ad-network-adzerk-impl/0.1/amp-ad-network-adzerk-impl.js->extensions/amp-a4a/0.1/amp-a4a.js',
'extensions/amp-ad-network-smartads-impl/0.1/amp-ad-network-smartads-impl.js->extensions/amp-a4a/0.1/amp-a4a.js',
'extensions/amp-ad-network-doubleclick-impl/0.1/sra-utils.js->extensions/amp-a4a/0.1/amp-a4a.js',
Expand All @@ -163,6 +164,9 @@ exports.rules = [
'extensions/amp-ad-network-doubleclick-impl/0.1/amp-ad-network-doubleclick-impl.js->extensions/amp-a4a/0.1/refresh-manager.js',
'extensions/amp-ad-network-valueimpression-impl/0.1/amp-ad-network-valueimpression-impl.js->extensions/amp-a4a/0.1/refresh-manager.js',

// Depends on DoubleClick
'extensions/amp-ad-network-insurads-impl/0.1/doubleclick-helper.js->extensions/amp-ad-network-doubleclick-impl/0.1/amp-ad-network-doubleclick-impl.js',

// AMP access depends on AMP access
'extensions/amp-access-scroll/0.1/scroll-impl.js->extensions/amp-access/0.1/amp-access-client.js',

Expand Down Expand Up @@ -536,6 +540,10 @@ exports.rules = [
'extensions/amp-ad-network-doubleclick-impl/0.1/amp-ad-network-doubleclick-impl.js',
'extensions/amp-ad-network-adsense-impl/0.1/amp-ad-network-adsense-impl.js',
],
allowlist: [
// Depends on DoubleClick
'extensions/amp-ad-network-insurads-impl/0.1/doubleclick-helper.js->extensions/amp-ad-network-doubleclick-impl/0.1/amp-ad-network-doubleclick-impl.js',
],
},

// Delayed fetch for Doubleclick will be deprecated on March 29, 2018.
Expand Down
8 changes: 8 additions & 0 deletions examples/amp-ad/a4a.amp.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@
<body>
<h1>A4A Examples</h1>

<h2>Insurads</h2>
<amp-ad
width="300"
height="250"
type="insurads"
data-ad-client="ca-pub-5439573510495356"
>
</amp-ad>
<h2>Fake ad network</h2>
<amp-ad width="300" height="400"
type="fake"
Expand Down
163 changes: 163 additions & 0 deletions examples/amp-ad/insurads.amp.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
<!doctype html>
<html ⚡ lang="en">

<head>
<meta charset="utf-8" />
<title>InsurAds example - AMP News Example</title>
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1" />
<link rel="canonical" href="http://nonblocking.io/" >
<style amp-custom>
amp-ad {
max-width: 500px;
}

.talldiv {
height: 2000px;
}

amp-ad div[placeholder] {
background-color: lightgray;
}

amp-ad div[fallback] {
background-color: black;
}

amp-ad div[placeholder]::after {
content: 'loading ...';
}

amp-ad div[fallback]::after {
content: 'No ad';
color: white;
}

amp-ad div[placeholder]::after,
amp-ad div[fallback]::after {
font-size: 20px;
line-height: 30px;
text-align: center;
position: absolute;
left: 0;
right: 0;
top: calc(50% - 15px);
}

.news-section {
display: flex;
justify-content: space-between;
margin: 30px 0;
}

.news-article {
flex: 1;
padding: 10px;
}
</style>
<style amp-boilerplate>
body {
-webkit-animation: -amp-start 8s steps(1, end) 0s 1 normal both;
-moz-animation: -amp-start 8s steps(1, end) 0s 1 normal both;
-ms-animation: -amp-start 8s steps(1, end) 0s 1 normal both;
animation: -amp-start 8s steps(1, end) 0s 1 normal both;
}

@-webkit-keyframes -amp-start {
from {
visibility: hidden;
}

to {
visibility: visible;
}
}

@-moz-keyframes -amp-start {
from {
visibility: hidden;
}

to {
visibility: visible;
}
}

@-ms-keyframes -amp-start {
from {
visibility: hidden;
}

to {
visibility: visible;
}
}

@-o-keyframes -amp-start {
from {
visibility: hidden;
}

to {
visibility: visible;
}
}

@keyframes -amp-start {
from {
visibility: hidden;
}

to {
visibility: visible;
}
}
</style>
<noscript>
<style amp-boilerplate>
body {
-webkit-animation: none;
-moz-animation: none;
-ms-animation: none;
animation: none;
}
</style>
</noscript>
<script async custom-element="amp-ad" src="https://cdn.ampproject.org/v0/amp-ad-0.1.js"></script>
<script async src="https://cdn.ampproject.org/v0.js"></script>
</head>

<body>
<div style="max-width: 800px; margin: 0 auto; padding: 20px;">
<h2>InsurAds example</h2>
<h1>Today's Headlines</h1>

<div style="background-color: #f0f0f0; padding: 15px; border-radius: 5px; margin: 20px 0;">
<h3>Breaking News</h3>
<p>Stay updated with the latest news from around the world. Fast, reliable, and always up to date.</p>
<button style="background-color: #0066cc; color: white; border: none; padding: 10px 15px; border-radius: 3px;">
Subscribe Now
</button>
</div>

<amp-ad type="insurads" data-public-id="4WMPI6PV" width="300" height="250" data-multi-size="300x250,300x50,300x50"
data-slot="/134642692/AMPTestsV3" json='{"targeting":{"target":["news"],"pos":["amp"]}}'>
</amp-ad>

<div class="news-section">
<div class="news-article">
<h4>World</h4>
<p>Global leaders meet to discuss climate change initiatives and future cooperation.</p>
</div>
<div class="news-article">
<h4>Technology</h4>
<p>New smartphone release sets the bar for innovation and user experience.</p>
</div>
<div class="news-article">
<h4>Sports</h4>
<p>Local team wins championship in a thrilling final match.</p>
</div>
</div>
</div>
</body>

</html>
Loading
Loading