Search code examples
javascriptgoogle-analyticsenhanced-ecommerce

Data not appearing in Shopping Analysis


I am using Enhanced Ecommerce to monitor events of a step-by-step checkout process.

Note: Triple confirmed that EC is enabled on the Analytics Property, and Checkout Funnel Labels have been set (albeit the latter being not required anyway)

When a user clicks the "Next step" button on step 1, the following code gets fired:

ga('ec:setAction', 'checkout', {step: 1});
ga(
    'send',
    'event',
    'Checkout',
    'Customer Proceeding to Select Accomodation'
)

This event appears in Real-Time > Events:

How it appears in GA

..but won't appear in Conversions > Ecommerce > Shopping Analysis > Checkout Behavior

I can't find where I'm going wrong to save my life here so any pointers would be greatly appreciated


Solution

  • The first issue I see is ga('ec:setAction', 'checkout', {'step': 1}); ( Put step in quotes )

    Still the issue can persist and this is a general checklist for implementing the Shopping Behaviour analytics.

    • In your Google Analytics tracking code, the enhanced ecommerce plugin should be included. ga(‘require’, ‘ec’);

    • To ensure the data flows into the Shopping Behaviour report, you need to send all of the ec:setAction steps. It's important to send these events and in the right order, I have also suggested when you should do that in comments but that's upto you.

    ga(‘ec:setAction’, ‘detail’);
     //Set this parameter when a visitor views a Product Detail page.
    
    ga(‘ec:setAction’, ‘add’);
    //Set this parameter when a visitor adds a product to their cart.   
    
    ga(‘ec:setAction’, ‘checkout’);
    //Set this parameter when a visitor views the checkout process pages. 
    
    ga(‘ec:setAction’, ‘purchase’);
    //Set this parameter when a visitor views an Order Confirmation page.

    • While implementing the shopping analysis steps as mentioned above, do check all the required parameters are set.

    • The steps (corresponding to step number for checkout) should defined in the Admin section of Google Analytics (which I guess you already did)