Setting up Web Tracking
The difference between a generic tracker or a shop tracker lies in the parameters that are defined. For a generic tracker, you can define all parameters yourself but for a shop tracker these parameters are fixed. As a result you will have a more structured reporting on a shop tracker.
Create the Selligent Webtracker
The goal of creating the Selligent webtracker is to ensure that an additional parameter is added to the URL of all domains that need to be tracked. This parameter contains data about the user and will be processed by a script and generate cookies.
To add a new Tracker, press the button.
The following fields can be configured:
- Name — Enter a unique name for the tracker.
- Domains — Enter all of the domains on which this tracker should be applied. By setting one or more domains here, the tracker will only be used for those domains. You can set more than one domain. Separate the different domains with a semicolon.
- Move parameters to the front— When this option is selected, parameters are placed at the beginning of the Querystring. When using a tracker, Selligent parameters are, by default, added at the end of the URL. But sometimes this results in very long URLs and not all CMS systems support them. With this option, you can ensure that the Selligent parameters are always included in the URL.
Activate the Selligent webtracker by toggling the option on.
When done, click Save.
Create a tracking script
The tracker script holds the information of what should be tracked on the website. When the script is created it can easily be placed on the website pages where the information is tracked on what has been purchased, how much, for what price or any other information you might need.
The parameters in the script will then be populated with the right values when a user lands on a page with that script and the data is returned to Selligent where it provides insight.
To create a tracker script:
1. Click the button in the Tracker Scripts section. The following dialog is displayed:
2. start by setting the following properties:
Name and description — Provide a clear name and description for this tracker script.
Ignore 'Do not track header' — A user can set a tracking preference in his browser indicating if he wants to receive personalized content or if he prefers privacy above tracking. If the option is checked, the preference of the user is ignored and they are tracked anyway.
Parameters — These are predefined parameters that are specific to a shop tracker. The reason is that specific structured reports for shop tracking can only be made if we know exactly what the parameter stands for. So define the parameters that will be captured by the script here.
- ProductID — Value for Product ID (optional) => free text value; example 158A452
- QTY — Value for quantity (optional) => integer; example 57
- PRICE — Value for price (mandatory) => real number value for price in euros. The separator is a dot. Example 4.20. Note that this value must be the total price over all products.
- PAYMENT_TYPE — Value for Type (optional) => free text ; example MASTERCARD
- CATEGORY — Value for Category (optional) => free text ; example: Business
- TRANSACTIONID — Value for Transaction (optional) => free text ; example: 455441-hgfir
- CUSTOMER_NUMBER — Value for Customer (optional) => free text ; example: 4455875ADGEE
- CURRENCY — Value for currency (optional) => free text (GBP, EUR, USD or CAD)
Target list — The audience for which this information is gathered and stored.
Ignore anonymous requests received on this link — Tracking is about placing cookies on the user side and using those cookies to gather information. When you choose to ignore anonymous requests then invalid cookies (cookies that have no identity set by Engage) are not taken into account.
3. Save the configuration.
4. When you open the Tracker Script configuration again, click the 'Script' button in the toolbar in order to get the JavaScript code that has to be placed on the external website pages.
Note: Information is provided on the domains for which the tracker script can be used. The list of domains is based on the domains specified for the webtrackers defined in the previous section.
It’s advised to create a different tracker script for each journey, since the parameters are custom-defined and may be different from one journey to another.
Adding JavaScript code to external page
All landing pages must be tagged with the JavaScript code that is generated by the tracking script. There are two possible methods:
- Method1 — first loads the JavaScript library, then calls the ma_track() function afterwards.
- Method2 — is optimized and loads the JavaScript library asynchronously after the global variables are filled with trackdata.
NOTE: Both methods are supported but CANNOT be combined.
Without parameters:
Method1:
<SCRIPT SRC="http://demo.emsecure.net/optiext/webtracker.dll"></SCRIPT>
<SCRIPT>ma_track();</SCRIPT>
Method 2:
<SCRIPT>
var
trackdata = trackdata || [];
(function
(d, s, id) {
var
js, sjs = d.getElementsByTagName(s)[0];
if
(d.getElementById(id)) return;
js
= d.createElement(s); js.id = id;
js.src
= "//demo.emsecure.net/optiext/webtracker.dll";
sjs.parentNode.insertBefore(js,
sjs);
}(document,
'script', 'webtracker'));
</SCRIPT>
Parameters from the “ma_track” call have been removed because the cookie won’t be written if they were specified.
All pages that need to be tracked must contain the full JavaScript code (don’t forget to replace the parameters in the function call):
With parameters:
Method1:
<SCRIPT SRC="http://demo.emsecure.net/optiext/webtracker.dll"></SCRIPT>
<SCRIPT>
ma_track('aOcqflias','Value for CUSTOMERNUMBER','Value for SHOPPINGBASKET','Value
for TOTALSALE');
</SCRIPT>
Method2:
<SCRIPT>
var trackdata = trackdata || [];
trackdata.push('aOcqflias');
trackdata.push('Value for CUSTOMERNUMBER');
trackdata.push('Value for SHOPPINGBASKET');
trackdata.push('Value for TOTALSALE');
(function
(d, s, id) {
var
js, sjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id
= id;
js.src = "//demo.emsecure.net/optiext/webtracker.dll";
sjs.parentNode.insertBefore(js,
sjs);
}(document, 'script', 'webtracker'));
</SCRIPT>
NOTE: When parameters
are sent, thanks to the JavaScript, all values are considered as text.
This means that, for instance, when a price value of 25,00 is communicated,
the system will convert this according to the regional settings. If regional
settings define a comma to separate thousands and a dot to indicate decimals,
the 25,00 value will be converted into 2500.
To avoid wrong conversion, data should transferred in a format according
to the database regional settings.
Note that it is possible to add a callback function once the webtracker script is loaded. To be able to use this callback function, the following global function name must be used: webtrackerCallback
Example:
Function webtrackerCallback()
{
//some javascript code that will be processes when the webtracker is loaded
}
This function can be placed anywhere.
IMPORTANT NOTE: The following configuration must be executed in Marigold Engage Configuration.
Verifying configuration
- Check if the webtracker.dll is installed on the Selligent Environment.
- Check if the external pages have the correct JavaScript code by checking their source code.
- Clean cookies off the browser, then send a test email and test the entire journey.
- Afterwards, check if an entry into the “Webtrack” table has been inserted.
If all those checks are valid, the Selligent web tracking configuration is complete.