StaticEnd (Browser)

From Engineering Client Portal

Revision as of 18:51, 7 June 2023 by NickParrucci (talk | contribs) (Created page with "{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|Browser SDK API Reference}} {{CurrentBreadcrumb}} Category:Digital Category:Browser SDK API Reference The API cal...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Engineering Portal / Digital / Browser SDK API Reference / StaticEnd (Browser)

The API call for staticend is not a requirement for all DCR Static integrations but is mandatory for Single Page Application (SPA). The staticend call ends the DCR static measurement of the section or content viewed and is ready to start DCR static measurement for the next section. In the case of Single Page Application, to trigger a new view for a section, you have to stop the measurement of the current section through staticend call before starting the measurement for the next section.

Syntax

ggPM('56', metadataObject); // Use event '56' OR 'staticend'
ggPM('staticend', metadataObject);

Input Parameters

Parameter Description
event staticend
metadataObject Current metadata object

Notes

In Single Page Application (SPA) it is very important that the program calls staticend before loadMetadata This allows the Browser SDK to accurately credit the previous section/content being viewed before measuring the new one.

Do not place this call inside beforeunload browser event, because the Browser SDK needs some time and resources to deliver data to the cloud.