Skip to content

Debug Mode Codes

Reference guide for debugger error codes, warnings, and info messages.

Overview

Follow this guide to understand the messages returned by the Elevar Debugger when validating your Data Layer implementation.

When validating your own Data Layer following this guide, our debugger tool tries to alert you of as many issues as possible so that you can proactively address them. While the tool doesn't cover all scenarios, when purchasing our Headless Audit, an Elevar Analyst will manually review your Headless Data Layer and help you address scenarios that our Debugger tool did not alert you of.

The debugger returns three categories of messages:

  • Error: These will be red in color. They alert you of definite issues. (e.g. duplicate events occurred).
  • Warning: These will be yellow in color. They will warn of potential issues (e.g. Consent Mode is enabled, but we haven't received consent values).
  • Info Codes: These will be gray in color. They share information about the event (e.g. this event passed validation).

The sections below explain each message type and how to address it.

Error Codes

Error Codes

BAD_EVENT_DATA

Description: Indicates that one or more required event properties are missing or incorrectly formatted.

Common Causes:

  • Empty string provided for a required value
  • The image property in the products array does not start with a protocol.
  • The product_id or variant_id values are not stringified numbers only.

Resolution: Ensure all required properties are populated and formatted correctly. Refer to the browser error message for specific validation failures.

BAD_EVENT_ORDER

Description: Indicates that a required dl_user_data event did not fire immediately before certain events.

Affected Events:

  • dl_view_cart
  • dl_purchase
  • dl_view_search_results
  • dl_begin_checkout

Resolution: Ensure a dl_user_data fires first upon a page change.

Note: Can not validate against dl_view_item, dl_add_to_cart, dl_remove_from_cart, dl_view_item_list, dl_select_item, dl_add_shipping_info, and dl_add_payment_info as there are scenarios where these can fire without being immediately proceeded by a dl_user_data.

DUPLICATE_EVENT

Description: Indicates that two identical non-user-data events fired with no context push between them. An identical event refers to all non-generated properties being the same between two events. Issues with the dl_user_data event will be captured by the MISSED_CONTEXT_INVALIDATION error.

Details: Identical events share all non-generated properties. Generated properties include:

  • event_id
  • event_time
  • event_state

Resolution: Remove duplicate Data Layer events so only one instance fires per interaction.

CART_RECONCILIATION_ENABLED

Description: Indicates that the Custom Pages script loads on the webpage. This means we've checked the Elevar config script and see that the Cart Reconciliation Event is enabled.

The Cart Reconciliation Event uses logic based upon page changes when a re-load occurs, but with a Headless website, page changes do not require a page to load. This can cause incorrect dl_add_to_cart events to fire. The best practice is to keep this event disabled if the website is Headless.

Resolution: Disable the Cart Reconciliation Event

  • Navigate to your "My Tracking" in your Elevar Account and access the Shopify Source.
  • Once in the Shopify Source, access the GTM & Events step.
  • Disable the "Cart Reconciliation" setting.

Cart Reconciliation

MISSED_CONTEXT_INVALIDATION

Description: Indicates that multiple dl_user_data events fire without a context push in between them.

Resolution: Fire this utility when route changes occur.

MISSING_GOOGLE_TAG_MANAGER

Description: Indicates that Google Tag Manager was not detected on the site.

Details: The debugger checks for window.google_tag_manager after a 15-second delay.

Resolution: Ensure GTM is properly installed on the website by following this guide.

TRANSFORM_FN_ERROR_THROWN

Description: Indicates that a Transform Function is throwing an error during execution.

Resolution: Review the Transform Function implementation and correct any errors.

TRANSFORM_FN_BAD_RETURN

Description: Indicates that the Transform Function returned data in an invalid format.

Example:

  • Returning a number instead of an object

Resolution: Ensure the function returns data in the expected format by following the formatting noted here.

USERID_FN_ERROR_THROWN

Description: Indicates that the User ID Function is throwing an error.

Resolution: Verify the function logic and ensure it executes without errors using the User ID function.

USERID_FN_BAD_RETURN

Description: Indicates that the User ID Function returned an invalid value.

Example:

  • Returning a number instead of a string

Resolution: Ensure the User ID is returned as a string.

UNEXPECTED

Description: Indicates an unclassified error that does not match predefined categories.

Resolution:Reach out to our Support Team with the exact error message.

Warning Codes

Description: No consent values were received from the Consent Management Platform within 15 seconds.

Resolution: Ensure your CMP is correctly passing consent values to Google Consent Mode by following this guide.

LOCAL_STORAGE_ACCESS_DENIED

Description: The script could not access local storage.

Details: Local storage is used for attribution and cart data.

Resolution: Ensure local storage is enabled in the browser.

Info Codes

VALIDATION_PASS

Description: The event passed validation with no detected issues.

WEB_PIXEL_LOG

Description: The shopify-pixel-mode local storage value is set to verbose. This setting allows debug logs for Elevar's App Pixel, which is used for attribution handling.

CONTEXT_PUSHED

Description: The debugger tool noted that a context push was triggered.