GTM template with instructions video from Simo Ahava!

GTM template with instructions video from Simo Ahava!

Event Tracking Guide

After adding the Tracklution Main script to your website, you can start tracking events. If you have not yet installed any Tracklution tracking on your site, please do that first. Find a suitable installation method for your site from here: https://support.tracklution.com/kb/section/3 <section class="warning box" Make sure the main script is always loaded before any event scripts! Otherwise the event scripts won't work and Tracklution will not register events.</section You wi…

After adding the Tracklution Main script to your website, you can start tracking events. If you have not yet installed any Tracklution tracking on your site, please do that first. Find a suitable installation method for your site from here: https://support.tracklution.com/kb/section/3

Event types

Standard Events

Event type
PageView
ViewContent
AddToCart
CompleteRegistration
StartTrial
Subscribe
InitiateCheckout
Lead
Purchase
ContactInfo

The standard events are automatically tracked if you are using the Shopify or WooCommerce installation method. With GTM or manual script installation, you need to add each event separately.

Custom Events

On top of the above mentioned Standard Events, you can use any Custom scrips also. 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.

<script> tlq('track', 'CustomEventNameHere'); </script>

These code snippets need to go in the <body> tag of your website.

Purchase Event

The Purchase event is used to track a purchase on your website. The "Purchase" event also needs a third parameter which is an object containing the purchase data.

<script> tlq('track', 'Purchase', {value: 2.25, currency: 'EUR'}); </script>

Partial Purchases or Virtual Purchases

This is useful if you wish to track virtual purchases or your business model includes multiple purchases happening within one session.

Tracklution will gather all partial purchases and calculate them together, and pass them on to Connectors as a single Purchase.

Partial Purchases collected within a session can be overwritten with an actual Purchase (Purchase that does not include ´isPartial´ setting).

Use case example 1:

You want to provide additional Purchase signals to Ad platforms of users that have shown valuable actions in the site but who do not finalise actual purchase.

This could be for example a user that spent a lot of time in the site and gathered products to shopping cart, but never finalised the purchase. Another good example is to set a Partial Purchase for a customer that subscribes to Newsletter, because you can later reach and convert the user via direct marketing.

We would like to tell to Ad platform that this was still a fairly good visitor (compared to visitors who do not perform any valuable actions).

We can set a Purchase event with partial Purchase that captures e.g. 5% of the shopping cart value:

<script> tlq('track', 'Purchase', {value: 5%ofShoppingCartValueHere, currency: 'EUR', isPartial: true}); </script>

Tracklution gathers this partial Purchase information and waits if actual final Purchase happens.

  • If there is no final Purchase, Tracklution will send this partial Purchase to ad platform to provide additional signals of engaged users.
  • If the final, real Purchase happen, this partial Purchase is overwritten and the actual Purchase with actual value is sent forward and partial Purchase is ignored.

Use case example 2:

Users are making multiple purchases within one session. Tracklution can gather all these purchases and send forward to Connectors as one Purchase (some Ad Platforms only receive one Purchase per session, so in case of multiple Purchases, part of the Purchase value would be lost).

Fire this tag always when partial Purchase happens:

<script> tlq('track', 'Purchase', {value: PartialPurchaseValueHere, currency: 'EUR', isPartial: true}); </script>

Tracklution will gather all partial Purchases within the session, calculate them together, and send forward as one Purchase event to Connectors.

Webhook: Partial or Virtual Purchase

You can create partial or virtual purchases with webhooks as well. In that case you would create your webhook using your server’s URL and add &isPartial=true at the end.

ContactInfo event

The ContactInfo event has these parameters:

  • "set"
  • "ContactInfo" (the type of event)
  • an object containing the contact information (email, phoneNumber, firstName, lastName)

To send ContactInfo type event to Tracklution, you need to add the following code to your website's HTML code on the pages you have contact information available on:

<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>

The example above includes all parameters that can be passed with ContactInfo tag. You can freely choose which parameters to implement, just remove the ones from the script you wish not to implement.

Data hashing for ContactInfo

Tracklution will automatically take care of connector specific formatting, and hashing the data (SHA-256) before the data is forwarded to your connectors.

Data hashing before sending to Tracklution

Parameter formats before hashing

Parameter Name:Value Formatting:
emailTrim whitespace, convert to lowercase, remove leading/trailing spaces.
emailVariants (Microsoft Ads)Trim leading/trailing spaces, lowercase the email, remove the “+…@” tag, remove periods before “@”, ensure it contains “@” and a dot after it, remove any remaining spaces, ensure it doesn’t start or end with a period, and strip accents.
phoneNumberInclude the plus sign, country code, and the phone number digits. Trim other symbols, letters, and any leading zeros. E.g. +447911123456
phoneNumberVariants (Facebook Ads, Snapchat Ads)Include country code and the phone number digits. Trim the plus sign, other symbols, letters, and any leading zeros. E.g. 447911123456
firstNameTrim whitespace, convert to lowercase, remove leading/trailing spaces.
lastNameTrim whitespace, convert to lowercase, remove leading/trailing spaces.
birthdayFormat as YYYYMMDD
genderm/f
addressTrim whitespace, convert to lowercase, remove leading/trailing spaces.
postCodeUse lowercase with no spaces and no dash. Use only the first 5 digits for U.S. zip codes. Use the area, district, and sector format for the UK.
cityLowercase only with no punctuation, no special characters, and no spaces. If using special characters, the text must be encoded in UTF-8 format.
countryUse the lowercase, 2-letter country codes in ISO 3166-1 alpha-2.
Connector specific formatting documentation

Server-Side Tracking, First-Party Cookies and Conversion APIs for any website with easy installation. Simple yet powerful tracking tool for digital advertising.

Tracklution customer rating badgeTracklution customer rating badge

4.8+ Rating on G2 and Trustpilot

Helsinki

Simonkatu 6 A
00100 Helsinki, Finland

New York

307 W 38th St
NY 11105, United States

Meta partner badge
Google partner badge
Meta partner badge

© Tracklution Oy 2026. All rights reserved.