Skip to main content

Overview

Tracking methodsโ€‹

To track user actions, Linkster offers two tracking methods: Sale conversion tracking and lead conversion tracking.

Lead conversion trackingโ€‹

Choose this tracking method if you want to track any kind of leads like account registrations, newsletter sign-ups, event bookings or simple sales.

Lead tracking requires very little data, which makes it flexible and easy to use.

Linkster recommends tracking sales with the specially designed sale conversion tracking method. However, if you want to track simple sales or don't have all the required order information for sale conversion tracking, it is possible to track sales with lead tracking. Just be aware that you will get fewer insights, as if you were using sale conversion tracking.

Sale conversion trackingโ€‹

If you want to track sales from your online store, you should always use sale conversion tracking, as it will give you more detailed sale insights than lead tracking.

With sale conversion tracking you will not only track the total turnover of an order but also its shopping basket which gives you the ability to trace which influencer sells which products.

Accessing the EMID valueโ€‹

Sooner or later, you will reach a point where you need to access the value of the EMID. Therefore, it is handy to know at which places the EMID value gets stored:

  1. In LocalStorage as an item named emid
  2. As a cookie named emid on the current sub and root domain
info

If you don't know what the EMID parameter is, you can find the intro and explanation about it here.

The user tracking container script tries to store the EMID in a cookie for every part of the current hostname. For example:

On https://shop.example.com, a cookie for domain=shop.example.com and domain=example.com will be created.

Linkster stores the EMID at two places for better redundancy and to provide an option for cross hostname tracking. However, if you are using the cookie method, be careful, as browser manufacturers may eventually prohibit setting cookies on domain names from subdomains. You can find another solution for this problem here.

Therefore, you want to favor the EMID stored in local storage over the one stored in cookies.

Exampleโ€‹

This example shows an IE11-safe way of accessing the EMID parameter value:

/* imagine an EMID of value `test` is set. */

var cookieEmid = document.cookie.match(/emid\=([a-zA-Z0-9\-\_]+)/i);
// look for the EMID in localStorage first and then in the cookie.
var emid = window.localStorage['emid'] || (cookieEmid === null || cookieEmid === void 0 ? void 0 : cookieEmid[1]);

console.log(emid); // test

EMID and voucher code attributionโ€‹

Besides the EMID you are also able to send a voucher code string for every tracking request. To increase tracking accuracy and to use the voucher code tracking feature in Linkster you must always pass the voucher code string to every Linkster tracking requests if one is present.

For more information on how to send a voucher code string with a Linkster tracking request, see the appropriate lead conversion tracking or sale conversion tracking guide.

You can also send a tracking request with an EMID and a voucher code. Linkster will handle the correct attribution for you.

info

Alway send the EMID and voucher code string if they are present.

Voucher code cleaningโ€‹

Voucher code strings should always be sent URL encoded to Linkster. If you are sending the tracking request in a browser environment, you can simply use encodeURIComponent:

encodeURIComponent("SAVE10%");
// SAVE10%25

Multiple voucher codesโ€‹

If you want to pass more than one voucher code string to a tracking request, you can join them together with a ,.

For example: TEST10,SUMMER15,SAVE20.

Sending tracking requestsโ€‹

Linkster strongly advises you to send a tracking requests for every sale made in your web store, even if no EMID or voucher code is present.

Otherwise, Linkster will not be able to detect whether tracking gaps are intentional or unintentional, which makes it almost impossible to solve tracking issues.

info

Always send every sale made in your online store to Linkster. Do not make the sending of a tracking request dependent on whether a voucher code or EMID is present.

Tracking across multiple hostnames or domain namesโ€‹

The touchpoint (tracking link target) and conversion (sale or lead tracking request) can either happen on the same hostname or be spread across multiple hostnames/domain names.

If the touchpoint and conversion requests happen on the same hostname, you don't need to worry about this section, e.g.:

graph LR a1[User clicks on<br/>Linkster link]-.->|Redirects to<br/>link target|a2 a2-.->a3 a3-.->a4 a4-.->a5 a5-.->|HTTP GET<br/>https://trck.linkster.co/trck/ebasket/|a6 subgraph www.example.com subgraph / a2[Touchpoint] end subgraph /products/xyz a3[User navigates<br/> through store] end subgraph /checkout a4[User proceeds<br/>to checkout] end subgraph /thank-you a5[Sale conversion<br/> script fires] end end a6[Linkster<br/>Tracking API]

However, if the touchpoint and conversion happen on different hostnames or domain names, e.g.:

graph LR a1[User clicks on<br/>Linkster link]-.->|Redirects to<br/>link target|a2 a2-.->a3 a3-.->a4 a4-.->a5 a5-.->|HTTP GET<br/>https://trck.linkster.co/trck/ebasket/|a6 subgraph www.example.com/ a2[Touchpoint] end subgraph shop.example.com/products/xyz a3[User navigates<br/>through store] end subgraph checkout.example.com subgraph / a4[User proceeds<br/>to checkout] end subgraph /thank-you a5[Sale conversion<br/>script fires] end end a6[Linkster<br/>Tracking API]

You have to make sure that the EMID, which gets stored in the touchpoint's local storage (www.example.com), is accessible to the sale or lead conversion script (checkout.example.com).

Since local storage is scoped to the hostname where its value was set from, it is not possible for the conversion script on checkout.example.com to access the EMID value from www.example.com. Therefore, you are responsible for making the EMID available to the conversion script, if you are tracking across multiple hostnames or domain names.

Here are two possible solutions for carrying the EMID over multiple hostnames/domain names:

  1. If the touchpoint and conversion happen on different hostnames, but on the same domain name, like www.example.com and checkout.example.com, where example.com is the domain name, you can access the EMID value from cookies. The user tracking container script stores the EMID value in addition to the local storage also in cookies.

  2. If the touchpoint and conversion happen between different domain names, like example.com => example-shop.com => example-checkout.com, you have to manually hand over the EMID to each new domain name URL. This can be done by:

    1. Implementing the user tracking container script on each domain name
    2. Appending the EMID value as a URL parameter (?emid=XXX) to any URL that redirects to a new hostname/domain name.

    Don't do โŒ:

    1. https://example.com?emid=XXX <- Touchpoint
    2. https://example-shop.com/
    3. https://example-shop.com/products/xyz
    4. https://example-checkout.com/
    5. https://example-checkout.com/thank-you <- EMID wasn't carried over, track is lost.

    Do โœ…:

    1. https://example.com?emid=XXX <- Touchpoint
    2. https://example-shop.com?emid=XXX <- EMID carryover
    3. https://example-shop.com/products/xyz
    4. https://example-checkout.com?emid=XXX <- EMID carryover
    5. https://example-checkout.com/thank-you <- EMID was carried over, conversion gets successfully attributed.

Tracking pricesโ€‹

All prices sent to Linkster should be net prices with deducted discounts. Read more about on how to calculate net prices with deducted discounts here.

Content Security Policy (CSP)โ€‹

If your site enforces CSP, you need to add the following entries to your CSP configuration to make Linkster tracking work correctly:

DirectiveDomain
script-srctrck.linkster.co
connect-srctrck.linkster.co