Skip to main content
Which paths visitors take through the shop, where they drop off and which campaign actually brings in orders: no shop system answers these questions on its own. For this, you integrate a tracking service, and WEBSALE V8s offers two ways to do so.
According to current case law, tracking, cookies and comparable tools for advertising effectiveness research may only transmit data once the visitor has actively consented. A notice is not sufficient, and pre-ticked checkboxes are not permitted. Clarify the implementation with your data protection officer before carrying out any of the following steps.
Guide: Consent to data processing (cookies)

The two ways

Both ways can be used side by side. For a service that constantly changes its own code, the interface is the more low-maintenance solution.

Way A: via the tracking interface

Step 1: Activation

The tracking interface must be activated for your shop. Contact WEBSALE AG to do this.

Step 2: Copy the code into ws_analyse.js

The file ws_analyse.js in the shop directory holds the scripts of all tracking service providers. If a provider supplies its own file with this name, transfer its content into the existing file instead of replacing it. Put comment lines around each section. With four service providers in one file, this makes the difference between five minutes and an hour when something needs to be changed later.

Step 3: Set the tag in the template

The tag belongs in the <head> section of every template on which measurements should be taken.
Reference: WS-ExternalStatistics Guide: Description of the tracking interface Materials: Example of tracking on a shop page

Way B: directly in the template

Tracking usually belongs on all shop pages. Instead of copying the code into every template, create an include section in the FastInclude file incl_fast_includes.htm and include it everywhere.
Guide: Include sections Reference: WS-Fast_Include() · WS-Fast_Include2…4()

Provider examples

Get the code from your account with the respective service and replace all placeholders in it with your own identifiers. Matomo:
Google Analytics:
Older instructions for Google Analytics still show the code using _gaq and ga.js with an identifier in the form UA-…. This code no longer measures anything. Use the code from your Google account, which relies on gtag.js and a measurement ID in the form G-….

Special case: Google Conversion Tracking

Google Conversion Tracking is part of Google Ads. You need a Google Ads account for it; when you sign up, you receive your customer ID.
For conversion tracking, Google recommends direct integration in the template. Do not use the tracking interface for this; instead, place Google’s code in every template to be measured, at the location described by Google.

Passing umlauts and special characters

The shop delivers its content in the character encoding specified in its configuration, usually ISO 8859-1. Many tracking services, however, expect UTF-8. If you pass a value containing umlauts unchanged, garbled characters arrive at the other end. For this case, there is DC-FP1_convertToEncoding(). The value is placed in a free placeholder, re-encoded and then output.
The source encoding is $WS-Charset$ rather than a fixed ISO-8859-1. This way, the example also works in a subshop that is set to a different encoding.
A complete example that passes the search term and product numbers to a service provider:
The tag chain is deliberately written without line breaks within the src attribute. A line break in the middle of the address ends up in the generated address and makes the call unusable.
Reference: WS-Search · DC-FP1…5 · DC-FP1…5_set · DC-FP1…5_convertToEncoding() · DC-FP1…5_urlencoding

Checking

After integration, call up a few pages and check in the service provider’s account whether the data is arriving. For Google, the Tag Assistant in the Chrome browser also helps. Guide: Checking the setup of the web tracking code

What to review regularly afterwards

Integration is not the end of the job. Two Google tools belong in your daily work, and they answer different questions. Guide: Sitemaps, robots.txt and mobile subshops
  • Guide: Description of the tracking interface
  • Guide: Consent to data processing (cookies)
  • Guide: Include sections
  • Guide: A/B test