amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

$sf is not defined within the Google safeFrame when not checked in google admanager

Open ybootin opened this issue 5 years ago • 3 comments

Description

all AMP creatives served through google <amp-ad type="doubleclick" are served by default through a safeFrame. The problem is that by default ads are served through safeFrame, but the safeFrame API is only available if the serve into a safeframe is checked.

This issue can be reproduce on this page : https://seedtagtest.com/2021/09/03/test-seedtag-false/amp/ Capture d’écran 2021-12-01 à 11 39 26 Capture d’écran 2021-12-01 à 11 40 20

Here's the setup on google admanager. If i checked the serve into safeframe option i have access to the sf api Capture d’écran 2021-12-01 à 11 41 02

I think when serving ads into safeframe, $sf api should be available by default

Thx for your help :)

Reproduction Steps

Go on this page : https://seedtagtest.com/2021/09/03/test-seedtag-false/amp/

open a JS console. and locate the safeframe window

try to call window.$sf in this scope and you'll get the exception $sf is not defined

Relevant Logs

No response

Browser(s) Affected

No response

OS(s) Affected

No response

Device(s) Affected

No response

AMP Version Affected

No response

ybootin avatar Dec 01 '21 11:12 ybootin

Hi guys

any news from that ? I saw Teads reports a very similar ticket 3 years ago : https://github.com/ampproject/amphtml/issues/19466

It's the same issues, except that here it's global. When served in safeFrame, safeFrame API should be exposed.

Keep me posted

Cheers :)

ybootin avatar Dec 30 '21 10:12 ybootin

@kristoferbaxter keep us posted

ybootin avatar May 16 '22 07:05 ybootin

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 18 '23 06:06 stale[bot]