1. Help Center
  2. Troubleshooting

How to correct the "Error: convert_attributes is empty or invalid after parsing" console or a JSON error when starting a checkout?

Here's a single sentence summary of the article: To fix the "Error: convert_attributes is empty or invalid after parsing" console error and enable proper purchase tracking in the Convert Manual Shopify Integration...

When using the Convert Manual Shopify Integration, you may encounter an error in the console that says "Error: convertattributes is empty or invalid after parsing" or a JSON-related error during the checkout process. This issue typically occurs when the experiment data is not properly written to the localStorage.convertattributes parameter. Additionally, purchase tracking will not work correctly when this error occurs.

Why does this happen?

This error often appears because the browser doesn't allow data to be written to localStorage when the user moves between different domains or subdomains. For example, if a customer starts on www.shop.com and then moves to checkout.shop.com for the checkout process, the browser treats these as separate domains and restricts data sharing.

How to fix it:

To resolve this issue, you need to adjust the domain settings in your Convert account to allow data sharing across all subdomains of your shop. Here's how to do it:

  1. Log in to your Convert account.
  2. Navigate to the Convert App.
  3. Select your project.
  4. Go to Configuration > Active Websites.
  5. Add a wildcard entry for your domain. For example, if your shop is on shop.com, add "*.shop.com" as an entry.
  6. Remove all other entries related to your domain (like www.shop.com, checkout.shop.com, etc.).
  7. Save your changes.

By adding the wildcard entry (*.shop.com), you're telling Convert to treat all subdomains of shop.com as part of the same site. This allows the experiment data to be shared across these subdomains, resolving the localStorage issue and enabling proper purchase tracking.

After making this change, test the checkout process again using a fresh incognito browser session. An incognito (or private) browsing session ensures you're starting with a clean slate, without any existing cookies or cached data that might interfere with the test. The error should no longer appear, and the Convert Manual Shopify Integration should work correctly across all pages of your shop, including proper purchase tracking.

If you continue to experience issues after making this change and testing in an incognito session, please contact Convert support for further assistance.