GDPR-Transparency-and-Consent-Framework
GDPR-Transparency-and-Consent-Framework copied to clipboard
Add performance timing marks for key milestones to the framework
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.