Scroll

How to embed your campaign widget


To embed your campaign widget on your website, simply follow these steps:

  1. Go to your campaign page (example: https://fundrazr.com/campaigns/bMmtb)

  2. In the row of sharing options under the campaign picture, click +More, and then the option "Embed".moreme.jpg

  3. Select a Widget style and width.

  4. Click Get the code

  5. Copy & paste both the Loader code and the Widget code into the source code for your website

  6. Click "Close" and you're done!


Important things to remember:
 
  • Loader script: This is the Javascript needed to enable to the widget. This snippet can be placed anywhere on the page, but works best in the Header or Footer. 
    Note:  If you use Wordpress.com or a similar Content Management System to host or build your website (Weebly, Wix, Squarespace, etc.), these widgets may not work for you, because Wordpress and some other Content Management Systems tend to strip Javascript from the source code before loading the page for a visitor.

    The following page on wordpress.org, submitted to us by one of our users, may help you overcome the Wordpress limitation (http://codex.wordpress.org/Using_Javascript), but keep in mind that you'll need to have advanced HTML knowledge to implement this workaround, and we can't guarantee this will work. We also can't help you implement this solution into your Wordpress site because we don't have access inside Wordpress's system, so if you need help with this workaround you'll need to contact Wordpress directly for help.
     
  • Widget code: This is the code for the widget itself. This snippet needs to be placed where you want the widget to appear on the page. 
    Note:  If you have more than one campaign running at the same time, you can place them all on one web page. To do this, you only need to add the loader script to the page once, then for each additional campaign, you only need to change the 5 digit code for your campaign, as shown in bold here:

    data-url="http://fnd.us/c/bMmtb"
  • Emails & Newsletters: Most email clients and newsletter services are not able to run javascript, and the loader code for campaign widgets is written in javascript. This means that you will probably not be able to embed a campaign widget in an email or newsletter.

 


Want to embed your full campaign on a page of your website instead of just a widget/badge? No problem!

 
Just follow the same steps as above, then continue here:
  • The loader code will stay the same, so don't change anything there.
  • The widget code is where you'll need to make changes. 
  • YOU WILL NEED TO UNDERSTAND HTML CODE TO MAKE THESE CHANGES SUCCESSFULLY. If you aren't sure what to do here, forward this page to your website administrator.

You'll need to change certain variants inside the widget code.

data-type="badge" - The TYPE should be changed to full-campaign: 
data-type="full-campaign"

data-width="200" -  The WIDTH is variable, so whatever width you see in this section after grabbing the standard code should be changed to 1080:
data-width="1080"

data-url="http://fnd.us/c/bMmtb-  The URL included in the standard code is the Short URL. For full page campaigns, this needs to be the full URL of the campaign:
data-url="https://fundrazr.com/campaigns/bMmtb"

data-variant="tall" - The variant needs to be removed.


Here's a Before & After example:

Before:
class="fr-widget" data-type="badge" data-variant="tall" data-width="200" data-url="http://fnd.us/c/bMmtb"

After:
class="fr-widget" data-type="full-campaign" data-url="https://fundrazr.com/campaigns/bMmtb" data-width="1080"


*This page is provided as a guide only. If you don't understand how to add HTML code to your website, do not attempt this yourself or you could break your website. Please have your website designer/administrator add the code for you. 

Do you have a question that isn't answered in our Help Center?