Giter VIP home page Giter VIP logo

reevoomark-java-api's Introduction

reevoomark-java-api

Build Status

Description

The ReevooMark-Java-Api is a Java tag library for ReevooMark customers who want to quickly and easily integrate Reevoo content into their sites server-side.

Other Languages

Tag libraries are also available for .NET, Ruby and PHP.

Features

  • Server-side inclusion of Reevoo content.
  • Included CSS for display of Reevoo content.
  • Server-side caching of content that respects the cache control rules set by Reevoo.

Support

ReevooMark support can be obtained by emailing [email protected].

There is also a bug tracker available.

Installation

The easiest way to get the latest compiled version of the Reevoo taglib is to download it from sourceforge:

  • Download the file from sourceforge
  • Add this file to your projects classpath

If you use Maven for your project add the following dependency to your pom.xml:

  <dependency>
    <groupId>com.reevoo.taglib</groupId>
    <artifactId>reevoo-taglib</artifactId>
    <version>1.11</version>
  </dependency>

Configuration

The library comes with a number of default configuration values used by some or all of the different tags.

  default.trkref=REV
  reevoo.badges.base.url=//mark.reevoo.com
  product.reviews.url=http://mark.reevoo.com/reevoomark%s%sembeddable_reviews
  conversations.url=http://mark.reevoo.com/reevoomark%s%sembeddable_conversations
  customer.experience.reviews.url=http://mark.reevoo.comreevoomark%s%sembeddable_customer_experience_reviews

The url properties point to the various endpoints in the Reevoo architecture and should not require changes from the customer.

You should change the default.trkref to your provided TRKREF given to by us. This will then be used throughout your web server wherever you use a Reevoo asset without specifying an alternative TRKREF.

For example:

  <reevoo:javascriptAssets/>

This will initialize our Reevoo JavaScript with the default.trkref. However if you want to set it you can with the following

  <reevoo:javascriptAssets trkref="WAH"/>

You may also override the default.trkref by creating a properties file named: reevooTaglibConfig.properties. This file must be added to the classpath of your application server, for example by adding the file to the folder WEB-INF/classes.

  default.trkref=WAH

Implementation

In any JSP page where you will be using Reevoo tags please ensure to include the taglib:

  <%@ taglib prefix="reevoo" uri="http://reevoo.com/java-taglib/v1" %>

You should include the Reevoo specific CSS in your header using the tag below

 <reevoo:cssAssets/>

You should include the Reevoo specific JavaScript at the bottom of your body, just before closing the body tag, using the tag below

  <reevoo:javascriptAssets/>

As before you may set an explicit TRKREF if you wish.

  <reevoo:javascriptAssets trkref="WAS" />

It also has support for multiple TRKREF'S.

  <reevoo:javascriptAssets trkref="WAS,CYS,REV" />

Standard Badges

Product Badge

To render "product badges" you can use any of the below. The sku is compulsory but trkref and variantName are optional.

Make sure to replace <SKU>,<TRKREF> and <VARIANT_NAME> with the appropriate values.

  <reevoo:productBadge sku="<SKU>" />
  <reevoo:productBadge sku="<SKU>" trkref="<TRKREF>"/>
  <reevoo:productBadge sku="<SKU>" variantName="undecorated"/>
  <reevoo:productBadge sku="<SKU>" trkref="<TRKREF>" variantName="stars_only"/>

Conversations Badge

To render "conversations badges" you can use any of the below. The sku is compulsory but trkref and variantName are optional.

Make sure to replace <SKU>,<TRKREF> and <VARIANT_NAME> with the appropriate values.

  <reevoo:conversationsBadge sku="<SKU>" />
  <reevoo:conversationsBadge sku="<SKU>" trkref="<TRKREF>"/>
  <reevoo:conversationsBadge sku="<SKU>" variantName="undecorated"/>
  <reevoo:conversationsBadge sku="<SKU>" trkref="<TRKREF>" variantName="<VARIANT_NAME>"/>

Series Badges

Product Badges

To render "product series badges" you can use any of the below. The sku is compulsory and should be set to the series id. The trkref and variantName are optional.

