Rejoiner JavaScript API
The Rejoiner API is an optional add-on to your Rejoiner tracking and conversion code to allow for more flexibility and additional relevant data to be used in email campaigns and success metrics. All API calls must be formatted exactly as seen below and they must be placed below the required Rejoiner tracking and/or conversion JavaScript include tags.
Documentation for the "addCartData" API Reference
| Reference |
Attribute |
Required |
Type |
Notes |
| addCartData |
email |
No |
String |
This is the email address of the customer who is visiting your site |
| addCartData |
returnUrl |
No |
String |
This is the unique url where an individual customer should return to continue checkout |
| addCartData |
totalItems |
No |
Integer |
The total numbers of items in the cart |
| addCartData |
value |
No |
Integer |
This is the total value of the cart in CENTS. (e.g. 5999 = $59.99) |
Documentation for the "addCartItems" API Reference
| addCartItems |
product_id |
Yes |
String |
This value should be a unique product identifier from your system. |
| addCartItems |
name |
No |
String |
This is the title of the product being added to the cart. |
| addCartItems |
description |
No |
String |
This is a description of the product being added to the cart. |
| addCartItems |
price |
No |
Integer |
This is the price of the specific item being added to the cart in CENTS. (e.g. 5999 = $59.99) |
| addCartItems |
image_url |
No |
String |
This is a url linked to the product image for the specific item being added to the cart. |
Sample API Usage
<!-- Rejoiner Tracking JavaScript -->
<script type="text/javascript" src="/path/to/rejoiner"></script>
<!-- Rejoiner JavaScript API -->
<script type="text/javascript">
var rejoiner = rejoiner || [];
//shopping cart data
rejoiner.addCartData = [
{
email : "customer@email.com",
returnUrl : "https://mystore.com/?myUniqueID=abc123",
totalItems : 3,
value : 5999
}
];
//individual cart item data
rejoiner.addCartItems = [
{
product_id : "abc123", //required
name : "Product Title",
description : "A description of the product",
price : 5999,
image_url : "http://mystore.com/items/item1.jpg"
}
];
</script>