Rekko Tagging Instructions

Step One: Basic Tags
These tags are loaded by the Web browser as visitors come to your website and are used as a tracking script/pixel to record the actions of your visitors. These same tags also serve to deliver Rekko’s dynamic and intelligent custom marketing content. After signing up, you should have received an email with Rekko’s tagging instructions and JavaScript code. The version you received in your email has the portions in RED already customized for your particular account. It’s important to tag ALL pages of the website. This is most easily accomplished by adding the tags to your site’s template files. Please copy and paste the code anywhere after the first tag but before the closing tag. Be careful to avoid placing this script within other HTML tags; e.g. form, map, or script.
<script type="text/javascript">
var cvtSiteName = "YOUR SITE NAME";
var cvtJsHost = "https://use.rekko.com/";
document.write(unescape("%3Cscript src = '" + cvtJsHost + "setup.js' type = 'text/javascript' %3E%3C/script%3E"));
</script>
<script type="text/javascript">
if(!window.convert_cart){
window.convert_cart={};
convert_cart.shoppingCartItems=new Array();
}
if(!window.convert_profile){
window.convert_profile = {};
}
window.convert = new Convert("YOUR SITE ID");
convert._init();
</script>
<script type="text/javascript">
document.write(unescape("%3Cscript src = '" + cvtJsHost + cvtSiteName + "/extras.js' type='text/javascript'%3E%3C/script%3E"));
</script>

Step Two: Product Page Tagging
Tagging product pages allows Rekko to collect information for Rekko Recommendations. Please note that if your website has multiple templates, or a different page for each product, you must add this script to every page/template individually. Text in RED should be replaced with the appropriate values.
<script type=”text/javascript”>
window.convert_productCode=”SKU”;
window.convert_productCategory=”CATEGORY1, CATEGORY2, CATEGORY3″;
</script>

if the variables window.convert_productCode and window.convert_productCategory are populated before convert._init is called then they will be picked up by Rekko automatically..
if the variables window.convert_productCode and window.convert_productCategory are populated after convert._init is called, then call convert.track() method to update these values to Rekko servers. the code looks like follows
<script type="text/javascript">
if(window.convert && window.convert.track) {
convert.track();
}
</script>

Step Three: Shopping Cart/Checkout Tagging
Shopping Cart tags enable Rekko to collect transaction and e-commerce data for reporting, recommendation, and profiling engines. Unlike Web analytics applications that may only tag the final Order Confirmation page, Rekko captures data from each stage of transactional process. All data gathered from any stage of the transaction is stored in the individual visitor’s record which can be used to define Rekko campaigns. Be sure to tag each page in the checkout process, including Order Confirmation, with the following tags. Text in RED should be replaced with the appropriate values.
<script type="text/javascript">
if (!window.convert_cart) {
window.convert_cart = {};
convert_cart.shoppingCartItems = new Array();
}
/*loop start*/
var convert_item = {};
convert_item.sku = "SKU";
convert_item.category = "CATEGORY";
convert_item.quantity = "QUANTITY";
convert_item.price = "PRICE";
convert_cart.shoppingCartItems.push(convert_item);
/*loop end*/
convert_cart.totalCost = "TOTAL_COST";
convert_cart.taxes = "TAXES";
convert_cart.discount = "DISCOUNT";
convert_cart.shipping = "SHIPPING";
convert_cart.promoCode = "PROMO_CODE";
</script>

if the cart variables are populated before convert._init is called then they will be picked up by Rekko automatically..
if the variables are populated after convert._init is called, then call convert.track() method to update these values to Rekko servers. the code looks like follows
<script type="text/javascript">
if(window.convert && window.convert.track) {
convert.track();
}
</script>

Step Four: Order Confirmation Page Tagging
In addition to the shopping cart and checkout page tagging, the Order Confirmation page should include the last script block in order to collect Order ID and “purchased is true.” The latter informs Rekko that a transaction has been completed. Text in RED should be replaced with the appropriate values.
<script type="text/javascript">
if (!window.convert_cart) {
convert_cart = {};
}
convert_cart.orderId="ORDER_ID";
convert_cart.isPurchased=true;
</script>

