further-external / VPAL

An Apollo generated Event Driven Data Layer
0 stars 2 forks source link

Page Load Completed #13

Open Nayuken opened 2 months ago

Nayuken commented 2 months ago

Page Load Completed

Page Load Completed is part of the page load sequence, including virtual page loads in the case of single page apps, and must be the last event pushed in the page load event sequence.

Javascript Code

window.dataLayer = window.dataLayer || [];
dataLayer.push({
  "event": "page_view",
  "detailed_event": "Page Load Completed"
});

Attached Notes

Platform: ALL

Trigger this event when data from the data layer has completely propagated and the payload is ready to deploy. This helps prevent race conditions that could occur when using data from multiple events that load on a single page load (see the Article Loaded event).

Example page:

https://www.harvardonline.harvard.edu

elizabethbrady-ep commented 1 month ago

@stephen-g-goss @rafaeltorresharvard I do not see the parameter detailed_event along with the page load completed event in the datalayer on https://crp--lxpsit.sandbox.my.site.com/learnercommunity/s/lxp-application-enrollment?course=5b72d134-8b20-4562-a56f-f8a2759e7e80 see screen shot below Image

Nayuken commented 4 weeks ago

Once the CSP violation is resolved, revalidation is needed to confirm data accuracy and ensure the correct tag firing structure for data sent to GA4.

testing on: https://lxp-admin--lxpdev.sandbox.my.site.com/learnercommunity/s/lxp-application-enrollment?course=2e110f48-c60c-49f4-884e-ea23ac8766e0&gtm_debug=1730388257058

Feedback:

@stephen-g-goss @rafaeltorresharvard So far this event is structured correctly I'll make a follow up note if there is anything else once the CSP violation is lifted

Further's Event Validation:

Event Parameter Result
ep.course_name Adaptive Leadership
ep.program_dates February 24, 2025 - July 2, 2025
ep.page_location/ Page Location https://lxp-admin--lxpdev.sandbox.my.site.com/learnercommunity/s/lxp-application-enrollment?course=2e110f48-c60c-49f4-884e-ea23ac8766e0&gtm_debug=1730388257058
ep.page_title/ Page Title Enroll Now | Harvard Online
ep.site_section CRP
ep.site_section2 CRP
ep.type CRP
uid n/a

QA Datalayer Values:

{
    "event": "page_view",
    "detailed_event": "Page Load Completed",
    "gtm.uniqueEventId": 139
}