Custom Integration: Remarkety

Steps on integrating Remarkety with Justuno using our custom route.

At a glance:

Introduction

Instructions

Identify, track, and subscribe

Last updated 6/15/2022

Introduction


Integrating Justuno forms with Remarkety is a simple and easy task, and shouldn't take you more than 5 minutes to implement. All you need to do is add a simple JS script to your website.

Instructions


Assuming you already have the Remarkety "website tracking" script installed, you will need to add the following script to the footer of your website (the same place where you add your Google Analytics code):

<script>
window.ju_custom_event = function(email, eventname, promotitle, step, cmid, options, data){
if (step==2 && email!=''){
window._rmData = window._rmData || [];
window._rmData.push(['setCustomer',{"email":email, "accepts_marketing": true, "tags": ['Justuno', 'Justuno - '+promotitle]}]);
var data = {"email": email, "tags": ['Justuno','Justuno - '+promotitle]};
window._rmData.push(['track', 'newsletter/subscribed', data]);
}
}
</script>

Passing SMS

window.ju_custom_event = function(email, eventname, promotitle, step, cmid, options, data){
var areaCode = "1"; // For US numbers. Change it to any other country
if (step==2 && email !=''){
window._rmData = window._rmData || [];
window._rmData.push(['setCustomer',{"email":email, "accepts_marketing": true, "tags": ['Justuno', 'Justuno - '+promotitle]}]);
var r_data = {"email": email, "tags": ['Justuno','Justuno - '+promotitle]};
for (var key in data){
if(data[key].name == "phone_number" && data[key].value != ''){
r_data["sms_phone_number_e164"] = e164format(data[key].value, areaCode);
}
if(data[key].name == "CountryCode"){
r_data["country_code"] = data[key].value;
}
}
window._rmData.push(['track', 'newsletter/subscribed', r_data]);
}
}
function e164format(string, areaCode) {
let newString = string.match(/[0-9]{0,14}/g);
if (newString === null) {return '';}
newString = newString.join('');
if (newString.startsWith(areaCode)) { newString='+'+newString; } else {newString='+'+areaCode+newString;}
newString = newString.substring(0, 15);
return newString;
}le

 

Identify, track and subscribe


The code will do 2 important things:

1. Identify and track the visitor on your website - Once the user is identified (by email address), Remarkety will track their shopping behavior on the website. For example, what products, categories or pages the customer is looking at. This will improve your Browse Abandonment and Cart Abandonment campaigns. 
This method will also help to identify and track more shopping carts even before the customer fills in his/her email address throughout the checkout funnel. You will be able to recover more carts that otherwise would have stayed anonymous! 

2. This code will automatically add the shopper to your Remarkety account with a "Justuno" tag, so you'll be able to segment and target these customers accordingly.

More identified users lead to bigger lists, more personal emails, and more conversions!

 

Visit Justuno @ Justuno.com