Skip to content

WP Pixel installation

Installation of WP Pixel on the website

To install WP Pixel, add the code below in the <head> section on each page of the website. Replace CLIENT_ID in 2 last rows with the ID linked with your shop. Moreover, script allows to add additional parameters (ADDITIONAL_PARAMETERS). Parameters identifying the user are not mandatory, but both HEM and LTID will allow you to activate campaigns in an environment without Third-Party Cookies - currently on Safari and Firefox browsers, but in the future also Chrome.

<head>
    <script>
        !function(w,p,e,v,n,t,s){w['WphTrackObject'] = n;
        w[n] = window[n] || function() {(w[n].queue=w[n].queue||[]).push(arguments)},
        w[n].l = 1 * new Date(), t=p.createElement(e), s=p.getElementsByTagName(e)[0],
        t.async=1;t.src=v;s.parentNode.insertBefore(t,s)}(window,document,'script',
        'https://pixel.wp.pl/w/CLIENT_ID/tr.js', 'wph');
        wph('init', 'CLIENT_ID', ADDITIONAL_PARAMETERS);
    </script>
</head>

After implementing the embed script, proceed to the next step, which is the implementation of event codes:
e-commerce industry
non e-commerce industry

Additional parameters

The script allows additional parameters to be provided in the optional configuration object:

  • em - user's e-mail, normalized and hashed according to the guidelines. If you provide an e-mail address in the original form, the script will normalize and hash before sending the events.
  • ltid (long-term id) - unique, text user identifier (non-empty string). Script before sending the event will remove whitespace from the beginning and the end of the identifier.
  • ltid_name - if ltid is stored in a cookie, the script can extract this value itself and send it in the event. You should then provide the name of the cookie in this parameter. If the correct ltid parameter is provided, this parameter (ltid_name) will be ignored. Both the cookie name and value should be non-empty text (string).

Embedding examples with additional parameters

Embedding without additional parameters

<head>
    <script>
        !function(w,p,e,v,n,t,s){w['WphTrackObject'] = n;
        w[n] = window[n] || function() {(w[n].queue=w[n].queue||[]).push(arguments)},
        w[n].l = 1 * new Date(), t=p.createElement(e), s=p.getElementsByTagName(e)[0],
        t.async=1;t.src=v;s.parentNode.insertBefore(t,s)}(window,document,'script',
        'https://pixel.wp.pl/w/CLIENT_ID/tr.js', 'wph');
        wph('init', 'CLIENT_ID');
    </script>
</head>
Embedding with hashed e-mail address (em parameter)
<head>
    <script>
        !function(w,p,e,v,n,t,s){w['WphTrackObject'] = n;
        w[n] = window[n] || function() {(w[n].queue=w[n].queue||[]).push(arguments)},
        w[n].l = 1 * new Date(), t=p.createElement(e), s=p.getElementsByTagName(e)[0],
        t.async=1;t.src=v;s.parentNode.insertBefore(t,s)}(window,document,'script',
        'https://pixel.wp.pl/w/CLIENT_ID/tr.js', 'wph');
        wph('init', 'CLIENT_ID', {em:
        'f02f61d33aac1c8d56813d668299b33d05aa99adf2056c1950f688459da1a465'});
    </script>
</head>
Embedding with user id (ltid parameter)
<head>
    <script>
        !function(w,p,e,v,n,t,s){w['WphTrackObject'] = n;
        w[n] = window[n] || function() {(w[n].queue=w[n].queue||[]).push(arguments)},
        w[n].l = 1 * new Date(), t=p.createElement(e), s=p.getElementsByTagName(e)[0],
        t.async=1;t.src=v;s.parentNode.insertBefore(t,s)}(window,document,'script',
        'https://pixel.wp.pl/w/CLIENT_ID/tr.js', 'wph');
        wph('init', 'CLIENT_ID', {ltid: '48b69fcca1d29075b14b8aef0'});
    </script>
</head>
Embedding with multiple additional parameters (ltid_name and em)
<head>
    <script>
        !function(w,p,e,v,n,t,s){w['WphTrackObject'] = n;
        w[n] = window[n] || function() {(w[n].queue=w[n].queue||[]).push(arguments)},
        w[n].l = 1 * new Date(), t=p.createElement(e), s=p.getElementsByTagName(e)[0],
        t.async=1;t.src=v;s.parentNode.insertBefore(t,s)}(window,document,'script',
        'https://pixel.wp.pl/w/CLIENT_ID/tr.js', 'wph');
        wph('init', 'CLIENT_ID', {em: 'user@test.com', ltid_name: 'ID_COOKIE_NAME'});
    </script>
</head>

Normalization of e-mail addresses

E-mail address normalization aims to standardize and unify the input data, towards improving the consistency of the hashing process. Correct normalization of e-mail addresses helps maintain the uniformity and uniqueness of the input data, which translates into improved security and effectiveness of the identification process.

To normalize your e-mail address, follow these steps:

  • remove spaces from the beginning and from the end of the address;
  • convert all ASCII characters to lowercase;
  • in e-mail addresses from the gmail.com domain remove the following characters from the username part of the e-mail address:

    dot . e.g. jan.smith@gmail.com should be changed to jansmith@gmail.com;

  • remove the + sign and all following characters from the username part of the e-mail address:

    e.g. jansmith+newsletter@wp.pl should be replaced by jansmith@wp.pl.

Hash encoding of e-mail addresses

The e-mail address normalization method is intended to enable IT systems to securely store and analyze user identification information. Hashing, which is the process of transforming input data (including e-mail addresses) into a unique string of characters of a fixed length, allows for effective secrecy of the original data while maintaining its uniqueness.

Identifying hashed e-mail addresses is a key part of information security practices. Introducing hashed versions of e-mail addresses allows systems to store identifying information in a way that minimizes the risk of privacy breaches.

The normalized e-mail address should be hashed with the SHA-256 hashing algorithm. The hashed e-mail address should be a hexadecimal string of characters.