Do you need some help?
Free fitting service: Book an appointment with our expert now
Install extension
Install and activate the extension in your Shopware administration under Extensions.
How the extension works
The extension supports two different methods for tracking integration in your Shopware shop:
- Google Tag Manager (GTM)
The recommended and most flexible method. With Google Tag Manager, you can manage all tracking events centrally, add your own tags and expand tracking at any time, without having to make any changes to the shop’s code. The extension provides you with a pre-configured GTM template for this purpose. - Google tag (gtag.js)
This method integrates Google Analytics 4 – and, optionally, Google Ads – directly via the gtag.js script, without using Tag Manager. It is suitable if you prefer a simple setup.
Disable other Google integrations
This extension integrates Google Analytics, Google Ads and Google Tag Manager itself. If a second integration is running alongside it, each event will be sent twice. You should therefore disable all other Google integrations when using this extension.
Typical places for a second connection:
- Shopware’s own Google Analytics integration: Settings in the sales channel, „Analytics“ tab, „Google Analytics“ section. There, switch off the „Enable Google Analytics“ toggle. This applies to every sales channel.
- A Tag Manager or gtag code that is embedded directly in the theme or via another extension.
- Another tracking extension for Google in the shop.
Typical signs of duplicate tagging: revenue and conversions appear twice, events are recorded twice, or the page URL appears as the event name in Google Analytics. You can use Tag Assistant to check whether two Google tags are loading on the page.
Troubleshooting: No data or incorrect data is being received
Before you go into any more detail, go through these points one by one. This will sort out most issues.
- Has consent been given? The extension only loads Google once the visitor has given their consent via the cookie banner. You should therefore test this in an incognito browser window and click „Accept all“ in the banner. Without consent, no tracking will be visible; this is by design.
- Has Tag Assistant been checked? Open your shop with the Google Tag Assistant or via „Preview“ in Tag Manager. There, you can see which tags are loading and which events are being triggered.
- Has the template been imported and the container published? With Tag Manager, the ID in the extension alone is not enough. You must import the template from our generator, enter your IDs and publish the container. See „Check and publish containers“.
- Is the second tracking feature active? A second Google integration results in duplicate or incorrect data. See „Disable other Google integrations“.
- Have you chosen the right consent manager? In the extension’s configuration, you must select the Consent Manager that your shop actually uses. If the selection is incorrect, tracking will start too late or not at all. See „Configure consent management“.
- Is there a theme or another expansion in the game? If only individual events such as `add_to_cart` are missing, this is often down to the theme. See „Conflicts with the theme or other extensions“.
If Google Ads displays a warning even though everything is firing correctly in Tag Assistant, you can find an explanation under „Notifications in Google Ads“. If the figures from Shopware and Google differ, the FAQ „Why do Shopware, Google Ads and Google Analytics show different figures?“ below may be of help.”.
Conflicts with the theme or other extensions
For product events, the extension writes hidden fields to the shopping area of the product page and into the product boxes. If a theme or another extension overrides this area (for example, a variant matrix or a quick order form), these fields will be missing. In that case, events such as `add_to_cart` will either be sent without product data or not at all.
Here’s how to narrow it down:
- Test it – ideally in a test environment – using the Shopware default theme. If the tracking works there, the problem lies with the theme.
- As a test, disable any extensions that alter the checkout area, the product boxes or the shopping basket.
- After updating the extension or theme, clear the cache and recompile the theme (Settings › System › Caches & Indexes).
- Check the browser console for JavaScript errors. An error caused by another extension may be preventing tracking.
If you’re stuck, send us the URL of the page in question and the name of your theme. We’ll then have a look at it.
Features by Shopware version
There is a separate branch of the extension for each version of Shopware, each with its own version numbers. Not every feature is available in every branch. The app runs on Shopware 6.6 and 6.7.
| Function | Shopware 6.4 | Shopware 6.5 | Shopware 6.6 | Shopware 6.7 | App |
| gtag.js (Google Analytics 4, Google Ads) | yes | yes | yes | yes | yes |
| Google Tag Manager | no | yes | yes | yes | yes |
| Enhanced Conversions | yes | yes | yes | yes | yes |
| Server-side tracking | no | no | yes | yes | yes |
| Price transfer mode | no | no | yes | yes | yes |
| ACRIS EU Cookie Policy Pro | no | no | yes | yes | yes |
| Consent-free Tag Manager | no | no | yes | yes | yes |
| Disable consent attributes and consent mode signals | no | no | yes | yes | no |
| Source tracking | no | no | yes | yes | no |
| Consent Mode: Advanced | no | no | no | yes | yes |
| Lead conversion tracking | no | no | no | yes | no |
| List context for product lists | no | no | no | yes | no |
| Coupon mapping | no | no | no | yes | no |
| Custom snippets, GTM preview mode | no | no | no | yes | no |
Set up Google Tag Manager
Tag Manager account and container
- Log in to your Google Tag Manager account or create a new account.
- Create a new empty container for importing the default settings.
For advanced users: You can also use an existing container and merge it later. However, we recommend using a new container.
You can find help with Google Tag Manager here:
Google Tag Manager Support
Create a GTM template with our generator
Our generator creates the finished import file for your GTM container in three steps. It directly inserts your Google IDs into the template. The file is compatible with Shopware 6.5, 6.6, and 6.7.
- What do you want to track? Tick the boxes for Google Analytics, Google Ads and, if desired, Shopping basket data. Shopping is only available in conjunction with Google Ads and requires a Merchant Centre linked to Google Ads. You can find details under „Google Ads: Shopping basket data and Enhanced Conversions“.
- Enter your details: Only the fields you need for your selection will appear. Next to each field, it says where you can find the value.
- Download and import: Import the file in Google Tag Manager under „Admin“ → „Import container“. It’s best to do this into a new, empty container. If you’re importing into an existing container, select ‘Merge’ and choose to overwrite any conflicts. Your own tags will be retained. This is also how you update an older template. Never select ‘Overwrite’, as this will replace all tags, triggers and variables in the container. Then check the preview and publish.
How to find the IDs:
Analytics: Create a property or go to your existing property in Google Analytics and navigate to Administration (bottom left) and then to "Data streams". Select the relevant data stream. You will find the GA4 ID at the top right (measurement ID). Google Help
Ads: Log in to Google Ads → Goals → Conversions → Summary. Open the conversion action you want (or create a new one). Under “Tag setup”, select the ‘Use Google Tag Manager’ tab. There you’ll find the conversion ID and the conversion label.

