Skip to content

Promote CID related code to core (out of amp-analytics) #4898

@lannka

Description

@lannka

Motivation:
Many extensions need CID hence depend on amp-analyitcs. We could remove the dependencies once get CID promoted to core.

  • amp-user-notification
  • amp-ad
  • amp-access
  • Any place needs CLIENT_ID in URL substitution

And, starting recently <amp-analytics> is blocked by ad blocker: #4896 .

Work to be done
This would need to move the following code to core, the cons is increased core size, an estimate is listed below:

File to promote Raw file size Minified size
cid-impl.js 12k 3.7k
crypto-impl.js 3.6k 2.0k
closure/sha384.js 9.2k 9.2k

The real size after closure complier should be smaller.
And we can late load the sha384.js lib as tracked here: #3888

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions