MCPcopy
hub / github.com/ampproject/amphtml / googleAdUrl

Function googleAdUrl

ads/google/a4a/utils.js:364–377  ·  view source on GitHub ↗
(
  a4a,
  baseUrl,
  startTime,
  parameters,
  opt_experimentIds
)

Source from the content-addressed store, hash-verified

362 * @return {!Promise<string>}
363 */
364export function googleAdUrl(
365 a4a,
366 baseUrl,
367 startTime,
368 parameters,
369 opt_experimentIds
370) {
371 // TODO: Maybe add checks in case these promises fail.
372 const blockLevelParameters = googleBlockParameters(a4a, opt_experimentIds);
373 return googlePageParameters(a4a, startTime).then((pageLevelParameters) => {
374 Object.assign(parameters, blockLevelParameters, pageLevelParameters);
375 return truncAndTimeUrl(baseUrl, parameters, startTime);
376 });
377}
378
379/**
380 * @param {string} baseUrl

Callers 3

test-utils.jsFile · 0.90
getAdUrlMethod · 0.90
getAdUrlMethod · 0.90

Calls 5

googleBlockParametersFunction · 0.85
googlePageParametersFunction · 0.85
truncAndTimeUrlFunction · 0.85
assignMethod · 0.80
thenMethod · 0.45

Tested by

no test coverage detected