Configure extension in Shopware
Now switch to your Shopware backend and open the extension configuration.

Under "Which tracking integration would you like to use?", select the option "Google Tag Manager".
Then enter your GTM ID (e.g. GTM-XXXXXXX) in the "Google Tag Manager Container ID" field.

If you are using Google Ads tracking, also tick „Enable conversion tracking“ and, if required, „Enable enhanced conversion data“:

Save the configuration to activate the integration of the container in the shop.
Check and publish containers
Use the Preview function in Google Tag Manager ("View in preview") to test your container. Enter your shop URL and check whether all events such as product view, add-to-cart or purchase are triggered correctly. Make sure that no tracking takes place if cookie consent is rejected.
If everything works as desired, don't forget to publish the container Click on the top right of the GTM on Send → Publish. Only then will your tracking be active in the live shop.
Configuration Google Analytics (gtag.js)
If you no Google Tag Manager you can alternatively work directly with the Google Analytics tracking code (gtag.js).
- Choose from "Which tracking integration would you like to use?" the option "Google Analytics (gtag.js)".
- Wear your Google Analytics 4 Measurement ID in the format G-XXXXXXXXXXXX in the corresponding field. You can find the ID in Analytics under Administration → Data streams
- Save the configuration.

With immediate effect, the extension will handle tracking via the gtag.js code, including all supported e-commerce events such as product views, add-to-cart and purchase completion.
Hint: If you use the Google Tag Manager If you’re using it, you’ll need to maintain the GA ID there in the container. Not in the extension.
Configuration Google Ads Tracking (gtag.js)
If you want to use Google Ads Conversion Tracking, without using the Google Tag Manager, you can set this up directly via the gtag.js tracking code.
- Choose from "Which tracking integration would you like to use?" the option "Google Analytics (gtag.js)".
- Activate the option in the extension "Activate conversion tracking".
- Wear your Google Ads Conversion ID and the associated Conversion label in the corresponding fields.
- (Optional) Activate "Activate enhanced conversion data", to send additional user data, such as an email address or telephone number, to Google Ads. This helps improve the attribution of conversions, particularly for cross-device purchases.
- Save the configuration.
Hint: For Enhanced Conversions, you must also activate this function in your Google Ads account. You can find instructions here: Google Ads guide to extended conversions
How do I find my Google Ads conversion ID and the conversion label?
- Log in to your Google Ads account.
- Navigate to → Target project → Conversions → Summary
- Select an existing Conversion campaign or create a new one.
- Click in the area "Tag facility" on the tab "Set up the day yourself".
- In the "Event snippet" section, you will find both your conversion ID (e.g. AW-1234567890) and the conversion label (e.g. abc123XYZabcDEF456) under send_to.
Dynamic remarketing
If you want to use dynamic remarketing via Google Ads, you can specify a so-called "feed type key" in the extension configuration. This is necessary so that Google can correctly allocate your product data and display suitable adverts.
Select the appropriate type depending on what you are applying for. The following options are available:
- retail
- education
- flights
- hotel_rental
- jobs
- local
- real_estate
- travel
- custom
For classic online shops, the following is usually "retail" the right choice.
You can find more information on use and setup in the official Google Ads Remarketing documentation:
https://support.google.com/google-ads/answer/7305793?hl=de&ref_topic=10070037#zippy
Google Ads: Shopping basket data and Enhanced Conversions
What this achieves
- Trolley data (conversions involving trolley data): With every order, Google Ads receives details of the items purchased, including the item number, quantity and unit price. If your Google Merchant Centre is linked to your Ads account, you can use this to analyse turnover and profit per product.
- Enhanced Conversions: When an order is placed, the details from the billing address (email, telephone number, name, street, postcode, town/city, country) are sent to Google. This enables Google to track conversions more effectively. The extension passes the data to the Google tag; Google itself handles the encryption (hashing).
Prerequisites
- Your Google Merchant Centre is linked to your Google Ads account.
- The item ID in your product feed is the product number from the shop. The extension sends the product number as
item_id. This is the only way Google can match the items in the order to the products in the feed. - In the extension, „Enable conversion tracking“ is switched on. For Enhanced Conversions, also select „Enable enhanced conversion data“.
Which price is carried forward
Google expects the shopping basket data to include the unit price of the item excluding tax, delivery charges and order discounts (Google Ads Help).
The extension sends the price exactly as you have set it. It does not automatically convert it to net price, as the same price is also recorded in Google Analytics.
Shopware 6.6 and 6.7 (extension and app) and MultiTracking Pro: The „Price Transfer Mode“ setting is crucial. The default setting is gross prices.
- For shopping basket data, we recommend using one of the net price settings („Net prices“ or „Net prices excluding delivery costs“). This ensures that the item price complies with Google’s requirements.
- If you stick with gross figures, the item prices will include VAT. Turnover and profit per product will then appear too high in Google Ads due to the tax.
- This setting also affects Google Analytics. If you need gross figures there, you’ll have to decide which is more important to you.
Shopware 6.5 (extension and app): This setting is not available here. The unit price from the order is sent as it appears to the customer group. For gross customer groups (usually end customers), tax is included; for net customer groups, it is not.
Selecting the appropriate GTM template
For cart data, in the generator above, you additionally check the „Shopping“ box. You only select this option if your Merchant Center is linked to the Ads account. The generator then also prompts for the Merchant Center ID, the feed country, and the feed language. The template applies to Shopware 6.5, 6.6, and 6.7.
Each container corresponds to one country of origin. If you sell to several countries, you set up a separate container for each country.
In the Shopping templates, the „Google Ads – conversion“ day is already enabled for product-level sales data using the „Custom Fields“ data source.
Here’s how to do it:
- In the generator, check the boxes (with „Shopping“), enter your data, and download the file.
- File in Google Tag Manager under Administration → Import container to play.
- Check in the preview to make sure everything is there.
- Publish.
- After placing a few orders in the Google Ads account, check to see if the cart data appears there.
Cost price and profit
The extension does not transfer purchase prices. The cost prices are sourced from Merchant Centre via the feed attribute cost_of_goods_sold. If you want to see the profit per product in Google Ads, you need to include this attribute in your feed.
Google calculates gross profit as turnover minus cost of sales (Merchant Centre Help). To ensure these figures match, we recommend maintaining net cost prices and also transferring net item prices (see „Which price is transferred“). If you use gross item prices and net cost prices, the profit shown in Google Ads will be too high due to VAT.
Enhanced Conversions with a telephone number
In the templates, Enhanced Conversions are tracked via the „Google Ads – conversion_user_data“ tag with the variable conversion_user_data. The „Google Ads – conversion“ tag no longer requires its own toggle for this.
The new templates also pass the telephone number from the billing address on to Google. To do this, the extension removes spaces, hyphens, slashes and full stops, and sends the number only in international format, for example +4971112345678. Numbers without + and country code, with 00 at the beginning or with (0) leaves them out.
Note for Shopware 6.5
With the latest update, item_id In all events (view_item, Listing, select_content, add_to_cart, remove_from_cart, begin_checkout, purchase), use the product number instead of the internal item ID. Reports and target groups based on the old item ID will show new values from the update onwards.
Notifications in Google Ads
Google Ads keeps showing you hints in the Conversions section and in the Google Tag Manager. Many of them are recommendations and not errors. First, try the Tag Assistant to see if your tags are firing after approval. If so, your tracking works.
„Day not placed correctly“
Error or recommendation: Most of the time, it's not a mistake.
Google only allows the extension to be loaded after approval in the cookie banner. Google’s approval process triggers your shop without consent and therefore the tag is not always found. With ACRIS, the notification appears more frequently because the cookie manager takes over the loading there. We deliberately do not load Google before approval. Otherwise, a connection to Google would already be established when the page is loaded.
What you can do: Open the shop, accept the cookies and check with the Tag Assistant. If you fire the tags, you can ignore the message.
„Use In-Page Code in addition to Automatic“
Error or recommendation: Recommendation regarding Enhanced Conversions.
Google then receives the customer data for the Enhanced Conversions only through automatic recognition and recommends that it be submitted directly from the shop.
What you can do: In the „Enable Enhanced Conversion Data“ extension, in Google Ads, select the „Google Tag Manager“ method for advanced conversions and check whether the „Google Ads – conversion_user_data“ tag from our template is active in your container. Details under „Google Ads: Shopping basket data and Enhanced Conversions“. Until the notification disappears, it usually takes a few days.
„Problems with setup“ and grouped tags
Error or recommendation: usually a change on the Google page.
Google often combines the Google Ads tag (ID starts with AW-) and the Analytics tag (ID starts with G-) into a single Google tag. After that, Google no longer provides the old AW ID individually and reports a problem even though nothing has changed in your shop. The many IDs with GT or G in your account are normal in this case.
What you can do: In Google Ads, under Tools > Data Manager > Google Tag, look for the tag ID that manages your conversions. In the Tag Manager, you can pause the tag „Initialize – Google Ads“, which only loads the old AW ID. The tag „Initialize – Google Ads Conversions“ must remain active; it is needed to associate ad clicks. The conversion ID and conversion label remain the same. Then publish the container.
„Missing cart data“ and „Self-costs are missing“
Error or recommendation: Recommendations.
For cart data, you need the Shopping cart data template and a linked Merchant Center, see „Google Ads: Shopping basket data and Enhanced Conversions“. The cost of goods sold (cost_of_goods_sold) comes from your product feed in the Merchant Center, not from the Tag Manager. If you don’t want to evaluate the gross revenue in Google Ads, you can ignore this message.
Configure consent management
In the configuration of the extension, under „Configuration Consent Management,“ select the consent manager your store uses exactly. Proper selection is mandatory. If it doesn’t match the cookie banner in your store, tracking will start late, not at all, or individual events will be lost.
Supported by:
- Shopware Cookie Consent Manager (this option also applies to Cookie Consent Plus)
- Cookiebot
- CookieFirst
- Usercentrics
- consentmanager (consentmanager.net)
- CCM19
- ACRIS EU Cookie Policy Pro (Shopware 6.6 and 6.7)

