# Page Load

On every NUXT route change event, fire the following scriptlet to record a page load event in Ingest Labs

```
window._mp.waitUntil(function() { return _mp && _mp.eedlInstance; }, 15000, 100, function () {
  _mp.eedlInstance().ready();
  window._mp.safeExecute('evPageLoad', function() {
    var isProd = /www\.example\.com/.test(window.location.href);
    var payload = {
      'page.pageInfo.pageName': document.title,
      'env.pageUrl': window.location.href,
      'env.referrer': document.referrer,
      'env.pathName': window.location.pathname,
      'env.rs': isProd ? 'prd' : 'stg',
      'env.app_version': '<git_hash or app_version automated>',
    };

    eedl('page_load', payload);
  })();
});
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ingestlabs.com/implementation/web-sdk/tracking-events/page-load.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
