Amphtml: Intent to Implement amp-ad type: Adventive

Created on 15 Dec 2017  路  12Comments  路  Source: ampproject/amphtml

Hello!

Adventive would like to integrate our network into amp-ad types. PR soon :)

Also, if there are clarifications questions on implementing this, is it acceptable to ask them here, or shall I create a separate ticket for it?

Thanks!

INTENT TO IMPLEMENT monetization

All 12 comments

Feel free to ask them here, or in the PR.

Yep. This is the place :-)

Question: How ad/ads.extern.js come into play?

I see the majority is data attributes; from what I can gather, those fit in with the comment listed at the top of the file:

// HACK. Define application types used in default AMP externs
// that are not in the 3p code.
...
// Long list of, uhm, stuff the ads code needs to compile.
// All unquoted external properties need to be added here.

but there are also variable declarations and placeholders there.

Any clarification on this would be helpful.

@lannka, @jridgewell
any feedback on my last question?

AMP uses closure compiler to minify the binary size. extern.js is to declare variables that are provided/accessed externally, hence should not be minified.

See here to get more understanding about the technology.

I've updated our fork to the latest and I'm currently trying to load the locally served files on my server. I am able to load all files except I receive a 404 for dist/ww.js from xhr-impls.js:163 and a related Uncaught (in promise) Error: HTTP 404 from log.js:489.

I don't see www.js within dist/ so that makes sense, but the ad loads just fine via localhost.

Before updating to the latest AMP_CONFIG did not have local_dev set to true and was loading from the cdn but it seems #12054 fixed this?

@Adventive Yes, you should now see localDev set to true by default after gulp, gulp watch, gulp build, or gulp dist --fortesting.

Great,

From what I can tell, there is url replacement based on environment. (urls in ads.amp.html point to the cdn but in localhost are loaded locally). I also see that occurs from when loading on a non-localhost, the cdn url is replaced with my servers url.

If I point directly to localhost, it loads correctly but attempts to load the non-existent dist/ww.js from my server. Also none-existent on localhost. Would this be related, @rsimha-amp ?

I'm not familiar with the code that determines how dist/ww.js is loaded. @lannka?

From what I've gather:
ww.js is a web worker file. Probably used for multiple extensions (in my case amp-bind)
It is dealt with in app.js from 904-927 (set) and 1016-1022 (get)

Closing since it's merged.

In response to the question about ww.js, I think the answer lies in https://github.com/ampproject/amphtml/issues/12747#issuecomment-358753920.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gmajoulet picture gmajoulet  路  3Comments

akshaylive picture akshaylive  路  3Comments

aghassemi picture aghassemi  路  3Comments

torch2424 picture torch2424  路  3Comments

Download picture Download  路  3Comments