Settings per Consent Manager
- Shopware Cookie Consent Manager: Selection is sufficient; no further settings are necessary.
- Cookiebot: The extension uses the categories statistics and marketing. If your categories differ from these, you must enter them in the fields „Analytics Consent Attribute“ and „Marketing Consent Attribute“.
- Usercentrics: The extension uses the services „Google Analytics“ and „Google Ads“. If your services are named differently, you enter the names in the two attribute fields.
- CookieFirst: The extension uses the categories analytics and advertising. You enter the alternative categories in the two attribute fields.
- consentmanager: The extension uses the s26 (Statistics) and s1 (Marketing) purposes. You enter the alternative purposes in the two attribute fields.
- CCM19: There is no attribute here. The extension exports its scripts so that CCM19 can control them. You define the association with statistics and marketing in the CCM19 backend.
- ACRIS EU Cookie Policy Pro: In ACRIS, add the entry for Google Analytics to the „Statistics“ category with the consent-mode signal analytics_storage and the entry for Google Ads to the „Marketing“ category with the ad_storage signal. Without these signals, tracking will not start. You no longer need to add your own cookie entries for the extension in the current versions. You can include their cookie IDs in the entries for the Google cookies.
If the attribute fields remain empty, the extension uses the standard values mentioned above. The fields are available in the extension for Shopware 6.6 and 6.7, not in the app.
Disable consent mode signals: Only turn on when the Google Consent Mode integration is active in the Consent tool. Then the tool sends the signals itself. If the switch is on and the tool doesn’t send any signals, Google blocks all tracking events.
Expert mode: The field only appears in the extension for Shopware 6.5. Starting with Shopware 6.6, the two attribute fields take on this task.
Cookie categories in the Shopware banner
The category in which the extension appears in the Shopware cookie banner is fixed. Starting with Shopware 6.6, there are two entries: Google Analytics under „Statistics“ and Google Ads under „Marketing“. Under Shopware 6.4 and 6.5, there is a common entry under „Statistics“. You can customize the displayed text using the text modules. If you use an external consent manager, you can specify the categories there.
This is how you test the setting
Open your shop in a private browser window and only allow „statistics“ in the cookie banner. In Tag Assistant, Google Analytics must now be loaded, not Google Ads. If you opt out of everything, the extension will not load anything from Google at all. The „Consent Mode Advanced“ switch is an exception; then Google loads before consent is given.
Expert settings (Consent-Free Tracking)
If you are using a special setup in which the Google Tag Manager is to be loaded independently of the cookie content, you can activate an additional container snippet here.
To do this, activate the option "Activate Consent-Free Google Tag Manager JavaScript snippet" and enter in the field below the corresponding Container ID (e.g. GTM-XXXXXXX).
This feature is intended solely for advanced use cases, for example if you are using tags that Do not collect any personal data or must be loaded before consent is given.
Please note: The shop operator is responsible for GDPR-compliant use. Only use this option if you are aware of the legal implications.
Consent Mode: Advanced
Optionally, the „Consent Mode Advanced“ switch can be enabled (disabled by default). If it is enabled, the Google container or gtag is loaded before consent is given. The consent defaults remain set to „denied“ (including ads_data_redaction), so only cookie-less pings are sent to Google, from which Google extrapolates conversions using modelling. The advantage is that conversion signals are retained even if visitors ignore the cookie banner.
Privacy notice: When the switch is enabled, the Google script is loaded before consent is given; amongst other things, the visitor’s IP address is sent to Google even before consent is given (data transfer to the USA). This practice is legally controversial. The shop operator is responsible for activating, verifying and managing this feature (including consultation with the data protection officer). The switch is disabled by default.
If an external CMP (such as Cookiebot, UserCentrics, CookieFirst or ACRIS) is used instead of the Shopware Cookie Consent Manager, this CMP must provide the consent signals. When Advanced Mode is active, the first page load for returning visitors who have already given their consent may be cookie-free, as the consent stored in the CMP, for technical reasons, only takes effect after the script has loaded. Full data is then transmitted. With the Shopware Consent Manager, this effect does not occur, as the stored consent is applied before the script is loaded.
GTM mode works with the GTM templates we provide (Consent Mode is already built in) without the need for any customisation of the container. In Analytics mode (gtag.js), data is sent directly; a container is not required here.
Opt-out link for Google Analytics
To deactivate tracking by users, add the following link to your privacy policy:
<a onclick="javascript:gaOptout();" href="javascript:void(0);">Switch off Google Analytics tracking for this website here</a>
Set up server-side tracking
What is server-side tracking?
Server-side tracking is a modern method of collecting website data. Instead of sending tracking data directly from the browser to Google, it is first sent to a separate server and forwarded from there in a controlled manner.
Classic tracking: Browser → Google
Server-side tracking: Browser → Your tagging server → Google
Important concepts: Web vs. server container
To use SST, you need two different container types in Google Tag Manager. These fulfil different tasks:
| Container type | Task | Biloba template necessary? |
| Web container | Collects events (clicks, sales) in the browser. | Yes (JSON import) |
| Server container | Receives data & protects privacy. | No (standard) |
Prerequisites
To be able to use server-side tracking, you need:
- A Google Tag Manager server container: Created in your GTM account.
- A tagging server (hosted on Google Cloud Platform, AWS, or with a provider such as Stape.io)
- Your own subdomain (recommended, e.g. gtm.your-domain.com)
- Budget: Please note that SST incurs hosting costs (approx. 30-50 €/month depending on traffic).
HintServer-side tracking incurs ongoing costs for server hosting. The costs depend on your shop's traffic.
How the automatic redirection works
In mode gtag.js the extension sets server_container_url automatically. In mode Google Tag Manager The extension loads the container via your server URL. To ensure that the measurement data also passes through your server, enter the parameter in the Google tag of your web container under ‘Configuration settings’: server_container_url enter your server URL (e.g. https://gtm.deine-domain.de) and publish the container. A GA4 client and a GA4 tag must also be active in the server container.
- Simply import our JSON file in Web container.
- Enter your server URL in the Extension configuration in Shopware.
- In gtag.js mode, the extension automatically sends the data to your server. In Google Tag Manager mode, you add
server_container_urlin the Google tag of your web container.
Step 1: Create server container
- Open Google Tag Manager
- Click on “Create container”
- Select the target platform “Server”
- Follow the set-up wizard
Step 2: Set up the tagging server
Google offers two options:
Option A: Automatic provisioning (recommended for beginners)
- Google automatically sets up a server on Google Cloud Platform
- Simplest method, but less control over the infrastructure
Option B: Manual provision
- You set up the server yourself (Docker container)
- More control, but technically more demanding
- Can be hosted on any infrastructure
Detailed instructions from Google:
Step 3: Set up subdomain (recommended)
For optimal cookie functionality, you should have a subdomain of your website point to the tagging server:
gtm.your-domain.com → Your tagging server
This makes it possible:
- First-party cookies (longer duration)
- HttpOnly-Cookies (more security)
- Better compatibility with Safari/ITP
Step 4: Configure extension
- Open the extension configuration in Shopware Admin
- Activate “Enable server-side tracking”
- Wear the Server container URL (e.g.
https://gtm.deine-domain.de) - Saving and clearing the cache
ImportantThe URL must be entered without a trailing slash!
- ✅ Correct: https://gtm.deine-domain.de
- ❌ Incorrect: https://gtm.deine-domain.de/
Functionality in detail
After activation, the extension automatically changes all Google tracking URLs:
| Before | Afterwards |
|---|---|
https://www.googletagmanager.com/gtm.js | https://gtm.deine-domain.de/gtm.js |
https://www.googletagmanager.com/gtag/js | https://gtm.deine-domain.de/gtag/js |
In addition, the parameter server_container_url to all gtag('config', ...) Views attached (only in gtag.js mode).
Source tracking (UTM / affiliate code)
The extension not only includes Google events; it also writes the source of each order directly into the Shopware database. UTM parameters, advertising click IDs, and the HTTP referrer are recorded as Affiliate code and Campaign code in the order and are therefore immediately visible in the order list, without the need for external reporting.
What is recorded?
- UTM parameters:
utm_source,utm_medium,utm_campaign,utm_content,utm_term - Advertising click IDs:
gclid(Google Ads),fbclid(Meta),msclkid(Microsoft Ads),ttclid(TikTok) and others - HTTP Referer: is used as a fallback if there are no UTM parameters or click IDs
Behaviour
- By default activated. Once the extension has been installed or updated, tracking begins automatically.
- Sticky per session: The first source value recorded is retained throughout the entire session and is carried over to the order when the purchase is completed. Subsequent clicks do not overwrite it.
- No override with manual
?affiliateCode=-parameters: If the URL is used to create your ownaffiliateCodeIf it has been set (e.g. by an existing affiliate programme), it remains unchanged. Source tracking does not overwrite it.
Important after the extension update: So that the default value is permanently stored in the system_config-table, the switch in the extension configuration section (the „Source Tracking (UTM / Affiliate Code)” tab) must be explicitly set to To and stored. Only then does the SystemConfigService the value true. Otherwise, the default value will be used, but the value will not be visible in the configuration.
Custom UTM values take precedence
Using the switch Custom UTM values take precedence (The „Source Tracking (UTM / Affiliate Code)“ card) allows the extension to carry over your own UTM parameters from the landing URL into the order: utm_source as an affiliate code, utm_campaign as a campaign code. This also applies if a click ID such as gclid is included. Without the switch, the order will show „Ads“ / „Google Ads“ in this case.
The switch is off by default and only works when source tracking is active.
Example URL: ?utm_source=google_it&utm_campaign=pmax_shopping_best&utm_medium=cpc
Result in the order: Affiliate code „google_it“, campaign code „pmax_shopping_best (cpc)“.
- Is
utm_mediumIf set, it is appended to the campaign in brackets. - Missing
utm_sourceorutm_campaign, the corresponding field remains blank. Withoututm_campaignthe medium is not attached either. - Always give
utm_medium=cpcwith. Without a medium, visits without a gclid are categorised as „Unassigned“ in Google Analytics 4. - Letters, numbers, spaces and the following characters are permitted:
. _ - / | ( ) + : , ~ @ ! * #. A value must begin with a letter or a number, must not end with a space, and must be no more than 255 characters long. Any other values will not be accepted (nor will they be converted). The value0is considered not to have been set. - If no UTM values are provided, automatic source identification continues to apply (e.g. gclid = „Ads“ / „Google Ads“).
- Have further priority
?affiliateCode=and?campaignCode=in the URL, explicit AI agent parameters and a session assignment that has already been set. Only the first entry per session counts.
Make columns visible in the order overview
The recorded values are stored in the Shopware standard fields Affiliate code and Campaign code saved. These are hidden by default in the order list. Here’s how to make them visible:
- In the Shopware admin on Orders → Overview go.
- At the top right of the table header, click on the symbol with the three horizontal bars (Column settings).
- In the list the options Affiliate code and Campaign code activate.
- Save selection. The columns will now appear in the order list.
Lead conversion tracking for contact forms
In the extension for Shopware 6.7, it records not only purchases, but also Enquiries as conversions. Once a Shopware contact form has been successfully submitted, the extension automatically triggers the GA4 event generate_lead from (in GTM mode as generate_lead-DataLayer event). Here’s how to measure lead conversions in Google Analytics 4 and Google Ads.
Furnishings
You’ll find the map for this in the extension configuration „Lead Conversion Tracking”:
- „Record contact form submissions as lead conversions (generate_lead)”: triggers the lead event.
- „Lead conversion value”: Monetary value in the shop’s currency, which is sent with the event as a conversion value (for Google Ads). Default:
1.0.
Hint: The event is triggered as soon as a visitor successfully submits the Shopware contact form.
Custom snippets & GTM preview mode
For more advanced setups, the extension offers two extension points for custom code, as well as a preview mode for Google Tag Manager.
Custom snippets (Head & Body)
On the map „My own snippets” you can integrate your own code into the storefront:
- „Custom code in the head section”: is displayed unchanged in the header section of every storefront page. Suitable for additional loaders (e.g. a server-side GTM container), third-party consent tools or alternative trackers. You specify the enclosing script tags yourself.
- „Custom code after the body”: is output immediately after the opening `body` tag; this is common for the GTM Noscript fallback or for markup that must appear immediately after the `body` tag.
Important: The head code is without consent management loaded (before any cookie consent is given). It is your responsibility to obtain any consent required by law (e.g. GDPR). Faulty code may damage the storefront. Use at your own risk.
GTM Preview Mode (Environment Parameters)
The field „GTM environment parameters (preview mode)” on the map „Google Tag Manager configuration” loads a specific GTM workspace or the preview in the storefront instead of the live container.
- Parameters in GTM under Manage → Environments copy, e.g.
gtm_auth=ABC123>m_preview=env-3>m_cookies_win=x(without a leading?or&). - Leave this field blank to load the standard Live Container.
Coupon mapping (price context)
The extension can pass price benefits on to GA4 as „coupons”, so that you can analyse purchases involving tiered pricing and RRP discounts in GA4/Google Ads reporting. You’ll find the toggles on the dashboard „Coupon mapping (price context)”:
- „Passing tiered prices as item coupons”: If a product is actually purchased at a quantity-based tiered price (unit price below the base price), the extension sets the field in the GA4 item
couponon the volume discount marker anddiscounton the amount saved. - „Pass on the RRP (strikethrough price) as an item voucher”: If a product is sold below its RRP / marked-down price, then
couponon the UVP marker anddiscountbet on the difference.
If both apply, the Tiered pricing takes precedence. The marker texts can be customised via the Storefront snippets (biloba.AdGoogleGtagsjs.coupon.graduated or. biloba.AdGoogleGtagsjs.coupon.uvp).
List context for product lists (Shopware 6.7)
In the extension for Shopware 6.7, the events are handed over view_item_list and select_item the appropriate GA4 list context for each product list (item_list_id and item_list_name). In Google Analytics 4, it is immediately clear from which list a product was viewed or clicked on – whether it was a category, search results, cross-selling or a CMS slider.
In addition, it fires view_search_results This is now also available in the search suggestions (Suggest/Autocomplete), not just on the full search results page. This allows you to track user behaviour as soon as they start typing in the search box.
No configuration required. The list context tracking is automatically enabled in the extension for Shopware 6.7.
Custom parameters in the purchase event (for developers)
You can add the GA4 event purchase On the order completion page, you can specify your own parameters, such as a subscription flag, a customer segment or a field from the order. To do this, do not copy the entire template block into your theme; instead, use the extension point provided for this purpose. This way, you’ll still receive all updates to pricing, tax, coupon and consent logic, and your parameter will be transmitted in the same push.
The extension point
- Twig block:
page_checkout_finish_biloba_google_purchase_params - JavaScript variable:
bilobaGooglePurchaseParams(the flat parameter object of the GA4 event)
The block is fired immediately after the parameter object has been set up and immediately before the ‘push’ event. This applies to both tracking modes (Google Tag Manager and gtag.js directly) and to all pricing options. A single adjustment therefore covers everything.
Example for your theme
Place the file in your theme src/Resources/views/storefront/page/checkout/finish/finish-details.html.twig To:
{% sw_extends {
template: '@Storefront/storefront/page/checkout/finish/finish-details.html.twig',
scopes: ['default', 'subscription', 'mixed-subscription']
} %}
{% block page_checkout_finish_biloba_google_purchase_params %}
bilobaGooglePurchaseParams.is_subscription = {{ page.order.customFields.isSubscription ? 'true' : 'false' }};
{% endblock %}
If you sell subscriptions (Shopware Commercial), leave the line with scopes It’s absolutely essential. Without it, the storefront will truncate the theme template for subscription orders, and your customisation will be lost without an error message. You don’t need to call the parent block; the block is empty in the extension.
Where the parameter is received
| Tracking mode | Where does the parameter end up? | What do you need to do on Google? |
| Google Tag Manager | As e-commerce. in the purchase-Message in the data layer | Declare a variable of type „Data Layer Variable“ with the name ecommerce.is_subscription and the data layer version „Version 2“, and add it to your GA4 event tag as an event parameter. The built-in e-commerce mapping in GTM only passes on the standard keys; custom keys are only sent to GA4 via this mapping. |
| Directly via gtag.js | As an event parameter of the purchase-Events | Register the key in GA4 as a custom dimension (Administration → Data View → Custom Definitions → Create Custom Dimension, scope „Event“) so that it appears in the reports. |
Important rules
- Just write something simple, synchronous JavaScript. The push can be delayed until cookie consent is given. The exact object you have modified is sent, so static values are safe. Promises or timers will miss the push.
- Enclose text in quotation marks and escape Twig output for JavaScript (Twig filter
ein the contextjs). - The standard keys (
transaction_id,value,currency,itemsetc.) Please do not rename or delete this. - Your customisation must be positioned above our extension in the template hierarchy. A theme always does this. If you make the customisation in a separate extension, it must be implemented using the method
getTemplatePrioritya priority that higher is less than ours (0), for example900. Otherwise, our empty block wins. - The Google Ads event
conversionis not extended via this block. - Developer tools that wrap each block in HTML comments (e.g. the Frosh Development Helper) insert this marker into the script tag. There, it becomes a JavaScript comment and overrides your first statement. Enter the block name in the Helper under
exclude_keywordsTry it, or test it with the helper disabled.
FAQs
Support
If you have any questions or problems, please do not hesitate to contact us:
- Support request: biloba-it.de/shopware-extension-support
- e-mail: support@biloba-it.de
- Phone: +49 (0) 711 - 13633800
Further tracking extensions
You are advertising on multiple platforms? You can find all the tracking extensions from Biloba IT in a summary under Shopware Tracking.
