Table of Contents
- Integrating Tracking & Web Analytics on Your Sweap Event Pages
- How the Integration Works in Sweap (General)
- Consent & Data Protection — When Do I Need What?
- Basic Principle With a Consent Tool (Using CCM19 as Example)
- Integrating Well-Known Tracking Tools
Tracking-Tools on your Sweap event pages
Updated
by Matthias Heicke
- Integrating Tracking & Web Analytics on Your Sweap Event Pages
- How the Integration Works in Sweap (General)
- Consent & Data Protection — When Do I Need What?
- Basic Principle With a Consent Tool (Using CCM19 as Example)
- Integrating Well-Known Tracking Tools
Integrating Tracking & Web Analytics on Your Sweap Event Pages
In this article, we'll show you how to integrate any tracking and analytics tool on your Sweap event pages — and provide ready-to-use code blocks for Google Analytics 4, etracker, and the LinkedIn Insight Tag.
This way, you can measure visits, registrations, and conversions on your event pages and incorporate them into your marketing reports.
How the Integration Works in Sweap (General)
Sweap renders your event page as a regular web page. You can add your own <script> tags to the <head> section of the page using the Custom Head HTML field in the registration settings:
- Open your event page in edit mode.
- Click the gear icon in the top right ("Registration Settings").
- Navigate to Information → HTML Settings → Custom Head HTML.
- Paste your tool's tracking code there and save.
You'll find more background on this field in Metadata & SEO for Registration Pages.
{{ event.uuid }} or {{ event.name | escape }}inside the Custom Head HTML to send additional event information to your tracking tool. The individual tool sections below show what this looks like in practice.Consent & Data Protection — When Do I Need What?
Before you implement a tracking tool, clarify (ideally together with your data protection/legal team): Do I need consent from visitors?
As a general rule:
- As soon as a tool processes personally identifiable data, sets cookies, or accesses the user's device in similar ways, you generally need consent under GDPR & TDDDG in the EU.
- Some tools (e.g., etracker analytics) can be operated in a so-called consent-free mode — this reduces compliance obligations, but functionality is also limited. See etracker: Consent-Free and Legally Compliant (german) for details.
- Google Analytics 4 and the LinkedIn Insight Tag practically always require active consent.
How Is Consent Technically Implemented?
Sweap does not include its own consent management. You'll need a consent management tool that only loads your tracking scripts after visitors have given their consent. We have successfully tested, for example:
- CCM19 — often already in use on our customers' other websites.
- Usercentrics — e.g., in combination with Google Analytics.
For more background: GDPR-Compliant Consent Management and Cookie Banners.
Basic Principle With a Consent Tool (Using CCM19 as Example)
The pattern is essentially the same with any consent tool:
- Load the consent tool (usually a
<script>at the very top of the Custom Head HTML). - Define the service (e.g., "Google Analytics", "etracker", "LinkedIn") — typically in the admin area of the consent tool, sometimes via an HTML attribute.
- Block the actual tracking script until the service has been permitted. With CCM19, you achieve this using
type="text/plain"anddata-ccm19="<service-key>"— the script is only activated once consent has been given.
Example skeleton (the same for every tool, only the inner block changes):
<script
src="https://cloud.ccm19.de/app.js?apiKey=YOUR_API_KEY"
referrerpolicy="origin">
</script>
<script type="text/plain" data-ccm19="YOUR_SERVICE_KEY">
// the actual tracking code goes here
</script>
In the tool sections below, you'll find ready-to-use blocks both without and with CCM19.
Integrating Well-Known Tracking Tools
1) Google Analytics
With Google Analytics, you measure page views, user behavior, and conversions on your event pages. The integration uses the standard Google tag (gtag.js).
Step 1 — Obtain Your Measurement ID
- Log in to Google Analytics.
- Optionally create a dedicated property for your event pages (e.g., "Sweap Events").
- Open Admin → Data Streams → Web and copy the Measurement ID (format:
G-XXXXXXXXXX).
Step 2 — Add the Tracking Code to Custom Head HTML
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>
Replace G-XXXXXXXXXX with your own Measurement ID.
Step 3 — Pass Event Info (Optional)
So that you can analyze data per event later, give the page its own page title or a custom parameter:
<script>
gtag('config', 'G-XXXXXXXXXX', {
page_title: '{{ event.name | escape }}',
custom_map: { dimension1: 'sweap_event_uuid' }
});
gtag('event', 'sweap_event_view', {
sweap_event_uuid: '{{ event.uuid }}'
});
</script>
In GA4, you can then create Sweap Event UUID as a custom dimension and use it as a filter in reports/explorations.
Step 4 — Implement Consent Correctly (Required)
GA4 sets cookies and processes personally identifiable data — you need active consent. Two common approaches:
A) With Usercentrics or CCM19 (recommended)
In CCM19, create a "Google Analytics" service and block the GA block using type="text/plain":
<script
src="https://cloud.ccm19.de/app.js?apiKey=YOUR_API_KEY"
referrerpolicy="origin">
</script>
<script type="text/plain" data-ccm19="google-analytics" async
src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script type="text/plain" data-ccm19="google-analytics">
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>
B) With Google Consent Mode v2
If your consent tool supports Google Consent Mode v2 (both CCM19 and Usercentrics do), GA is automatically switched into a restricted/fully active mode without you needing to block the GA block yourself. You'll find the exact configuration in your consent tool's documentation.
Step 5 — Verification
- In GA4: open Reports → Realtime and visit your own event page → at least 1 active user should be displayed.
- Use the Chrome extension "Tag Assistant" to verify the tag fires correctly.
2) etracker Analytics
etracker is an analytics solution hosted in Germany and — unlike GA — can also be operated consent-free.
Step 1 — Set Up an etracker Account
- Log in to etracker.
- Optionally create a new website / project (e.g., "Sweap" or "Event Pages").
- You'll receive a Tracking ID (Secure Code).
Step 2 — Insert the etracker Tracking Code
Insert the code provided by etracker into the Custom Head HTML field. Example:
<script>
(function() {
var etracker = document.createElement('script');
etracker.type = 'text/javascript';
etracker.async = true;
etracker.src = '//code.etracker.com/code/e.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(etracker, s);
})();
</script>
In practice, etracker provides you with code individually tailored to your account. Please copy and use this code from your etracker account.
Step 3 — Pass Event Information (Optional)
You can pass additional information such as the event name or event UUID. These are set via a global object before the tracking script is loaded:
<script>
window._etracker = window._etracker || [];
window._etracker.push({
event_uuid: "{{ event.uuid }}",
event_name: "{{ event.name | escape }}"
});
</script>
This data will help you with per-event analysis later.
Step 4 — Consent / Data Protection
For etracker, you have three options — choose the one that fits your use case:
Option A: Operate etracker Consent-Free
In certain configurations, etracker may be operated without a cookie banner and without consent. Advantages: no banner, less friction. Disadvantage: the entire user history is lost — a visitor who comes to your page twice will be counted twice as a new visitor, not as returning.
More info:
In this mode, the standard integration described above is sufficient.
guest_uuid, no email address, etc.Option B: etracker's Own Consent Tool
etracker offers its own consent mode. You enable the consent mode under Settings → Consent in your etracker account and configure the banner, texts, and behavior directly there. The code integration shown above remains the same.
Option C: CCM19 (or Other Consent Tools)
If you're already using CCM19 on your other websites, you can use it here as well. Create a new service "etracker" in CCM19 (if not already present — contact support if you have questions).
Then add the following to the Custom Head HTML:
<script
src="https://cloud.ccm19.de/app.js?apiKey=YOUR_API_KEY"
referrerpolicy="origin">
</script>
<script>
window._etracker = window._etracker || [];
window._etracker.push({
event_uuid: "{{ event.uuid }}",
event_name: "{{ event.name | escape }}"
});
</script>
<script type="text/plain" data-ccm19="etracker">
(function() {
var et = document.createElement('script');
et.type = 'text/javascript';
et.async = true;
et.src = '//code.etracker.com/code/e.js';
document.head.appendChild(et);
})();
</script>
3) LinkedIn Insight Tag
You need the LinkedIn Insight Tag if you're running LinkedIn campaigns and want to know which ads actually lead to registrations — it also enables retargeting of event page visitors and delivers Website Demographics (industry, position, and company size of visitors).
Step 1 — Get Your Partner ID in LinkedIn Campaign Manager
- Log in to LinkedIn Campaign Manager.
- Go to Analyze → Insight Tag.
- Copy your Partner ID (a numeric sequence such as
123456).
An illustrated guide from LinkedIn: Add the LinkedIn Insight Tag to your website.
Step 2 — Add the Tracking Code to Custom Head HTML
Insert the following block into the Custom Head HTML area of your event page and replace YOUR_PARTNER_ID in three places with your actual Partner ID:
<script type="text/javascript">
_linkedin_partner_id = "YOUR_PARTNER_ID";
window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];
window._linkedin_data_partner_ids.push(_linkedin_partner_id);
</script>
<script type="text/javascript">
(function(l) {
if (!l){window.lintrk = function(a,b){window.lintrk.q.push([a,b])};
window.lintrk.q=[]}
var s = document.getElementsByTagName("script")[0];
var b = document.createElement("script");
b.type = "text/javascript"; b.async = true;
b.src = "https://snap.licdn.com/li.lms-analytics/insight.min.js";
s.parentNode.insertBefore(b, s);
})(window.lintrk);
</script>
<noscript>
<img height="1" width="1" style="display:none;" alt=""
src="https://px.ads.linkedin.com/collect/?pid=YOUR_PARTNER_ID&fmt=gif" />
</noscript>
Step 3 — Trigger a Conversion Event (Optional)
If you want to count a successful registration as a conversion in LinkedIn Ads, you can extend the standard tag with an event call — for example, on the thank-you page after registration:
<script>
window.lintrk('track', { conversion_id: YOUR_CONVERSION_ID });
</script>
You create the conversion_id in LinkedIn Campaign Manager under Analyze → Conversion Tracking.
Step 4 — Implement Consent Correctly (Required)
The LinkedIn Insight Tag sets cookies and requires consent. You may therefore only load it after visitors have actively agreed. Recommended approach:
With CCM19 — create a "LinkedIn Insight Tag" service in CCM19 and block the scripts until consent is given:
<script
src="https://cloud.ccm19.de/app.js?apiKey=YOUR_API_KEY"
referrerpolicy="origin">
</script>
<script type="text/plain" data-ccm19="linkedin-insight">
_linkedin_partner_id = "YOUR_PARTNER_ID";
window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];
window._linkedin_data_partner_ids.push(_linkedin_partner_id);
</script>
<script type="text/plain" data-ccm19="linkedin-insight">
(function(l) {
if (!l){window.lintrk = function(a,b){window.lintrk.q.push([a,b])};
window.lintrk.q=[]}
var s = document.getElementsByTagName("script")[0];
var b = document.createElement("script");
b.type = "text/javascript"; b.async = true;
b.src = "https://snap.licdn.com/li.lms-analytics/insight.min.js";
s.parentNode.insertBefore(b, s);
})(window.lintrk);
</script>
Step 5 — Verification
- Install the Chrome extension "LinkedIn Insight Tag Helper" and open your event page — the extension should display your Partner ID.
- Check the status in LinkedIn Campaign Manager: depending on the UI version, under Analyze → Insight Tag or in the top right under Tools → Insight Tag. After successful installation, the status will switch to
active(within 24 hours at the latest).
Note: After installation, it can take up to 24 hours for LinkedIn to display data.
Testing & Troubleshooting Checklist
If a tool isn't showing data, go through this list:
- Custom Head HTML saved? After inserting, be sure to save and reload the event page.
- Tested on the right page? Preview mode sometimes doesn't count — test on the real, published URL.
- Adblocker off? Disable ad/tracking blockers in your browser, or test in incognito mode.
- Consent banner accepted? If you use CCM19/Usercentrics: did you actually accept the respective service?
- Placeholders written correctly? Make sure
{{ event.uuid }}& co. use double curly braces — single braces or square brackets won't work. - Correct ID used? Measurement ID, Tracking ID, or Partner ID copied exactly from the respective tool?
- Waited 24 hours? Some tools (especially LinkedIn) take up to a day before data becomes visible.