On May 23, 2023, the Piwik Pro team introduced a significant enhancement to their e-commerce tracking capability, resulting in substantial improvements to Piwik Pro’s possibilities in the realm of e-commerce tracking and reporting.
In this article centred on Piwik Pro analytics and e-commerce measurement, I will look at the reasons behind potential issues with your transaction tracking, the potential problems to arise in your Piwik Pro e-commerce tracking implementation, or instances where parts of your setup lack proper configuration. Additionally, I will provide recommended solutions to address and resolve these issues.
A little thing to keep in mind is that this article will not discuss the process of setting up e-commerce tracking in Piwik Pro Analytics. Instead, it will focus on addressing potential issues you might have with your e-commerce tracking implementation in Piwik Pro Analytics and the possible solutions to resolving these issues.
I will aim to keep this blog post concise, although without sacrificing its value in terms of knowledge.
Table Of Contents
- Piwik Pro Analytics Ecommerce Tracking: Identifying and Fixing Ecommerce Implementation and Report Issues
- Issue 1: Failure to Enable E-commerce Reporting Capability
- Issue 2: Sole Reliance on the Website’s Existing Google Analytics DataLayer
- Issue 3: Absence of an Actual E-commerce DataLayer on the Website
- Issue 4: Utilizing the Deprecated Version of Piwik Pro E-commerce Tracking
- Issue 5: Absence of the “SKU” Parameter or Incorrect Collection as a Non-String Data Type
- Issue 6: Utilization of an Unsupported DataLayer Structure
- Issue 7: Missing E-commerce Parameters in the Tracking Code
- Issue 8: The State of The Currency Parameter in Piwik Pro E-commerce Measurement
- Issue 9: Race Condition without Window Initialization
- Issue 10: Absence of Required Transaction E-commerce Parameters
- Issue 11: Improper Mapping of E-commerce DataLayer
- Issue 12: The Old-School Timezone Differences
- Issue 13: Inconsistencies in Product Data Values
- Issue 14: Error in Piwik Pro E-commerce Tracking JavaScript Codes
- Closing Insights on Troubleshooting Your Piwik Pro Ecommerce Tracking Implementation
Piwik Pro Analytics Ecommerce Tracking: Identifying and Fixing Ecommerce Implementation and Report Issues
The following are common errors that may arise while implementing e-commerce tracking in Piwik Pro. We will discuss each issue in detail:
- Failure to enable E-commerce reporting capability
- Sole reliance only on the website’s existing Google Analytics dataLayer
- Absence of an actual e-commerce dataLayer on the website
- Use of the deprecated version of Piwik Pro e-commerce tracking
- Missing the “SKU” parameter or its incorrect designation as a string data type
- Utilization of an unsupported dataLayer structure
- Missing e-commerce parameters in the tracking code
- The state of the currency parameter in Piwik Pro e-commerce measurement
- Race conditions with no window initialization
- Absence of required transaction e-commerce parameters
- Improperly mapped e-commerce dataLayer
- The old-school timezone differences
- Inconsistency in product data values
- Errors in the Piwik Pro e-commerce tracking JavaScript code
Now, let’s take a detailed look at each potential issue, explore methods for debugging and troubleshooting, and present available solutions to address these challenges.
Issue 1: Failure to Enable E-commerce Reporting Capability
When troubleshooting your Piwik Pro e-commerce tracking setup using the “Piwik Pro Analytics Debugger”, which is one of the tools covered in an extensive and comprehensive guide about debugging and troubleshooting in Piwik Pro, you then observe that all your e-commerce actions are recorded as expected, as illustrated in the image below.
However, the only problem is that you are unable to view the e-commerce report of the processed e-commerce data collected; the issue likely lies in the fact that you have not enabled the “e-commerce reports” feature in your Piwik Pro property.
Enabling the “e-commerce reporting” setting in your Piwik Pro analytics enables you to access an e-commerce report displaying the data you’ve gathered in your Piwik Pro Analytics, as depicted in the image below.
Resolving issues like this is straightforward and involves multiple easy-to-follow steps. To accomplish this, navigate to the menu option and select “Administration.”
Within the Administration view in Piwik Pro, choose your Piwik Pro site and proceed to the “Reports” tab. Enable the e-commerce report by toggling the button to “show e-commerce reports.”
Toggling the setting should look like the one in the image.
Upon completing these steps, you should be ready to access the e-commerce reports for your Piwik Pro Analytics.
Issue 2: Sole Reliance on the Website’s Existing Google Analytics DataLayer
I’ll also call this a missed step in the implementation process, and it’s uncommon. It’s crucial to note that simply activating Piwik Pro’s e-commerce reporting setting and having the presence of either the GA4 or UA version of the e-commerce dataLayer on your website does not guarantee the successful setup of Piwik Pro e-commerce tracking.
If you believe that these actions alone are sufficient, you may find yourself living in the dreamland, a place I’d wish existed without troubles.
Mere activation of e-commerce reports in the administration settings and the existence of the dataLayer don’t complete the Piwik Pro Analytics e-commerce measurement process as it involves some additional steps.
The additional step required is implementing the e-commerce tracking for your analytics project. You can achieve this through a plugin, the tag templates available in Piwik Pro Tag Manager, or the FREE downloadable Piwik Pro e-commerce tracking Google Tag Manager templates developed by DumbData.
Issue 3: Absence of an Actual E-commerce DataLayer on the Website
A prerequisite step for implementing e-commerce tracking in a Piwik Pro property is to verify the existence of an e-commerce dataLayer type. This dataLayer serves as the conduit through which Piwik Pro is informed about the e-commerce actions of website visitors and the detailed information pertaining to the product data in the action.
Here is an example of an e-commerce dataLayer structure that is supported by GA4.
Here is an example of an e-commerce dataLayer structure that is supported by UA.
Although you might want to manually retrieve data without resorting to the dataLayer by tasking your engineering team with dynamically populating values in the Piwik Pro e-commerce tracking JavaScript functions, the undeniable reality remains that the dataLayer approach is more commonly adopted. This is primarily due to its time efficiency during implementation and its stability.
Suppose, in your own case, you don’t see the Piwik Pro analytics e-commerce type of hits being collected to your analytics property. In that case, confirming the presence of an e-commerce dataLayer on your store website designated for your tracking instrumentation is compulsory.
Once you can’t find the presence of either the GA4 or UA version of the dataLayer on your website, you should work with your engineering and analytics team to set up this for your website.
Please be aware that certain setups may operate effectively without utilizing a dataLayer. If your website employs this methodology, please refer to issues 13 and 14, as they address potential challenges that could arise with this particular approach.
Issue 4: Utilizing the Deprecated Version of Piwik Pro E-commerce Tracking
This concern is particularly pertinent for any Piwik Pro e-commerce tracking conducted prior to May 23, 2023, when significant updates and modifications were introduced to the Piwik Pro analytics. If you have yet to migrate to the new version, your tracking setups are prone to encountering issues due to using the deprecated version in your e-commerce measurement configuration, and you’ll also be missing the other e-commerce actions that Piwik Pro now supports.
This update was also documented in the Piwik Pro changelog, just like a release note.
To ascertain whether you are utilizing the newer version, examine your Piwik Pro e-commerce action tracking code for the presence of the following representations in their codes:
- Product View as “ecommerceProductDetailView“
- Add To Cart as “ecommerceAddToCart“
- Remove From Cart as “ecommerceRemoveFromCart“
- Cart update—an optional yet important action—as “ecommerceCartUpdate“
- Transaction as “ecommerceOrder“
Additionally, refer to the Piwik Pro tracking e-commerce setup documentation and the associated changes for detailed guidance on the setup process.
Below is an image of what the version 2 tracking commands look like.
The image below is an example of the version 1 tracking command.
Suppose your implementation code differs from the examples provided above, and you can affirm the presence of e-commerce dataLayer codes along with the e-commerce report being enabled. In that case, it is crucial to migrate your setup to the latest version of Piwik Pro e-commerce tracking JavaScript API commands.
Issue 5: Absence of the “SKU” Parameter or Incorrect Collection as a Non-String Data Type
This issue is frequently encountered and typically arises when the dataLayer is not accurately mapped, resulting in the absence of the SKU or its failure to register as a string data type.
In the image below, “SKU” is a number data type which won’t get processed in Piwik Pro Analytics.
In the screenshot below, the “SKU” is missing, which will lead to the hit not being processed for reporting.
The absence of the SKU value, which may also serve as the product ID, triggers an error, causing Piwik Pro to interpret the data as a broken event, as depicted in the image below.
For you to rectify such implementation issues, it is essential to ensure that “SKU” is present in the product data and that it gets collected as a string.
Issue 6: Utilization of an Unsupported DataLayer Structure
Another possible issue in your Piwik Pro Analytics e-commerce tracking implementation arises when your e-commerce dataLayer structure differs from the specified format utilized by GA4 and the Universal Analytics version of the e-commerce dataLayer.
Most Piwik Pro e-commerce tracking setups, including the e-commerce tag templates in their tag manager or the GTM templates developed by DumbData, are designed to operate seamlessly with either the UA or GA4 version of the e-commerce dataLayer. Suppose your dataLayer structure doesn’t align with any of these structures. In that case, it will likely make your implementation faulty and necessitate an alternative approach to rectifying the issue if you want to use something other than the GA4 or UA versions of the dataLayer.
To address this concern, you have two viable options: either implement a supported dataLayer structure or allocate engineering resources to adapt the current dataLayer on your website to align with Piwik Pro e-commerce tracking instructions.
Issue 7: Missing E-commerce Parameters in the Tracking Code
Piwik Pro documentation specifies that “SKU,” “OrderId,” and “GrandTotal” are required parameters, and the failure to include these parameters in your hit, whether due to oversight or inaccuracies in mapping your existing dataLayer structure to your e-commerce tracking code, will result in your e-commerce data not being processed for e-commerce reporting.
It’s crucial to recognize that omitting information such as product name, category, price, quantity, etc., can significantly impede the utility of your collected data in your Piwik Pro e-commerce reports, as the data points will not be available when making an analysis.
Here is the effect it has on your reports.
To address this issue, utilize the “Piwik Pro tracker debugger” or the “Analytics Debugger” to investigate any missing parameters in your Piwik Pro e-commerce instrumentation. Subsequently, ensure that these parameters are present in the e-commerce hits.
If you are unfamiliar with debugging in Piwik Pro, check out this comprehensive guide on debugging and troubleshooting in Piwik Pro Analytics for detailed assistance.
Issue 8: The State of The Currency Parameter in Piwik Pro E-commerce Measurement
This issue probably stems from your end and will likely affect e-commerce websites utilizing a currency switcher or catering to international markets with localized currencies. In such scenarios, the reported revenue may deviate from what your store backend is reporting, and I’ll explain the reason shortly.
The issue arises because Piwik Pro will always utilize the currency selected in your site/property settings. Currently, it does not support currency conversion on the fly. Consequently, if a user purchases an item worth 50 Euros on your website, and you have set USD as the currency in your Piwik Pro settings, Piwik Pro will report it as 50 USD instead of converting the value from Euros to US Dollars. This discrepancy results in a lack of reconciliation between your store revenue and the figures reported in the e-commerce report within Piwik Pro Analytics.
You might ask, What can be done?
One option is to patiently await potential future support for currency conversion by Piwik Pro, something I believe will happen in the future, but I cannot say when.
The second option is to handle the conversion by yourself before feeding the data to Piwik Pro, and you can either do this at the dataLayer level, which is recommended or as the e-commerce data is mapped.
Another approach involves using segments based on the country dimension or the website market domain to analyze revenue by different markets. While this method offers insights, outliers may exist, and definitive conclusions about the user’s currency choice can be challenging, especially if your store features a currency switcher option.
It’s important to note that employing segments does not alter the currency Piwik Pro uses for reporting e-commerce revenue and related data.
A fourth option is to consider implementing a product scope custom dimension, where you manually include the currency for every e-commerce action containing price information. This enables a more accurate understanding of the currency used by the user during the e-commerce action, facilitating a manual check for accuracy in revenue by currency. While session custom dimensions are another consideration, there is no guarantee that the currency value remains consistent throughout the user’s checkout journey.
It’s essential to bear in mind that these solutions do not circumvent Piwik Pro’s utilization of the set currency in your site settings, but the second recommendation reconciliation in reported values between your store and Piwik Pro looks achievable.
Issue 9: Race Condition without Window Initialization
In situations where your Piwik Pro e-commerce tracking code gets triggered before the Piwik Pro config code loads on the website, your e-commerce action data will not be captured, thereby rendering your tracking ineffective.
This is attributed to failing to initialize the Piwik Pro tracking code before the eCommerce tracking function, specifically not establishing the _paq variable.
So what does this mean?
To illustrate, if a view_item dataLayer event occurs on your website before the Piwik Pro tracking code is loaded, and the view_item tracking fires as depicted below, your tracking will encounter errors:
How you can resolve this type of issue is to include the following code initialization above the Piwik Pro e-commerce tracking script, ensuring that your tracking remains intact by mitigating race conditions:
window._paq = window._paq || [];
Here is the code in action.
This code checks if the _paq variable exists; if it does, it does nothing; if it doesn’t, it creates a new empty array. This approach guarantees the availability of the _paq variable, even if it has yet to be initialized by the config code.
As depicted in the image below, this method ensures that the e-commerce add-to-cart event is not disregarded but recorded, even if it precedes the page view event.
Alternatively, you can still prevent the race condition issue by ensuring that the e-commerce action dataLayer event does not precede the execution of the Piwik Pro config tag. Still, remember that the workaround mentioned above should suffice in issues such as this.
Issue 10: Absence of Required Transaction E-commerce Parameters
This issue can also be a reason why transaction hit might not get processed in Piwik Pro, and this Is when your Piwik Pro order tracking code lacks essential parameters, explicitly referencing the SKU, OrderId, and GrandTotal parameters, Piwik Pro will be unable to process the e-commerce data, resulting in the registration of the hit as a broken event.
In the error event below, order ID was missing in the parameters of the transaction hit.
In your order action, even if you are transmitting the required transaction parameters while omitting other crucial product data or payment information in the transaction hit, the data gets recorded. However, the missing parameters will not be available in your order report within Piwik Pro’s e-commerce report.
The sole remedy for this issue is to ensure the presence of these parameters at the point of data collection for every e-commerce purchase action that happens on your website. This guarantees that Piwik Pro receives the complete set of required event and item data needed to process and accurately report the e-commerce transaction.
Issue 11: Improper Mapping of E-commerce DataLayer
This problem surfaces when the dataLayer of your e-commerce store is not precisely mapped to generate the item data required for implementing Piwik Pro e-commerce tracking. This is especially true when the Piwik Pro Tag Manager tag type or tracking methodology used for the implementation happens to be a different version of the data layer.
For instance, using a Piwik Pro e-commerce tracking tag designed for a GA4 e-commerce dataLayer version on a website utilizing the Universal Analytics e-commerce version can result in complications in your setup.
Or situations may arise where the names of the dataLayer keys in any version of the e-commerce dataLayer are distinctive and not acknowledged during the transformation process for tracking website visitor e-commerce actions in Piwik Pro.
For instance, in a GA4 e-commerce dataLayer, if the “quantity” key is defined as “item_quantity,” this divergence can significantly impact the mapping process, thereby causing data to either be missed or not collected if the affected parameter is required.
For you to address this concern, it is essential to guarantee that the appropriate template or tag type you’re using for the current version of your store’s e-commerce dataLayer corresponds. This ensures seamless compatibility and proper mapping, mitigating issues associated with mismatched tracking types and dataLayer versions.
Issue 12: The Old-School Timezone Differences
I would not label this as an issue; rather, it can be perceived as an oversight, even with the meticulousness of your Piwik Pro’s e-commerce tracking instrumentation project.
This concern arises when dealing with the data discrepancy between Piwik Pro Analytics and your store data. It is essential to verify that the Piwik Pro Analytics site configuration uses a timezone that aligns with your store’s, which is one possible reason for this discrepancy.
You might wonder about the potential impact on your e-commerce reporting in Piwik Pro Analytics.
The disparity in timezones, such as your store operating in a US time zone while Piwik Pro uses a European timezone, can lead to date conversion discrepancies. This is particularly evident when it’s a new day in Europe while still the previous day in the US, resulting in your analytics metric value variations when comparing your store’s native data with the information reported in Piwik Pro.
Resolving issues like this is straightforward, as all that is required is to ensure that both your store’s backend timezone and your Piwik Pro site settings align, meaning both are using the same or similar timezone. This synchronization mitigates discrepancies and ensures accurate, consistent reporting in Piwik Pro Analytics.
Issue 13: Inconsistencies in Product Data Values
This particular issue becomes noticeable, especially when utilizing the product shopping behaviour report in the Piwik Pro e-commerce report. Instances may arise where a product displays a number of orders but registers zero views, or a product garners numerous views and adds to the Cart but reports zero purchases.
This inconsistency often stems from abnormalities in the product data values, particularly at the product data level.
You can identify the occurrence of this issue by leveraging the Piwik Pro “shopping behaviour” tab in the e-commerce “products report” to identify products exhibiting this issue, which is one of the crucial methods of doing this.
Subsequently, use tools such as the “Piwik Pro tracker debugger” or the “Analytics Debugger Chrome extension” to scrutinize changes, especially at the SKU and product name levels across different e-commerce actions. Suppose any alterations is/are noticeable in the value of each parameter in the item data changes across the shopping funnel. In that case, it is imperative to ascertain whether these changes are attributed to dataLayer structure, version, or other engineering factors. Depending on the findings, implement the necessary solutions.
Another potential cause for such an issue could be using an outdated and deprecated Piwik Pro e-commerce tracking version. Transactions may still be recorded in such cases, but other e-commerce actions aren’t measured in your analytics property.
Lastly, suppose the case is that you do not track e-commerce actions for specific products and only report values at the transaction level for all products, which is rare. In that case, checking for potential malfunctions or the presence of your non-purchase e-commerce action instrumentation is advisable.
Solution To This Type Of Issue:
If the problem lies in a broken dataLayer, addressing the issue at the dataLayer level is essential. In cases where an outdated and deprecated version of Piwik Pro e-commerce tracking is still in use, migrating to the newer and updated version is recommended to ensure comprehensive and accurate measurement of the customer journey in your store.
Additionally, if you discovered that purchase is the only action tracked or some e-commerce actions are broken, I’d recommend fixing them or adding the ones missing.
Issue 14: Error in Piwik Pro E-commerce Tracking JavaScript Codes
This problem will likely emerge when manually configuring e-commerce tracking in Piwik Pro without utilizing the built-in tag templates available in the Piwik Pro Tag Manager.
If you are doing the setup either through hard coding or using Google Tag Manager, it is imperative to be vigilant for syntax errors in the code. Therefore, this leads to the need for rigorous debugging and validation processes to ensure accurate tracking configuration for each e-commerce action.
For those utilizing Google Tag Manager, preemptive measures can be taken by you and your team to avert such scenarios by using our FREE Google Tag Manager e-commerce tracking template designed explicitly for Piwik Pro Analytics users.
Closing Insights on Troubleshooting Your Piwik Pro Ecommerce Tracking Implementation:
Firstly, it’s important to note that this article will be continually updated to address any newly identified e-commerce tracking issues in Piwik Pro.
Next, in this article, we got the opportunity to explore potential challenges that may arise during the setup of e-commerce tracking in your Piwik Pro Analytics property. An essential aspect in mitigating these issues is proficiency in debugging and validating your configurations. For an in-depth understanding of these techniques, I recommend exploring the comprehensive guide on debugging in Piwik Pro.
Lastly, before I conclude, I encourage you to explore our easy-to-use and FREE Piwik Pro Analytics Documentation and Management Worksheet, made by DumbData. This resource is designed to improve communication within your team and streamline the management of your analytics efforts.
Here’s an uncommon tip worth considering: leverage the Piwik Pro Alerts feature to monitor the stability and promptly detect potential issues in your implementation as they arise. If you’re interested in learning how to use this feature effectively, feel free to explore the detailed article I wrote on Piwik Pro Alerts.
As we draw this discussion close, I invite you to share your thoughts on the intriguing issues presented and provide feedback on any aspects I may have overlooked in this blog post. Feel free to email me via the DumbData team email address or connect with me on LinkedIn. I look forward to hearing your insights. Until then, Happy Measuring!