Hi ! h_title
Support
Home
Developers
Features
Features

Profile key

In Tweakwise's Personal Merchandising, selecting the source for the 'profile key'—a unique identifier like customerID or cookieID—is left to you. While non-authenticated users are typically tracked using a cookie-based ID, once a user logs in, switching to an account-specific ID is recommended. 

Product key

The 'product key' should correspond to Tweakwise's product number. For features like personalized feeds.

To start using the Personal Merchandising's personal features, such as personal feed, last viewed and previously bought, you need to follow the following steps:

1. Push data to Tweakwise

2. Retrieve data from Tweakwise

Step 1: Push data to Tweakwise

You push the data to the Tweakwise Analytics API using a Javascript plugin. Place the plugin on your site using GTM and push the data that comes into GTM through to the API using the scripts below.

Tracking Script

Place the tracking script on all pages where data needs to be tracked. The tracking script needs to be placed before the push.


var tweakwiseKey = 'NAVIGATOR_KEY';

var profileKey = 'PROFILE_KEY';

(function(w, d, l, i, p, u) {

      w['_twa'] = l;

      w[l] = w[l] || [];

      w[l].push({ 'twa.start': new Date().getTime(), event: 'twa.js' });

      w[l].push({ 'twa.instance': i, event: 'twa.init' });

      w[l].push({ 'twa.profile': p, event: 'twa.profile' });

      var f = d.getElementsByTagName('script')[0],

      j = d.createElement('script');

      j.async = true;

      j.src = u;

      f.parentNode.insertBefore(j, f);

  
})(window, document, 'tweakwiseLayer', tweakwiseKey, profileKey, "//navigator-analytics.tweakwise.com/bundles/scout.js");

Tracking Methods

There are two methods for pushing data to the Tweakwise Analytics API:

Product View

The Product View method is meant to measure the views of a product. The push works as follows:

tweakwiseLayer.push({

      event: 'productView',

      data: {

            profileKey: 'XXX',

            productKey: 'AA-43242312-1'

      }

});

Purchase

The Purchase method is meant to measure orders. The push works as follows:

tweakwiseLayer.push({

      event: 'purchase',

      data: {

            profileKey: 'XXX',

            productKeys: ['AA-43242312-1', 'AA-43242312-2', 'AA-43242312-3']

      }

});

Search

The Search method is meant to measure search queries. The push works like this:

tweakwiseLayer.push({

      event: 'search',

      data: {

            profileKey: 'XXX',

            searchTerm: 'Brabantia'

      }

});

Step 2: Retrieving data from Tweakwise

You need to retrieve the processed data from Tweakwise in order to show it in your shop. You can do this by building a parameter into all relevant pages.

See https://developers.tweakwise.com/ under Navigation for further information.

We've made the retrieval of data extra easy for Magento users.

The Personal Merchandising feature is supported from Tweakwise extension version 3.3.0. We've added a new module to the extension: Personal Merchandising:

When you set it to 'Yes', you can also set in which cookie the profile key is saved:

This should be the same profile key as the one you've supplied in step 1's tracking script.


Has reading the relevant articles not helped you?

Share article

Link copied to clipboard

Cookies

We are using cookies.

Want to know more? Take a look at our cookie statement.

The Livechat uses trackingcookies, do you accept these cookies?

Accept