Docs Home > Dollars Raised

Dollars Raised

Render the Number of dollars raised for a given referrer code.


Dollars Raised Widget

This stat will now feature any GlobalGiving currency, including USD, CAD, AUD, GBP, and EUR. It can be changed by the user from the dropdown in our site footer and will match the currency displayed with donation options.

Receipts where either the conversion code or the referrer code match will contribute to the total. The referrer code is taken from the page front matter (i.e. dollarsRaisedStat). When calculating totals, the system includes receipts where the reference code or the conversion code matches the refCode.

{% include stats/dollarsRaised %}

Overriding the referrer code

The refCode can also be overridden when the widget is included.

{% include stats/dollarsRaised refCode='wmgives' %}


You can include more than one refCode by comma separating them (without spaces).

{% include stats/dollarsRaised refCode='bx-australia,bx-coronavirus' %}


You can incorporate fundraisers into the refCode field in the same way, in case donors aren’t giving through the landing page, but instead setting up GlobalGiving fundraiser pages.

{% include stats/dollarsRaised refCode='mdlz,fundraiser_27675,fundraiser_27688' %}

donations

454

donors

298

Setting a base value for donations raised

This can be used to add an arbitrary amount to the page. Note that this feature is NOT currency aware and you should use the forcing a currency code option with it to only display things with one currency.

{% include stats/dollarsRaised base='1000000' currencyCode='USD' %}

Total Raised (USD)

$1,000,025

Forcing a Currency Code

As of May 2020, by default, this widget will support multi-currency settings on the site. If for some reason, though, you only want it to display a single currency and do NOT want it to change to the users’ preferred currency, you can provide the three character currency code.

Valid currency codes are:

  • USD
  • CAD
  • AUD
  • GBP
  • EUR
{% include stats/dollarsRaised refCode='wmgives' currencyCode='EUR' %}

Total Raised (EUR)

€77,288



Changing the banner colors

By default, we now use GlobalGiving branded colors. This can be overridden with the backgroundColor paramter. The color can be the hexcode, e.g. #2d95de for very particular shade of blue, or a HTML short name like red.

WARNING: When setting the widget fontColor, this will affect all of the stats widgets on the page. The following example uses an undesirable hack to prevent the color change leaking to the rest of the page.

{% include stats/dollarsRaised backgroundColor='#2d95de' %}
{% include stats/dollarsRaised backgroundColor='red' %}

Changing the banner font color

By default, the text in the banners is white. If you need to change this (e.g. you are using a very light colored background, you can do that with the fontColor parameter. The color can be the hexcode, e.g. #2d95de for very particular shade of blue, or a HTML short name like red.

WARNING: When setting the widget fontColor, this will affect all of the stats widgets on the page. The following example uses an undesirable hack to prevent the color change leaking to the rest of the page.

{% include stats/dollarsRaised fontColor='#2d95de' backgroundColor='pink' %}
{% include stats/dollarsRaised fontColor='blank' backgroundColor='gray' %}
WARNING: Javascript is currently disabled or is not available in your browser. GlobalGiving makes extensive use of Javascript and will not function properly with Javascript disabled. Please enable Javascript and refresh this page.