Make sure to replace <SKU>,<TRKREF> and <VARIANT_NAME> with the appropriate values.

  <reevoo:productSeriesBadge sku="<SKU>" />
  <reevoo:productSeriesBadge sku="<SKU>" trkref="<TRKREF>"/>
  <reevoo:productSeriesBadge sku="<SKU>" variantName="undecorated"/>
  <reevoo:productSeriesBadge sku="<SKU>" trkref="<TRKREF>" variantName="<VARIANT_NAME>"/>

Conversations Badges

To render "conversation series badges" you can use any of the below. The sku is compulsory and should be set to the series id. The trkref and variantName are optional.

Make sure to replace <SKU>,<TRKREF> and <VARIANT_NAME> with the appropriate values.

  <reevoo:conversationSeriesBadge sku="<SKU>" />
  <reevoo:conversationSeriesBadge sku="<SKU>" trkref="<TRKREF>"/>
  <reevoo:conversationSeriesBadge sku="<SKU>" variantName="undecorated"/>
  <reevoo:conversationSeriesBadge sku="<SKU>" trkref="<TRKREF>" variantName="<VARIANT_NAME>"/>

Overall Service Rating Badges

To render "Overall Service Rating badges" you can use any of the below. The trkref and variantName are optional.

Make sure to replace <TRKREF> and <VARIANT_NAME> with the appropriate values.

  <reevoo:overallServiceRatingBadge/>
  <reevoo:overallServiceRatingBadge trkref="<TRKREF>"/>
  <reevoo:overallServiceRatingBadge variantName="undecorated"/>
  <reevoo:overallServiceRatingBadge trkref="<TRKREF>" variantName="<VARIANT_NAME>"/>

Customer Service Rating Badges

To render "Customer Service Rating badges" you can use any of the below. The trkref and variantName are optional.

Make sure to replace <TRKREF> and <VARIANT_NAME> with the appropriate values.

  <reevoo:customerServiceRatingBadge/>
  <reevoo:customerServiceRatingBadge trkref="<TRKREF>"/>
  <reevoo:customerServiceRatingBadge variantName="undecorated"/>
  <reevoo:overallServiceRatingBadge trkref="<TRKREF>" variantName="<VARIANT_NAME>"/>

Delivery Rating Badges

To render "Delivery Rating badges" you can use any of the below. The trkref and variantName are optional.

Make sure to replace <TRKREF> and <VARIANT_NAME> with the appropriate values.

  <reevoo:deliveryRatingBadge/>
  <reevoo:deliveryRatingBadge trkref="<TRKREF>"/>
  <reevoo:deliveryRatingBadge variantName="undecorated"/>
  <reevoo:deliveryRatingBadge trkref="<TRKREF>" variantName="<VARIANT_NAME>"/>

Embedded Review Content

To render "embedded review content" you can use any of the below. The sku attribute is compulsory but trkref, locale and numberOfReviews are optional.

If you wish to use numberOfReviews you must include locale as well.

Make sure to replace <SKU> and <TRKREF>, <LOCALE> and <NUMBEROFREVIEWS> with the appropriate values.

  <reevoo:productReviews sku="<SKU>" />
  <reevoo:productReviews sku="<SKU>" trkref="<TRKREF>"/>
  <reevoo:productReviews sku="<SKU>" trkref="<TRKREF>" locale="<LOCALE>" />
  <reevoo:productReviews sku="<SKU>" trkref="<TRKREF>" locale="<LOCALE>" numberOfReviews="<NUMBEROFREVIEWS>"/>

Overall rating

The overall rating section at the top of inline reviews contains an overall score, a summary and the score breakdowns.

Fallback

If you would like to fall back to some content when Reevoo content is not available, just specify it within the tag:

  <reevoo:productReviews sku="<SKU>">
    <p>Sorry we don't have any reviews available right now</p>
  </reevoo:productReviews>

Embedded Conversation Content

To render "embedded conversations content" you can use any of the below. The sku attribute is compulsory but trkrefis optional.

Make sure to replace <SKU> and <TRKREF> with the appropriate values.

  <reevoo:conversations sku="<SKU>" />
  <reevoo:conversations sku="<SKU>" trkref="<TRKREF>"/>

Fallback

