Install Website Tracking with Manual Code Installation
To install Tracklution tracking to your website you can implement the scripts directly to the code of your website if you don't want to use a tag management system like Google Tag Manager for the installation.
Step 1: Implement the main script
To ensure optimal functionality the main script must load on every page of your website prior to any event specific scripts.
For best practices we advise embedding it within the <head> section across all pages.
Each Tracking Pixel code is formatted with the correct Tracking Container IDs, which is why the script always needs to be copied from the tracking container's installation instructions. The correct code is under "Standard installation" option, and it looks similar to this:
Step 2: Implement the event scripts
These are the actual events you want to track on your website, and need to be set per event type.
Implement PageView
With PageView implemented, Tracklution is able to capture incoming traffic with their URL tracking parameters, so that conversions can be reported back to ad platforms with their unique tracking ID such as click ID.
Add this script to be loaded on your site with every page view (e.g. inside the <body> section of the site code for every page view).
<script>
tlq('track', 'PageView');
</script>Implement Purchase event
This enables you to track Purchases in your site. Make sure to replace the example content in the script value and currency parameters with the actual variables to catch the purchase information correctly eg by utilising variables in GTM data layer.
<script>
tlq('track', 'Purchase', {value: 75.10, currency: 'EUR'});
</script>Implementing any other standard or custom events
You can use any events you wish, whether they are standard or customer events. Just change the event name in the script to match the event name you prefer using, and install the script in the desired location or action on the site. See the Event Tracking Guide for more information.
<script>
tlq('track', 'InsertYourEventNameHere');
</script>Step 3: Implement ContactInfo for catching contact information
Embed this script within the <body> tag on pages where customer information is accessible. It's essential to substitute placeholder values with actual data like email addresses or phone numbers, to accurately fill the ContactInfo tag with genuine contact details.
<script>
tlq('set', 'ContactInfo', {
email: 'example@email.com',
phoneNumber: '+358501234567',
firstName: 'David',
lastName:'Smith',
birthday: '1985-06-17',
gender: 'male',
address: 'Street 1',
postCode: '11015',
city: 'Berlin',
country:'Germany',
externalId: '123-91197003219'
});
</script>Why this is important?
Implementing these enhancements isn't strictly necessary but highly recommended to maximise your server-side tracking benefits. Here's why:
- Enable Advanced Features: Unlock capabilities like Enhanced Conversions Google Ads and Advanced Matching Meta.This includes cross-channel re-marketing without relying on third-party cookies capturing otherwise lost conversions eg from missing click IDs identifying returning users and enhancing marketing campaign data for better performance.
- Integrate External Data: Easily incorporate data from other systems such as tracking offline conversions through efficient matching via Webhook delivery to Tracklution.
- Your Data Remains Yours: As a technology provider we emphasize that your data is exclusively yours. Our access is strictly confined to whats necessary for delivering serverside tracking without any claim to your data.
How to implement this?
- When to Trigger: The script can be executed at any session point where relevant information is available such as on an order or thank you page.
- Data Preparation: Its vital to replace placeholder values with actual data variables eg email or phone number variables from the GTM data layer to populate the ContactInfo tag accurately.
- Data Privacy: Information can be submitted in plain text Tracklution will hash it before forwarding to ad platforms. You may also hash data on your end before submission.
- Data Selection: Depending on data availability you may choose to send all or only a subset of the fields provided in the example with email and phone number being the minimum for optimal matching.
- Alternative Delivery Methods: If contact information isnt available during the session or you prefer a server-side approach implement the ContactInfo tag with a unique external ID 'externalId' (e.g. Order ID). Then, send additional contact info via webhook using the same 'externalId' for seamless session data matching.
Step 4: Set DNS for First Party Data Collection
Setting up the DNS CNAME allows Tracklution to load scripts under your own domain, enabling the use of First Party Cookies. This improves data accuracy, ensures more reliable tracking, and helps you get the most out of your tracking setup. See instructions from here: First-Party Mode (DNS)