Setting up Tracking

You are here:

Tracking is an effective function if you would like to collect information about what actions your contacts take on your website when they come from your newsletter.

Setup requirements

In order to set up tracking in MarketingPlatform, you must upload a sitemap – if you have a shop, you must also upload a product feed.

Your sitemap must be in xml format, i.e., domain.xml

Your sitemap or product feed is uploaded under “integration – feed cache”.

More about feed cache here.

Tracking setup

In the menu on the left, you will find Tracking – create tracking > Name your tracking.

If you wish, you can edit how long your LeadScores should be kept. The period must reflect your purchase process. If you sell pencils, your period must be shorter than if you sell cars.

You can also define the LeadScore of other actions here if our default does not make sense in your case. Press next when you are done with your settings.

A screenshot from the interface of MarketingPlatform picturing the instructions for setting up tracking.

On the next page, connect your sitemap and product feed and generate the script to be used on your website.

Choose which list you want the tracking to be set up with. Select the product feed – if you do not have one, use the little toggle and deselect the feed to be used.

A screenshot from the interface of MarketingPlatform picturing the instructions for setting up tracking.

Enter your website URL and select your sitemap. You can click on test sitemap and see if it reads correctly. If you have a webshop, this is where you can manually add your purchase pages to the setup. These are usually not to be found in your sitemap.

Press next, when you are ready for the next step.

On the last page of the setup, you need to map the different pages in your sitemap and any product feed.

A screenshot from the interface of MarketingPlatform picturing the instructions for setting up tracking.

Product link (URL), product category (primary) and product unique identifier (ID) are required to map if you have a webshop. Map as much as possible and press save when you are done. You can always come back and map more.

You now need to take the tracking script and implement it on your website. You might also need to implement custom events like “add to cart, remove from cart etc.” manually in your webshop.

 

Custom events:

Add To Cart

var data = {}; 
data['empattr_id'] = %%PRODUCT ID%%; 
data['empattr_qty'] = %%PRODUCT QUANTITY%%; 
data['leadscore'] = %%LEADSCORE VALUE%%; 
_empTrack.action('addtocart',0,data);


Remove From Cart

var data = {}; 
data['empattr_id'] = %%PRODUCT ID%%; 
data['empattr_qty'] = 0; 
data['leadscore'] = %%LEADSCORE VALUE%%; 
_empTrack.action('rmfromcart',0,data);


Empty Cart

var ts = Math.round((new Date()).getTime() / 1000);"; 
var data = {}; 
data['empattr_actiontime'] = ts; 
_empTrack.action('updatecartstart',0,data);


Update Cart Items

var ts = Math.round((new Date()).getTime() / 1000);"; 
var data = {}; 
data['empattr_actiontime'] = ts; 
_empTrack.action('updatecartstart',0,data); 


--------ITERATE THIS CALL FOR EACH ITEM THAT NEED TO BE UPDATED IN CART-------- 
var data = {}; 
data['empattr_id'] = %%PRODUCT ID%%; 
data['empattr_qty'] = %%PRODUCT QUANTITY%%; 
data['empattr_actiontime'] = ts; 
_empTrack.action('updatecart',0,data); 
-------------------------------------------------------------------------------

Custom Event

var data = {}; 
_empTrack.action('%%CUSTOM EVENT NAME%%',1,data
Was this article useful?
No 0
Article views: 85