Google Tag Manager Setup #
Requires Preferred license.
Google Tag Manager (GTM) gives you a flexible way to manage PetMatchPro analytics tracking alongside other marketing and analytics tags. This guide covers how to set up GTM to capture PetMatchPro events.
Prerequisites #
- A Google Tag Manager account and container
- GTM installed on your WordPress site
- PetMatchPro Analytics tracking enabled
Step 1: Set Up Your GTM Container #
- Go to tagmanager.google.com.
- Create a container for your website if you don’t have one.
- Install the GTM snippet on your WordPress site (using a plugin like “Insert Headers and Footers” or your theme’s header settings).
Step 2: Create a GA4 Configuration Tag #
- In GTM, go to Tags > New.
- Select Google Analytics: GA4 Configuration.
- Enter your GA4 Measurement ID (
G-XXXXXXXXXX). - Set the trigger to All Pages.
- Name it “GA4 Configuration” and save.
Step 3: Create Event Tags for PetMatchPro #
Create GA4 Event tags to capture PetMatchPro onclick events:
Detail View Event Tag #
- Create a new tag: Google Analytics: GA4 Event.
- Select your GA4 Configuration tag.
- Event name:
pmp_detail_view. - Add event parameters for animal_id, animal_name, species, method_type.
Action Click Event Tag #
- Create a new tag: Google Analytics: GA4 Event.
- Event name:
pmp_action_click. - Add event parameters for action_type, animal_id, animal_name.
Share Click Event Tag #
- Create a new tag: Google Analytics: GA4 Event.
- Event name:
pmp_share_click. - Add event parameters for share_platform, animal_id, animal_name.
Step 4: Set Up Triggers #
Create triggers that fire your event tags when PetMatchPro onclick events occur:
- Go to Triggers > New.
- Select Custom Event as the trigger type.
- Enter the PetMatchPro event name (e.g.,
pmp_detail_view). - Assign the trigger to the corresponding event tag.
Step 5: Test with Preview Mode #
- In GTM, click Preview in the top right.
- Enter your website URL.
- Browse your PetMatchPro search and detail pages.
- Verify that events fire correctly in the GTM debug panel.
- Check that event parameters contain the expected data.
Step 6: Publish Your Container #
Once you’ve verified everything works in preview mode:
- Click Submit in the top right of GTM.
- Add a version name (e.g., “PetMatchPro Event Tracking”).
- Click Publish.
Tips #
- Always test in preview mode before publishing to ensure events fire correctly.
- Use descriptive tag names like “GA4 – PMP Detail View” so you can find them later.
- Mark key events as conversions in GA4 (e.g., adoption application clicks) to track what matters most.
Next Steps #
- GA4 Configuration — Direct GA4 setup (alternative to GTM)
- Leveraging Analytics — Use data to improve adoptions
Google Tag Manager Setup
ultima modifica: 2026-03-25T19:23:38-04:00
da