Overview

The user journey commences when a user selects a deal on the Skrz.cz - Vyhledávač dovolené website. Following this action user is redirected to a partner's website, either via a redirection script or directly to the deal detail page. The partner's website is responsible for creating a first-party cookie containing data provided by hit.skrz.cz. The user completes their journey on the partner's website, where a conversion code in JavaScript retrieves the first-party cookie's content along with conversion data.

Cookie creation

Two options exist for creating the first-party cookie: through a redirection script or within the partner's website layout for each request.

Redirection script

The provided PHP script from Skrz.cz must be placed in the public directory to facilitate redirection.

The script requires at least PHP 7.0 and curl extension to be installed.

Current versin can be seen here

Upon invocation, the script reads the query parameters 'skrz' and 'detail', as well as the cookie named 'skrzcc3'. It sends this data to hit.skrz.cz to obtain a new cookie value. Subsequently, the script sets the 'skrzcc3' cookie header with the provided value and redirects to the tour detail from the query parameters.

The response from this script typically resembles the following:

Status Code: 302 Found
Location: {partner_domain}{decoded_detail_url}
Set-Cookie: skrzcc3={cookie_value}; expires={cookie_expiration}; Max-Age=7862400; path=/; Domain={cookie_domain};

Configuration

const DOMAIN = 'https://partner.com'; // avoid referal fraud
const COOKIE_DOMAIN = '.partner.com';
const IDENT = 'server-ident'
const REQUEST_TIMEOUT = 2000; // in case of timeout cookie is not set but user is redirected

Partner’s website

In scenarios where the partner cannot or chooses not to integrate the provided script into its website, it must replicate the script's logic on each page where Skrz.cz - Vyhledávač dovolené may redirect traffic, typically the tour detail page.

To obtain the cookie value, an endpoint needs to be called:

curl --location 'https://hit.skrz.cz/cookie?ident={partnerIdent}&skrz={query_value}[&current={skrzcc3_value}]'
The parameter current={skrzcc3_value} is optional in the request.

This endpoint returns a JSON object containing the new cookie value and its expiration:

{
  value: "example_hashed_value",
  cookieName: "skrzcc3",
  expiration: 1735689600 //Unix timestamp
}

Conversion part

No mandatory changes are required on the partner's site. A new analytics.js script will be deployed to read the 'skrzcc3' cookie and transmit its content to the conversion pairing.

An alternative option allows manual injection of the cookie value to enable the use of different storage mechanisms like database or local storage on the partner’s website.

Full Example

<script>
(function (m,u,j,s,k,r,z){m['SkrzAnalyticsObject']=k;m[k]=m[k]||function(){
(m[k].q=m[k].q||[]).push(arguments)},m[k].l=1*new Date();r=u.createElement(j),
z=u.getElementsByTagName(j)[0];r.async=1;r.src=s;z.parentNode.insertBefore(r, z)
})(window, document, 'script', '//muj.skrz.cz/analytics.js', 'sa');
sa("create",  "<IDENTIFIKÁTOR SERVERU>");
sa("addItem", {"itemId":"POBYT-0125-DOSPELY","unitPrice": "2800.00","quantity":"1","totalPrice":"2800.00"});
sa("addItem", {"itemId":"POBYT-0125-DOSPELY","unitPrice": "2800.00","quantity":"1","totalPrice":"2800.00"});
sa("addItem", {"itemId":"POBYT-0126-DITE","unitPrice":"2000.00","quantity": "1","totalPrice":"2000.00"});
sa("addItem", {"itemId":"DOPRAVA-0128","unitPrice":"1500.00","quantity": "1","totalPrice":"1500.00"});
sa("setSkrzcc", {"<COOKIE VALUE>"); //only for cases with storage different from cookies
sa("send", {"transactionId":"OBJ-23412","isPaid":"1","grandTotal":"9100.00","currency":"CZK"});
</script>

Skrz.cz s.r.o. (2024) Všeobecné obchodní podmínky | Pravidla pro zveřejňování nabídek