if the order confirmation variables convert_cart.orderId and convert_cart.isPurchased=true are populated before convert._init is called then they will be picked up by Rekko automatically..
if the variables are populated after convert._init is called, then call convert.track() method to update these values to Rekko servers. the code looks like follows
<script type="text/javascript">
if(window.convert && window.convert.track) {
convert.track();
}
</script>

Step Five: Visitor Information Tagging
Visitor Profiling data is always great to have to know who’s coming to your site. The below tags should be placed on pages where the information is available. The checkout process and login pages are just a couple examples of where these tags should be placed. Text in RED should be replaced with the appropriate values.
<script type="text/javascript">
if(!window.convert_profile){
window.convert_profile={};
}
convert_profile.firstName="FIRSTNAME";
convert_profile.lastName="LASTNAME";
convert_profile.email="EMAIL";
convert_profile.login="LOGIN";
</script>

if the visitor information variables are populated before convert._init is called then they will be picked up by Rekko automatically..
if the variables are populated after convert._init is called, then call convert.track() method to update these values to Rekko servers. the code looks like follows
<script type="text/javascript">
if(window.convert && window.convert.track) {
convert.track();
}
</script>

Optional: Additional Values and Custom Tags
While it is not necessary to tag for all values in Rekko Full Tags, it is helpful. The below tags may be used should you wish to pass additional data about your visitors to Rekko. Doing so will allow you to utilize Custom Profiles. Text in RED should be replaced with the appropriate values.
<script type="text/javascript">
if(!window.convert_profile){
window.convert_profile={};
}
convert_profile.zipcode="ZIPCODE";
convert_profile.customertype="CUSTOMERTYPE";
convert_profile.customVariableName1="CUSTOM1";
convert_profile.customVariableName2="CUSTOM2";
/*This type of line can be repeated for any number of custom variables*/
</script>

if the visitor custom variables are populated before convert._init is called then they will be picked up by Rekko automatically..
if the variables are populated after convert._init is called, then call convert.track() method to update these values to Rekko servers. the code looks like follows
<script type="text/javascript">
if(window.convert && window.convert.track) {
convert.track();
}
</script>

Support for Ajax Shopping Carts

More and more shopping cart platforms allow visitors to add products to cart without having to go to the shopping cart page. It makes for a great shopping experience as visitors can just keep adding products to their cart.

If you utilize this type of shopping cart, or are thinking about moving your platform towards it, Rekko can accommodate your needs and make sure we’re capturing data each time someone adds to their cart from any page.

Why is this so useful? Knowing what a visitor adds to their cart and for how much gives you the opportunity to further personalize a visitor’s experience while they’re shopping. You’ll be able to up-sell or cross-sell with other products, display promotions geared towards what and/or how much was added, or even recommend products based on what they showed interest in.

Carts that support this functionality are using Ajax to add to cart without having to refresh the page or go to the cart page each time. We’ve laid out the steps below to help you get your site tagged for whenever a visitor clicks that add to cart button.

How to pass cart info to Rekko with your Ajax ‘Add to Cart’ Button

Upon clicking ‘Add to Cart’, update Rekko cart information by calling the following function without a page reload. At this point, campaigns scheduled to deliver after page load and upon adding to cart will be triggered.

<script type="text/javascript">
if(window.convert && window.convert.updateCart) {
convert.updateCart(@TOTALCOST@,@CONVERT_ITEM@);
}
</script>

Where @TOTALCOST@ refers to the total cost of the shopping cart after the product is added and @CONVERT_ITEM@ refers to the product with SKU, Category, Price, and Quantity.Both of these values are optional, of course. You could just pass Rekko the cart total, just the cart items info, or both. It’s up to you, but more is always better!

When passing the cart item information, SKU is mandatory.

Example of just cart total being updated: Where cart total is being updated to 500 in Rekko after someone clicks ‘Add to Cart.’

<script type=”text/javascript”>
if (window.convert && window.convert.updateCart) {
convert.updateCart(500);
}
</script>

Example of both cart total and cart item info being updated.

<script type=”text/javascript”>
if (window.convert && window.convert.updateCart) {
convert.updateCart(500, {sku:”msj012c”, category:”Men,New Arrivals,Blazers”,quantity:1,price:125});
}
</script>