Instrumenting pages automatically


Instrumenting your pages automatically can be convenient for multiple reasons:

  • It eliminates the need to manually modify application pages.
  • It increases the level of control for instrumentation in areas defining target pages and manipulating the state.

You can inject the script element that references the Web-beacon-JavaScript-library into the top of the <head> element of your HTML pages through Akamai.

This method uses the Edge Akamaization service and requires coordination with Akamai. Depending on your service plan, Akamai might charge a set-up fee and a monthly fee.

If you use Akamai to instrument pages, understand the following known issues with buffer size limitations and illegal HTML characters:

Known issues and workarounds for instrumenting pages automatically

Issue

Description

Workaround

Buffer size limitations

The system reads the page into a buffer and parses HTML to determine the location for insertion. If total page size exceeds 1 MB, it might break this process. Also, there is no proper error handling for this event by default.

  • Change the buffer size from the default 1 MB to a custom setting, for example, 4 MB.
  • Enable graceful error handling so that if the page size is greater than 4 MB, skip insertion for that page and do not generate an error.

Illegal HTML characters

Any illegal HTML characters break the parsing while Akamai attempts to inject the web beacon JavaScript into pages.

Resolve illegal HTML characters in the source code.

Related topics

Editing-Akamai-instrumentation-settings
Instrumenting-pages-manually

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*