The following are troubleshooting steps specific to H code implementations.
While H Code implementations require code be referenced in the
<body> tag, other implementations (such as using tags in Adobe Experience Platform) require code be referenced in the
Analytics code creates an invisible 1x1 pixel image. Previously, a common implementation practice was to place the
s_code.js reference in the
<head> tag. Placing the code here prevented the image from affecting page layout in any way. It also executes sooner, which lets you count page views for partial page loads more effectively.
However, certain elements of the code require the existence of the
<head> tag, it executes before the
<body> object exists. As a result, your implementation does not collect ClickMap data, automatic tracking of file downloads or exit links, or connection type data. Putting the script reference to
s_code.js in the
<head> tag works, but the result is a very limited version of Analytics.
The Analytics code can be placed anywhere inside the
<body> tag of a well-formed HTML page. Adobe recommends placing Analytics code as close to the top of the
<body> tag as possible. Make sure that any page variables are set after the
s_code.js file loads.