Analytics Modul
Introduction
The Analytics Module allows you to analyse the behaviour of your shop visitors and gain valuable insights into the use of your online shop. The module supports various analysis and tracking tools such as Google Analytics 4, Facebook Pixel, TikTok Pixel and Hotjar.
In this guide, you will learn how to connect and configure these services with your online shop.
Module advantages
- Analysis of visitor behaviour in the online shop
- Measurement of marketing campaigns and conversion rates
- Analysis of the ordering process and possible cancellations
- Integration of multiple tracking tools in one module
Video
Configuration of the Analytics Module
Requirements for getting started
- Access to the 21.Shop administration
- E-Commerce Plus add-on activated
- Accounts with the desired analytics platforms (e.g. Google Analytics, Facebook Business Manager, TikTok Ads Manager or Hotjar)
- Access to tracking IDs or API keys for the respective services
Open the analytics module
- Open the shop administration.
- Go to Modules → Analytics.
- Open the module configuration.
- Activate the module with the corresponding checkbox.
- Enter the required tracking data for the desired services.
Google Analytics 4
Setting up Google Analytics
To use Google Analytics, you need a Google Analytics account.
If you do not yet have an account, you can register here:
https://www.google.ch/intl/de/analytics/
Entering the tracking ID
- Open Administration in Google Analytics.
- Navigate to Data Streams.
- Open the corresponding stream.
- Copy the tracking ID.
- Paste it into your shop’s module configuration.
We also recommend activating the following options:
- E-commerce tracking
- Enhanced e-commerce reports
The data will then be automatically transmitted to Google Analytics. You can find the detailed sales data later under:
Monetisation → E-commerce purchases
Note:
IP addresses are anonymised by default in Google Analytics 4.
Set up conversion events
Google Analytics works with events that are triggered when visitors interact with your shop.
You can mark important events as conversions.
- Open Configure → Events in Google Analytics.
- Activate the slider for the desired event.
- The event will then appear under Configure → Conversions.
Note:
New conversion data may take up to 24 hours to become visible.
If you want to create a new event:
- Click on Create event
- Define the desired event (e.g. newsletter registration)

Analyse the order process (funnel analysis)
With funnel analysis, you can analyse at which points customers leave the order process.
Step 1: Create a custom definition
- Open Configure → Custom Definitions.
- Create a new definition for the order process URLs.

Step 2: Create funnel analysis
- Open Explore → Exploratory Analysis.
- Select Funnel Analysis.
Add the following steps:
| Step | URL |
|---|---|
| Shopping cart | /shop/checkout/cart |
| Login | /shop/checkout/loginRegister |
| Checkout | /shop/checkout/view |
| Order overview | /shop/checkout/termsAndConditions |
| Purchase | /shop/checkout/viewOrderSuccess |
For the condition, select the dimension you created earlier and set the filter to the corresponding URL.

Additionally, activate the option Use open funnel.

Exclude payment providers as referral sources
If customers are redirected to a payment provider during the payment process, Google Analytics may start a new session.
To avoid this:
- Open Administration → Data Streams
- Select the appropriate stream
- Go to Additional Tagging Settings
- Open List of unwanted referrals
- Add the domain of your payment provider.

Facebook Pixel
With Facebook Pixel, you can measure the effectiveness of your Facebook advertising.
Advantages
- Define target groups for advertising
- Analyse the behaviour of shop visitors
- Measure the success of advertising campaigns
Set up Conversion API
- Open your Facebook Business Manager
- Go to Data Sources
- Create a new Pixel
- Open the Event Manager
- Navigate to Settings → Conversion API

Select events
Select the following events:
- View content
- Add to cart
- Wish list
- Start purchase process
- Purchase
Additionally, activate the Event ID parameter.
Pixel ID and access key
You will need the following data for the shop configuration:
- Pixel ID
- Access key (Conversion API)
Facebook Pixel configuration in the shop
- Open the shop administration.
- Activate the Facebook Pixel configuration in the Analytics module.
- Enter the following data:
- Pixel ID
- Access key
- Save the settings.

The pixel sends the following events:
- ViewContent
- Article
- Category
- AddToCart
- InitiateCheckout
- Purchase
- AddToWishlist
TikTok Pixel
With the TikTok Pixel, you can analyse the behaviour of visitors who come to your shop via TikTok advertising.

Events sent:
- AddToWishlist
- PlaceAnOrder
- InitiateCheckout
- AddToCart
- ViewContent (article)
- ViewContent (category)
- Search
- Contact
Additional data transferred:
- User agent
- IP address
- TikTok Click ID (ttclid)
- Customer ID (if logged in)
- Email address
- Phone number
Setting up TikTok Pixel
- Open TikTok Ads Manager.
- Go to Assets → Events.

- Click Manage → Set up web events.


- Enter a pixel name.
- Select Events API as the connection method.

- Select Set up Events API manually.

Create access token
- Open the settings.
- Generate an access token.

- Copy the token and paste it into the shop administration.

Hotjar
Hotjar allows you to visually analyse the user behaviour of your visitors.
Features:
- Heatmaps
- Visitor recordings
- Surveys
- Feedback tools
Hotjar module configuration
- Open the shop administration.
- Activate the Hotjar configuration in the Analytics module.
- Insert your Hotjar ID.
- Save the settings.

Finding your Hotjar ID
- Open your Hotjar account.
- Go to Profile → Organisation settings.

- There you will find your Account ID.

- Enter this ID in the shop module.
The first analysis results usually appear after a few days.
Further help
If you have any questions or problems, our support team will be happy to help. To do so, open a support ticket:
- Go to the Swiss21 portal.
- Click on your profile picture in the top right-hand corner.
- Click on Support.
- Select Contact Support.
- Fill out the form.
Our support team will get back to you as soon as possible.
Support opening hours:
Monday – Friday I 08:00 – 12:00 I 13:30 – 17:00
