-
-
Save plcstevens/8238561 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var script = document.createElement('script'); | |
script.type = 'text/javascript'; | |
script.src = 'http://cdn.mark.reevoo.com/assets/reevoo_mark.js'; | |
var s = document.getElementById('reevoomark-loader'); | |
s.parentNode.insertBefore(script, s); | |
})(); | |
afterReevooMarkLoaded = [function(){ | |
ReevooApi.load('YOUR_TRKREF_HERE', function(retailer){ | |
retailer.observe("load", function(badge) { | |
alert("ReevooMark product details loading"); | |
// badge has a number of accessible variables such as: | |
badge.target; // the document element we are targetting with this badge | |
badge.badge_type; // the type of badge we are dealing with, defaults to product_reviews | |
badge.badge_variant; // the badge variant, defaults to default | |
badge.badge_name; // the badge name, specified by the retailers badge style, defaults to null | |
badge.review_count; // number of reviews for this product | |
badge.scores_count; // the score for this product | |
badge.should_show_badge; // whether or not this badge should be displayed | |
badge.sku; // the sku for this product | |
}); | |
retailer.observe("complete", function(badge){ | |
alert("ReevooMark product details loaded"); | |
}); | |
retailer.observe("click", function(badge){ | |
alert("ReevooMark badge clicked"); | |
}); | |
retailer.init_badges(); | |
retailer.init_reevoo_reputation_badges(); | |
}); | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment