The purpose of Tag Integration is to integrate Webtrekk and other plugins easily into your website using a graphical user interface. In this Best Practice we will show you how to set up basic tracking for your website with Tag Integration.
In general, in Tag Integration you have to set up a container for each domain (i.e., usually for each account). To each container, you can assign several plugins (e.g., Webtrekk Plugin, Teaser Tracking Plugin). Further, you can define rules (e.g., certain URLs, certain parameter values, or combinations of both). To each plugin, rules are assigned that determine under which conditions a plugin is executed.
In the following example, we will set up the tracking for the domain demoshop.webtrekk.com with the help of Tag Integration. To keep the example simple, we will not measure things that you have to configure outside of the "Basic" and "Event" tabs. These configurations suffice to get data for many relevant analyses, e.g., Traffic analysis, all Geography, Pages, and Technology analyses, as well as Entry Sources and Referrer analyses.
Step 1: Downloading the Tracking script and inserting it in the pages that you want to track
For the current Pixel version, you find this file here as a ZIP file together with the documentation.
In the tiLoader.min.js file, you now have to change the tiDomain to your track domain and the tiId to your track ID. You can look up your track ID in Q3 at Configuration > System Configuration > Account. If you want to host the file generated by Tag Integration on your server, you also have to adapt the customDomain.
When you put the file on your server, you can integrate it in the page to be tracked by inserting the bold line:
Title of the page
Content of the page
Step 2: Creating a Container
After logging in, choose the "Tag Integration" module.
To create a container, click on New Container.
With the help of a container, you define which domain or subdomain you want to track.
To track a website, choose the type Web.
At Domain Inclusion, type in the domain that you want to track; at Domain Exclusion, type in all subdomains of this domain that you want to exclude from tracking.
Step 3: Add Plugins
Now you can choose the plugins that you want to use for the domain or subdomain tracked by the container. Click on Add Plugin.
Step 4: Basic Configuration of the Webtrekk Plugin
To activate tracking, you have to adjust some settings in the Webtrekk Plugin.
Click on Webtrekk Plugin to configure the plugin:
Enter the following information:
Webtrekk track ID: The track ID for your account. You find your track ID in Webtrekk Q3 at Configuration > System configuration > Data Collection.
Webtrekk track domain: The domain of your tracking server. If you use a custom track domain, it's a subdomain of the tracked domain. If not, it's a subdomain of a webtrekk domain. If necessary, you can read up the track domain in a confirmation mail sent by Webtrekk.
Domain: The domain that you want to track. You can enter multiple domains or subdomains by using regular expressions. Alternatively, you can separate different domains can by a semicolon. In our case, we only track the domain "demoshop.webtrekk.com". Usually, the domain entered here should be the same as the one entered at "Domain inclusion".
Cookie settings: Choose between "First-party" and "Third-party" cookies.
To ensure exact data collection, we recommend using First Party cookies.
Position of "sendinfo"-call: You can pass tracking information to Webtrekk by using the function wt.sendinfo(). Here you define when the function is executed. As a standard, the option "Execute in <head>" is chosen.
In the tab "event", you can activate the automatic tracking of HTML links. To this end, at "event tracking" and "event tracking type", choose the option "link".
Step 5: Creating rules for the plugins
Now you have to define the rules according to which the plugins are executed.
In our example, the tracking should be executed for the whole domain or subdomain that was specified in the container. You can create the rule "All Pages" as follows:
Step 6: Assign rules to the plugins
Click on Containers and choose the container created by you. Click on Webtrekk Plugin. Now you can select the rule "All Pages".
Step 7: Publish container
When all settings are done, the container can be published to integrate Webtrekk into the website finally.
Please note that data in Webtrekk generally is updated once per hour (i.e., after accessing the website, it will take some time until you will see the access in Webtrekk).
If you want to view analysis data close to realtime, you can book the Live Analytics module. With this module, you can see the access within a few seconds.
You can find further information on the Review of Data Collection can in the corresponding training chapter.