All of the JavaScript tag code served by Ensighten is wrapped in a try/catch statement to prevent errors from being shown to your website visitors. Whenever an error happens, Ensighten Manage reports on the error by sending an image request to our servers that looks similar to:
http://nexus.ensighten.com/error/e.gif?msg=myData%20is%20not%20defined&lnn=-1&fn=&cid=1&client=ensighten&publishPath=prod&rid=2090261&did=394801&errorName=ReferenceError.
If an error is happening on your website, you can view the web page causing the error and then use a network proxy tool or your browser's developer tools to view the network requests. You can then filter by "e.gif" to see if any errors are happening on the web page you are currently on.
Additionally, there is a Reporting section within your Manage account where you can view JavaScript errors that Ensighten have reported on. You can access the Reporting section by clicking the menu icon and click the "Reporting" icon.
* Note that if you do not see the Reporting icon, ensure that you have the "Reporting" role for your account.
** Also note that the errors found in the Reporting section only update once every 24 hours (usually around midnight PST time)
If you have any errors happening on your website, you can then contact the tag vendor to try and have them fix the errors or possibly fix the errors yourself.
If you are using a network proxy tool or your browser's developer tools to fix and review errors, below is a chart that deciphers the key/value pairs and explains what the error is and what is causing the error:
Parameter | Description |
---|---|
msg |
This is the JavaScript error message.
Example: "invalid array length" |
lnn |
The line number in your code where the error might have occurred. This is the best place to start looking for errors. |
fn |
The name of the function or call that might be causing the error. |
cid |
Your Ensighten account Id. |
client |
Your Ensighten account name. |
publishPath |
The Space where the tag was running when the error occurred.
Sometimes multiple Spaces have the same publish path. Make sure the Space name and ID are what you expect. |
rid |
The Tag Rule Id. This is for advanced functionality and only needed if you contact Ensighten Customer Success. |
did |
The Tag Id which you can filter by in your Manage account |
errorName |
The error name usually helps you to identify what caused the error. |
Common Errors
Error resolving data definitions synchronously: {{Data Definition ID}}
What it means:
This means that there is a Condition or a Synchronous tag that is using a Data Definition; however, the Data Definition is not available Synchronously - probably due to the fact it has a Condition or is set to Asynchronous.
How to resolve:
Change the Condition of the Data Definition to "Synchronous".
Invalid data definition used: {{Data Definition ID}}
Error resolving data definition: {{Data Definition ID}}
. Does not exist on page.
What it means:
This error happens when you have a Tag or Condition that is using a Data Definition not available on the page either due to a Condition on the Data Definition or that the Data Definition is not available within the Ensighten Space on the page.
How to resolve:
Ensure that Data Definition is available on page that the error is happening. Note that you should check both the Conditions for the Data Definition AND the Ensighten Space as you could be trying to use the Data Definition outside of its allowed Space(s).
Error caught in Data Definition extractor: {{Data Def Name}}
, ID:{{Data Def ID}}
What it means:
The Data Definition extractor is the code to tell Ensighten where to grab the data from. Usually this is from a data layer; however, it could be from another JavaScript object, cookie, or from an HTML element on the web page. This error is telling us that the code is running into an error when trying to get the data for the Data Definition.
How to resolve:
Review the Data Definition extract code to ensure it is valid. If the code is valid, we would recommend wrapping the code in a try/catch function so that even if an error does present itself, the Data Definition can still return a value.
Example:
Extract function causing error:
function() {
return dataLayer.pagename;
}
New Extract function that will not cause errors:
function() {
try {
return dataLayer.pagename;
}
catch (err) {
return '';
}
}
Comments
0 comments
Article is closed for comments.