Skip to main content
Skip table of contents

Product Finder Installation

The Product Finder can be deployed as an on-page asset or through a tag manager like Google Tag Manager (GTM).

Deploying on WordPress or static HTML

Replace "AFFILIATE_ID" WITH the appropriate number in the below code snippet.

HTML
<script type="text/javascript">!function(e,n,t,c,o,d){e[c]=e[c]||function(){(e[c].q=e[c].q||[]).push(arguments)},(o=n.createElement(t)).src="https://db.revoffers.com/product_finder/widget.js",o.async=!0,(d=document.body)?d.appendChild(o):(d=n.getElementsByTagName(t)[0]).parentElement.insertBefore(o,d)}(window,document,"script","ropfe");</script>
<div id="ropfeRoot"></div>
<script type="text/javascript">
ropfe("init", {
 targetElementId: "ropfeRoot",
 affiliate_id: "AFFILIATE_ID",
 excludedSellers: [],
 includedSellers: []
});
</script>
  • If the partner has any sellers to omit from the catalog, enter them as strings inside the “exclude” array (e.g., excludedSellers: ["Charlotte's Web", "CBD Living"]). Now all sellers except Charlotte’s Web and CBD Living can show in final results.

  • If the partner only wants to include certain sellers from the catalog, enter them as strings inside the “include” array (e.g., includedSellers: ["Charlotte's Web", "CBD Living"]). Now, only Charlotte’s Web and CBD Living products will show in final results.

If a partner provides both excluded and included sellers, the program will first filter out excluded sellers, then keep the included sellers from the remaining set. If there are no excluded or included sellers entered, the program will return the whole catalog.

Deploying on Tag Manager

Step 1: Decide where the Product Finder will appear. The following is an example of an empty <div> that can be used as a placeholder.

HTML
<div id="ropfeRoot"></div>

Step 2: Load the Product Finder JavaScript and tell it to load into that <div>.

HTML
<script type="text/javascript">
// Load Product Finder script
!function(e,n,t,c,o,d){e[c]=e[c]||function(){(e[c].q=e[c].q||[]).push(arguments)},(o=n.createElement(t)).src="https://db.revoffers.com/product_finder/widget.js",o.async=!0,(d=document.body)?d.appendChild(o):(d=n.getElementsByTagName(t)[0]).parentElement.insertBefore(o,d)}(window,document,"script","ropfe");

// Example 1: Load via ID
ropfe("init", {
 targetElementId: "ropfeRoot",
 affiliate_id: "AFFILIATE_ID",
});
</script>

Example 2: Load into a custom location.

JS
// Example 2: Load via custom selector
var els = document.querySelectorAll(".revoffers-product.finder");
for (var i=0; i<els.length; i++) {
  ropfe("init", {
    targetElementId: els[i],
    affiliate_id: "AFFILIATE_ID",
  });
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.