If you would like to fall back to some content when Reevoo content is not available, just specify it within the tag:

  <reevoo:conversations sku="<SKU>">
    <p>Sorry we don't have any conversations available right now</p>
  </reevoo:conversations>

Embedded Customer Experience Review Content

To render "embedded customer experience review content" you can use any of the below. The trkref and numberOfReviews are optional.

Make sure to replace <TRKREF> and <NUMBEROFREVIEWS> with the appropriate values.

  <reevoo:customerExperienceReviews />
  <reevoo:customerExperienceReviews trkref="<TRKREF>"/>
  <reevoo:customerExperienceReviews numberOfReviews="<NUMBEROFREVIEWS>"/>
  <reevoo:customerExperienceReviews trkref="<TRKREF>" numberOfReviews="<NUMBEROFREVIEWS>"/>

Fallback

If you would like to fall back to some content when Reevoo content is not available, just specify it within the tag:

  <reevoo:customerExperienceReviews trkref="<TRKREF>">
    <p>Sorry we don't have any customer experience reviews available right now</p>
  </reevoo:customerExperienceReviews>

Generic Mark Embeddable Content Tag

There is a generic tag that allows to specify the base url to call on the Reevoo server for generic embeddable content that is not provided by any of the previous tags. The tag name is "mark" and you can use it in the following way:

Make sure to replace <SKU> and <TRKREF> with the appropriate values:

  <reevoo:mark sku="<SKU>" trkref="<TRKREF>" baseURI="http://mark.reevoo.com/reevoomark/embeddable_reviews.html" />

It is also possible to specify locale and the number of reviews you'd like in the baseURI:

  <reevoo:mark sku="<SKU>" trkref="<TRKREF>" baseURI="http://mark.reevoo.com/reevoomark/fr-FR/10/embeddable_reviews.html" />

Proxy Settings

If you would like to use a proxy server to display the content, you need to set both http.proxyHost and http.proxyPort when running your Java application. These are then used to pass proxy requests onto our servers.

Rendering Issues

Any changes to the visibility settings of the 'traffic reviews solution' will require you to call the code below to ensure the correct formatting is applied.

NOTE: This assumes you are using the latest version of the Reevoo JS library.

  ReevooMark.auto_scale()

Tracking

If you display the reviews in a tabbed display, or otherwise require visitors to your site to click an element before seeing the embedded reviews, add the following onclick attribute to track the clickthroughs:

  onclick="ReevooMark.track_click_through(‘<SKU>’)”

Purchase Tracking

If your site includes online shopping functionality add Reevoo's purchase tracking to your store by including the following tag in your "Order Confirmation Page":

<reevoo:purchaseTrackingEvent trkref="REV" skus="999,222,3373" value="342.00"/>

In the tag above:

  • Make sure to replace the value of the "trkref" attribute with your own trkref.
  • Replace the value of the "skus" attribute with a comma separated list of all the skus that have been purchased as part of the order.
  • Replace the value of the "value" attribute with the total value of the order, you don't need to include currency symbol.

All this tracking information will be available to you on your Reevoo Analytics account.

Propensity to Buy Tracking

This type of tracking is used as a substitute of purchase tracking, detailed in the section above, for retailers that do not offer online purchase in their stores and therefore do not have an order confirmation page.

These retailers can use reevoo:propensityToBuyTrackingEvent, which can be added to any page they wish on the site.

To add a propensity to buy event to a page use the following tag:

<reevoo:propensityToBuyTrackingEvent trkref="REV" action="Requested Brochure" sku="234"/>

In the tag above:

  • Make sure to replace the value of the "trkref" attribute with your own trkref.
  • Replace the value of the "action" attribute with a string desccribing the type of event that you want to track, can be anything you want like "user visited the buy now page" or "user requested brochure" or "user requested a test drive", etc...
  • The "sku" attribute is optional, you only have to include it if you want to link the tracking event to a specific product sku, otherwise just leave it empty.

All this tracking information will be available to you on your Google Analitycs account.

##License

This software is released under the MIT license. Only certified ReevooMark partners are licensed to display Reevoo content on their sites. Contact [email protected] for more information.

(The MIT License)

Copyright (c) 2008 - 2010:

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.