Prerequisites
To connect QUANTI: Tag, it's recommended to have a Tag Manager.
Setup instructions
Event tracker information
Event tracker name : Give a distinctive name allowing its scope to be easily understood. Example pattern: {{site}} - {{country}}
Dataset ID : Name of the dataset where load datas.
Tag information
Allowed domains : Fully matched regex of included domains names. Regex's example :
(payment|www)\.quanti\.ioinclude hits fromwww.quanti.iodomain and from sub-domainpayment.quanti.ioExcluded referrers : Fully matched regex of the domains whose traffic you donโt want to identify as referrals. A blacklisted referrer lead to recalculate s_source and s_medium values on your raw_sessions and raw_conversions tables.
Copy
s_referrer = {{blacklisted domain}} โ s_source = (direct) โ s_medium = (none)In this field, you can add your different domains (including payment platforms) to exclude internal trafic.
Session timeout : A session is initiated when an app is opened in the foreground or when a webpage is loaded. It ends after a period of user inactivity. The default timeout is 30 minutes but can be adjusted here. The timeout duration can be expressed in seconds (s), minutes (m), or hours (h).
Session restart on new UTM : If true, each time a new utm_source is detected in the URL during a session, a new session is automatically created โ meaning a new session_id value is generated. The new UTM values are then used to characterize the source of this new session.
After saving
A account ID is created.
Datasets and tables are automatically created.
Javascript code and Server side template is now available.
Client-side Tag install
Quanti: Tag is an Event-based Tag. It can be integrated on a client-side server or a server-side server.
JS Library
The JS library has to triggered first before events.
Copy
<script type="text/javascript"> window._quantiDataLayer = window._quantiDataLayer || []; function _quantiTag() { _quantiDataLayer.push(arguments); } _quantiTag('trackerUrl', "https://api.tag.apiquanti.net/v1/ap/"); _quantiTag('domain', ".domain.com"); _quantiTag('accountId', {{Quanti Account ID}}); </script> <script async src="https://cdn.jsdelivr.net/gh/whatsonio/[email protected]/dist/src.min.js"></script>Domain and accountId has to personalize. Refer to your "Generated JS Code" on your "Tag Details" screen.
page_view
Copy
_quantiTag('hit', 'page_view', { {{custom_object}} });event
Copy
_quantiTag('hit', 'event', { {{custom_object}} });{{Custom_object}} fields reference
{custom_object} is optional.
Example of {{custom_object}} for a page_view hit (Also valid for event hit).
Copy
_quantiTag('hit', 'page_view', { user_id : "", conversion_id : "", conversion_value : "", conversion_type : "", consent : "", event_category : "", event_action : "", event_label : "", event_value : "", product_ids : "" });Server-side Tag install
To install the server-side tag, simply use the GTM template available for download here :
72KB
DownloadOpen
Fields configuration
Name
Type
Overridable
Exemple Value
Description
user_id
STRING
Yes
The ID used to recognize a logged-in user
conversion_id
STRING
Yes
ABCD1234
The unique ID of a conversion
conversion_value
STRING
Yes
123.45
The monetary value of the conversion
conversion_type
STRING
Yes
purchase
The conversion type
consent
STRING
Yes
analytics:yes;marketing:yes;retargeting:no
User consent collected
event_category
STRING
Yes
video
Typically the object that was interacted with
event_action
STRING
Yes
play
The type of interaction
event_label
STRING
Yes
spring campaign
Usefull to categorize events
event_value
STRING
Yes
42.23
Numeric value associated with the event
product_ids
STRING
Yes
[ { "product_id":"ID123", "price":"123.34", "quantity":"2", "amount":"246.68" } ]
products table with custom fields
datetime
STRING
Yes
2023-11-06T05:53:11
Datetime of the hit automatically set the tag but overridable if needed*
visitor_id
STRING
Yes
1hehirh3h0.d003ebc3
Visitor ID automatically set by the tag but overridable if needed*
session_id
STRING
Yes
45d01d5a-4df9-457d-9c6c-af7d707756f2
Visit ID automatically set by the tag but overridable if needed*
device_type
STRING
Yes
mobile
hit device type automatically set by the tag but overridable if needed*
url
STRING
Yes
The page that loaded the hit automatically set by the tag but overridable if needed*
referrer
STRING
Yes
The page from which the visitor comes automatically set by the tag but overridable if needed*
user_agent
STRING
Yes
Mozilla/5.0 (iPad; CPU OS 17_0_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko)
Informations of your browser automatically set by the tag but overridable if needed*
ad_user_data
STRING
Yes
granted or denied
Controls the sending of user-identifiable data for advertising purposes.
ad_personalization
STRING
Yes
granted or denied
Controls the use of data for personalized advertising (e.g., remarketing, audience targeting).
ad_storage
STRING
Yes
granted or denied
Controls the use of local storage for advertising purposes (e.g., marketing cookies).
analytics_storage
STRING
Yes
granted or denied
Controls the use of storage for analytics data.
*Informations automatically available through the browser and retrievable in JavaScript in a client-side configuration must be manually retrieved in a server-side configuration.
