InteractiveAdvertisingBureau / GDPR-Transparency-and-Consent-Framework

Technical specifications for IAB Europe Transparency and Consent Framework that will help the digital advertising industry interpret and comply with EU rules on data protection and privacy - notably the General Data Protection Regulation (GDPR) that comes into effect on May 25, 2018.
860 stars 360 forks source link

Add performance timing marks for key milestones to the framework #256

Open andydavies opened 3 years ago

andydavies commented 3 years ago

How quickly (or slowly) the CMP reaches the loaded state has a significant impact on how soon a publisher can start displaying ads.

Timing this process currently involves adding custom code to pages to determine when the first script in the CMP starts execution (in reality we rely on timing when it loads), and further code to listen to the tcloaded event.

CMPs should be instrumented as standard using the User Timing API perfomance.marks so that timing data on when the CMP reaches key milestones is available.

Marks for when the CMP starts execution i.e. (almost) first line of first script, and when it loads i.e. when tcloaded even is dispatched seem the obvious two marks but cmpushown and useractioncomplete would also be interesting.

Using the standard web APIs allow tools and services that understand the marks to collect them.

It also provides CMP vendors with a consistent way of understanding their own performance e.g. is the CMP being loaded late in the page (perhaps via a Tag Manager), have any changes to the code made the CMP faster or slower etc.