Connect Google Tag Manager to Donation Forms

When your website uses Google Tag Manager, donation forms will send custom events to Google Tag Manager during the donation process. Google Tag Manager can be used along with Google Analytics so that you are not only tracking donor behaviors, but also organizing the data or you can use it without Google Analytics.

Set up Google Tag Manager

To create an account and container, follow Google’s instructions. Don't install a web container.

Set up Google Analytics with Google Tag Manager

If you want to use Google Analytics with Google Tag Manager, you should also follow Google's instructions to set up it up in Google Tag Manager. Then, you can create tags for donation forms events.

Note: For embedded donation forms, create a Configuration Parameter in Configuration settings for Google Tag Manager to send Google Analytics the events. For the parameter add cookie_flags. Add samesite=none;secure for the value.

1. Event parameters and variables

To create variables, follow Google’s instructions for user-defined variables and user-defined variable types for web.

You should create the following parameters with variables:

  • event_category is always donation_form.

  • event_label is the name of the donation form.

  • value is the donation amount.

2. Events

Create a tag for each event:

  • For Standard Forms the events are form_submitted, checkout_complete, and donation_complete.

  • For Optimized Forms the events are checkout_complete and donation_complete.

3. Tags for standard events

To create a GA4 event tag for Purchase:

  1. From Google Tag Manager, create a new tag.

  2. For the tag type, select Google Analytics: GA4 Event, and your existing GA4 Configuration Tag.

  3. Set the Event Name to purchase.

  4. From Ecommerce, select both Enable Enhanced Ecommerce Features and Use data layer.

4. Link trigger to Purchase Event tag

In the GA4 Purchase Event tag, select your custom event trigger.

5. Set Google Tag Manager in Online Giving

  1. From Settings, select Google tracking.

  2. Select Google Tag Manager and enter your container ID.

  3. Select Save.