Install widget
Last updated
Last updated
Once a widget is configured and saved, it is ready to be installed. The Integrate tab in the component Settings will provide the client-side JavaScript required to place the resulting embed code within the existing page layout.
The CSS is exposed within the Integrate section of the component for demonstration purposes. This should be integrated into the existing CSS structure within the destination application and can be modified to match the native styles of your platform or website.
Multiple donation widgets can be configured to handle different checkout flows (for example if one brand has multiple websites and wants to feature different charities on each), or A/B testing.
In order to capture component actions, such as donation opt-in, opt-out, charity selected, etc., event listeners need to be set up. These event listeners will interact with your platform to add/remove/update the appropriate line items for the donation details.
For example, the cart subtotal needs to be sent to ChangeUp for RoundUp calculation to take place. Basic implementation code: