Shopify and Osano Troubleshooting Guide

  • Updated

This guide will help ensure that Osano is correctly integrated into your Shopify store and addresses common configuration and runtime issues related to consent gathering.

 


 

Verify Installation Steps

Make sure you’ve followed the official Osano installation steps for Shopify:

Configuration Time Settings

In Shopify, you can control when the consent banner is shown via the time setting configuration.

  • Settings > Privacy
    This setting determines if Shopify should immediately gather consent from the user or wait until a certain point during the session. Check the following:
    • Merchant Settings: Ensure you’ve properly set whether consent gathering should happen immediately upon a user's visit or later during runtime.
    • Runtime/Visit Time: Based on your settings, confirm that Shopify is correctly triggering Osano’s consent modal when appropriate. If not, verify your privacy settings in Shopify.

 

Analyze Cookies for Consent

Two critical cookies must be checked to ensure proper consent gathering and processing:

  • _cmp_a Cookie:
    • Purpose: Tracks the current state of consent, including the display status and regional rules such as the sale of data.
  • _tracking_consent Cookie:
    • Purpose: Tracks what has been set by the user during their interaction with the consent modal.

Ensure these cookies are being generated and processed on the front end of your store.

 

Validate the setTrackingConsent in Osano.js

  • Check whether the setTrackingConsent method is present and functioning in the Osano.js code. This method is essential for passing the correct consent state based on user interactions.
  • If setTrackingConsent is missing or misconfigured, the consent settings may not be applied correctly, affecting how cookies are handled.

 

Correct Theme Integration

Sometimes the issue may arise from misconfigured theme files. Ensure the following: 

  • Theme Code Check:
    Look for the correct code snippet in your theme, which should be:
    liquid
     
    {% render 'osano-shopify' %}

If this snippet is missing or incorrectly placed, follow Step 3 of the Osano installation guide and add the snippet to the correct files, such as theme.liquid.


Common Issues and Fixes

Issue: Missing Cookies or Consent Not Processed

  • Solution: Check that the correct cookies (_cmp_a, _tracking_consent) are set when the user interacts with the consent banner. Ensure that these cookies are classified within Osano especially if you are operating in "Strict" mode so they are not blocked.

Issue: Consent Banner Does Not Appear Immediately

  • Solution: In your Shopify admin center, review Settings > Privacy to ensure the proper timing configuration is set for displaying the consent banner.

Issue: Analytics Not Firing After Consent

  • Solution: Confirm that setTrackingConsent is found and properly executed within the Osano.js code. Also, check that your cookies and tags are configured correctly.

Issue: Missing Snippet in Theme

  • Solution: Double-check the theme’s liquid files to ensure that the Osano snippet ({% render 'osano-shopify' %}) is correctly added per the installation instructions.

Further Assistance

If you have followed these steps and still encounter issues, feel free to contact Osano Support or Shopify Plus Support to further investigate configuration issues.

Related to