Analytics
How to analyze your store performance.
Shopify Headless offers built-in analytics for essential e-commerce events like "page-views" and "add-to-cart." While these metrics provide a baseline understanding of user behavior, it's crucial to acknowledge the inherent limitations of web analytics in today's privacy-conscious environment.
Note
You must have analytics consent by your visitors before activate it on your website. For this reason you need to use it in combination with a cookie consent system.
Built-in Analytics: Core Functionality
- Page Views: Tracks the number of times specific pages are loaded.
- Add-to-Cart Events: Records instances where users add products to their shopping cart.
These metrics can offer insights into:
- Popular product pages.
- Conversion funnel initiation.
- Basic user engagement.
Limitations and Challenges
However, relying solely on these built-in analytics presents significant challenges:
- Browser Privacy Settings:
- Modern browsers, such as Firefox (with Enhanced Tracking Protection) and Chromium-based browsers in "Do Not Track" mode, actively block tracking scripts.
- This results in incomplete and potentially inaccurate data, underrepresenting actual user activity.
- Ad Blockers:
- Ad blockers often interfere with analytics scripts, further skewing data.
- Cookie Restrictions:
- Increased privacy regulations (e.g., GDPR, CCPA) and browser policies (e.g., Intelligent Tracking Prevention) limit the use of third-party cookies, impacting user tracking and attribution.
- Bot Traffic:
- Analytics can be skewed by automated bot traffic. Distinguishing legitimate user interactions from bot activity is crucial for accurate data.
- Limited Scope:
- The built-in analytics may lack detailed insights into user behavior, such as:
- User journey across different devices.
- Detailed conversion funnel analysis.
- Attribution modeling.
- Custom events related to specific business needs.
- The built-in analytics may lack detailed insights into user behavior, such as:
Shopify Cookie Consent
We advice to use the native Shopify Cookie Consent system that automatically allows consent both in Webflow and Shopify, allowing you to track pixels both in Webflow and Shopify checkout.
Third party cookie consent systems
To activate the Shopify page views and product add to cart analytics with your own cookie consent system you just need to call the JS function:
Smootify.enableAnalytics(true);
after receiving the user consent. Follow up the documentation of the cookie consent system of your choice in order to run the previous code properly only when user accepted analytics.
A part from running up that code to enable the page-views and add-to-cart events, you have also to give Shopify consent to track using Shopify Customer Privacy APIs.