Shopware tip: Track all of your store's shopping cart activities with ga Analytics

29.11.2017
by Meike Müller
Shopware
Banner
If you run an online store, it is particularly important to analyze and track the behavior of your customers. This is the only way to introduce targeted measures that will drive the growth of your e-commerce in the long term. That's why we have the following tip for you:

Below is a guide on how you can successfully track clicks on the shopping cart button and all other shopping cart activities. You don't have to customize all pages in the template individually. We use jQuery and store a small script in our individual JavaScript.

THIS THEN LOOKS LIKE THIS:

$(function () { 
    // ga analytics stuff to track cart actions
    var pagePath = window.location.pathname;
    var mainTitle = $('h1').text();
    $('.buybox--button').click(function() {
        ga('send', 'event', 'shopping cart click', mainTitle, pagePath);
    });
});

We only record the detail page here. If you have added further shopping cart buttons on the page, e.g. in the listing or the sliders, you must add the code accordingly.

THIS COULD LOOK SOMETHING LIKE THIS:

$(function () { 
    // ga analytics stuff to track cart actions
    var pagePath = window.location.pathname;
    var mainTitle = $('h1').text();
    $('.buybox--button, .buybox--form .product--actions, .buybox--form .layer--btn').click(function() {
        ga('send', 'event', 'shopping cart click', mainTitle, pagePath);
    });
});


The most important key figures for your online shop

The most important key figures include visitor numbers, conversion rate, returns rate and abandonment or exit rates of your customers. Customer behavior in your store and your turnover are the basis of all key figures for every online store. Shopware customers can find the data required for this in the Shopware backend under Marketing and Analysis. A separate tool for this is Google Analytics.

The conversion rate is a KPI (Key Performance Indicator) from online marketing. It shows the ratio of visitors to a website to conversions and is given as a percentage. What exactly the conversion is can be defined in advance. Whether this is a transaction, a newsletter registration or a successful download - you decide. The conversion rate is used to calculate the efficiency of your advertising banners, websites or online stores in order to get the maximum return from advertising campaigns. To calculate this, we need the following formula

Number of buyers * 100 / visitors

To increase your conversion rate, it helps to make your website as attractive as possible. Enhance your content with photos, graphics or videos, create a user-friendly interface and operation as the basis for a satisfied customer. If you run an online store, offer your customers an easy way to register to keep them coming back. Forms that are too complicated often cause frustration and make customers who are just about ready to buy jump ship. There are many ways to increase your conversion rate.

Are you facing other challenges in relation to your online shop? We offer you a comprehensive package of Shopware support and monitoring. We at EXWE are happy to answer your questions and support you in setting up your store.

Was ist dein Projekt? Wenn du uns darüber erzählen möchtest, rufen wir dich zurück!

 
Meike
Meike
from 29.11.2017

Hello, my name is Meike. I take care of the EXWE back office and am responsible for our social media channels. All of our articles are meant to make your life easier and help you make decisions. Nevertheless, it can happen that something remains unclear, so: If you have questions about this article you can easily reach me at +49 231 93149827.

Du möchtest immer am Zenit der Technik bleiben? Keine News und Blogbeiträge mehr verpassen.
We also have the following interesting posts from our tech blog for you on this topic
Shopware vs Shopify: Which system for my online store?

We do the big Shopware 6 and Shopify comparison so you can find out which is better for your company's online store.

JTL Connector: How to prevent overwriting during sync!

Our solution to the problem - what you can do if the JTL Connector causes problems with Shopware.

Shopware: An SQL query for PayPal relevant states

Use our Shopware tip on the topic: Shopware - All mandatory states for PayPal in one SQL. Use the SQL query in the article.