Integrating Google Tag Manager (GTM) with Qgiv’s analytics framework simplifies the management of your marketing and analytics tags. By using GTM, you can efficiently collect data and enhance your campaigns without the need for extensive coding.
This article will show you how to add and use Google Tag Manager with your Qgiv account.
Contents:
Add Google Tag Manager
First, you’ll need your GTM container ID.
Log in to your Google Tag Manager account and select your container.
In your workspace, find and copy the GTM Container ID, formatted as GTM-XXXXXXX, and copy it for pasting into Qgiv.
With your Container ID in head, head over to your Qgiv account and click Integrations in the left-hand navigation.
Look for the Analytics section and find the Google Tag Manager tile. Click Connect.
Enter the Name for the connection, paste your GTM Container ID, and select the Forms & Events that you want to apply this connection to.
Click Connect to complete the integration setup.
Google Tag Manager Quick-Start
For two of the most popular tools, GA4 and Meta Pixel, we have pre-built GTM container templates that will work with your Qgiv form. Our container templates offer a user-friendly way to track and analyze user data and interactions, ensuring you have the insights needed to optimize your strategies seamlessly. If you use either of these tools, we recommend that you import the template and merge it with your existing container using the instructions below.
Pro tip: If the links below open in a new tab, you can save the json files by right-clicking and selecting "Save As." Alternately, you can download the templates at the end of this article.
⬇️ Download Qgiv GTM container template for GA4
⬇️ Download Qgiv GTM container template for Meta Pixel
Import Instructions
Log in to your Google Tag Manager account and select the container where you want to import the Qgiv template.
Navigate to the Admin tab of your container and select Import Container.
Click Choose Container File and upload the JSON template file you downloaded earlier.
Follow these import options:
- Choose the Existing option to import the template into your current workspace.
- Select Merge as the import option.
- Select Rename conflicting tags, triggers, and variables to avoid conflicts with existing elements.
Review the import preview screen to ensure everything looks correct and click Add to workspace to finish importing the template file.
Next, navigate to the Variables tab of your workspace. Under User-Defined Variables, look for "Qgiv GA4 Settings" and/or "Qgiv Meta Pixel Settings," depending on which templates you imported above.
Click the variable, and then click the pencil icon to edit the Value field.
For GA4, replace the placeholder Value (G-XXXXXXXXXX) with your own GA4 Measurement ID. For Meta Pixel, replace the placeholder Value (00000000000) with your own Pixel ID. Click Save to update the value.
Click Preview at the top of the screen to test your new setup, and when you're ready, publish the container by click Submit to apply the changes.
Pro tip: Our Qgiv GTM templates include pre-configured tags, triggers, and variables that are automatically added to your Google Tag Manager container. These elements are designed to work together to capture and send data related to user interactions on your Qgiv forms. Depending on your specific goals and the Qgiv products you use, some configurations might not be necessary and can be removed if not needed.
If you need help, check out Google's GTM help documentation or contact Qgiv support.
GTM Manual Setup
If you need to set up a tag from scratch or are using a different analytics tool, you can configure the settings yourself by following the steps below!
Please note: Your Qgiv form pushes events to Google Tag Manager based on different user interactions that include a variety of data layer variables for enhanced tracking capabilities. You can find our Qgiv events and variables and learn more about them in our Analytics API documentation.
Step 1. Configure your trigger
We’ll start by configuring the trigger that will be activated when supporters visit your forms.
Navigate to the Triggers tab within your GTM account and click New.
On the Trigger Configuration screen, select Custom Event as the Trigger Type.
Assign the trigger to listen for one of the Qgiv events. To do this, set the Event name as a Qgiv event. For example, use Qgiv.donationStart for the “Donation Start” event, or Qgiv.ga4Purchase for the “GA4 Purchase” event.
Choose a name for your trigger, such as Qgiv GA4 Purchase, and click Save.
Step 2. Configure your variables (Optional)
Configuring additional variables in GTM is an optional step that is only necessary if you’d like to further customize your tracking setup for enhanced data collection and to go beyond the standard tracking setup. Variables dynamically populate tags and triggers with specific values, allowing for more detailed and targeted insights.
To configure variables, navigate to the Variables tab within your GTM account and click New.
On the Variable Configuration screen, select Data Layer Variable as the Variable Type.
Assign the variable to listen for the parameter you want to track. To do this, set the Data Layer Variable Name. For example, use QGIV.transaction.date for the Transaction Date parameter or QGIV.transaction.recurring to see if the transaction was set to recurring.
Check out the Analytics API article to view a list of Qgiv parameters and learn more about our Qgiv data layer variables.
Choose a name for your variable, such as Qgiv Transaction Recurring, and click Save.
Step 3. Configure your tags
Next, configure your tags by navigating to the Tags tab within your GTM account and clicking New.
Set the Tag Configuration with the settings appropriate for the platform you’re using. For GA4, you would select the “Google Analytics: GA4 Event” tag type and add your Measurement ID and event name.
If needed, assign the variables created in the previous step to your tag configuration. To do this, open the Event Parameters drop-down within your tag and add your values as needed.
Click the Triggering section and select the trigger you created in step 1 that goes along with the event for this tag.
Choose a name for your tag, such as Qgiv GA4 Purchase, and click Save.
Step 4. Test and publish your container
Before making your GTM container live, it's always a good idea to test your new changes.
Enable Preview mode by clicking Preview at the top of the screen.
Then, enter the URL that you want to test.
Verify that your tags work correctly. Navigate through your form as a normal visitor would and perform actions that should trigger your tags.
Once you’ve verified that everything is working as intended, publish your GTM container changes by clicking Submit at the top of the screen.