Google Tag Manager Integration
Vendo’s Google Tag Manager (GTM) integration sends Shopify ecommerce events into your GTM data layer so you can deploy GA4, ads, and other tags without custom development.
Overview
The GTM integration provides:
- Standard Ecommerce Events — GA4-recommended event names and payloads
- Data Layer Queueing — Events are queued safely and flushed into the storefront data layer
- Flexible Tagging — Use GTM to route events to GA4, Google Ads, Meta, and more
Setup Instructions
Prerequisites
- A Google Tag Manager account
- A Web container created for your Shopify store
- The Vendo app installed on your Shopify store
Step 1: Add GTM to Your Theme
- Open Shopify Admin > Themes
- Click Customize
- Go to App embeds and enable the Vendo block
- The GTM container will load automatically based on your Vendo settings
Step 2: Configure in Vendo
- Open the Vendo app in your Shopify admin
- Navigate to Integrations > Google Tag Manager
- Enter your Container ID (e.g.,
GTM-XXXXXXX) - (Optional) Set a custom Data Layer Name (default:
dataLayer) - Save the configuration
Step 3: Import Standard Tags (Optional)
We provide a GTM JSON file with ready-to-use GA4 event tags and triggers:
To import:
- In GTM, go to Admin > Import Container
- Upload the JSON file (available from Vendo support)
- Choose Merge (recommended)
- Update the GA4 Measurement ID variable
- Publish your container
Data Layer Events
Vendo pushes the following standard events into the data layer:
| Vendo Event | GTM Event Name | Description |
|---|---|---|
| Page Viewed | page_view | Storefront page view |
| Product Viewed | view_item | Product detail view |
| Collection Viewed | view_item_list | Collection/category view |
| Search Submitted | search | Site search performed |
| Product Added To Cart | add_to_cart | Item added to cart |
| Product Removed From Cart | remove_from_cart | Item removed from cart |
| Cart Viewed | view_cart | Cart page view |
| Checkout Started | begin_checkout | Checkout flow started |
| Checkout Contact Info Submitted | add_contact_info | Contact info submitted |
| Checkout Address Info Submitted | add_shipping_info | Address step completed |
| Checkout Shipping Info Submitted | add_shipping_info | Shipping step completed |
| Payment Info Submitted | add_payment_info | Payment step completed |
| Checkout Completed | purchase | Order completed |
Each ecommerce event includes a GA4-compatible ecommerce object with items, currency, and value fields.
Sending Custom Events via GTM
You can also send custom events to Vendo through GTM. These events are enriched by Vendo and forwarded to your other connected destinations.
How It Works
- Event Capture — Events are sent to the Shopify Web Pixel API
- Enrichment — Vendo adds device info, UTM parameters, and user identity
- Forwarding — Events are sent to all your connected destinations
Create an HTML Tag in GTM
- In your GTM workspace, create a new Custom HTML tag
- Add the event snippet:
<script>
Shopify.analytics.publish('your_custom_event', {
'property_name': 'property_value'
});
</script>- Configure the trigger (e.g., button clicks, form submissions, page views)
Test Using GTM Preview
- Preview your changes in GTM’s Preview Mode
- Interact with your site to trigger the events
- Verify events appear in your connected destinations
See Sending Custom Events for more examples and user identification options.
Best Practices
- Use the Vendo theme block to ensure the container loads before events flush
- Keep data layer name consistent (
dataLayerrecommended) - Test in GTM Preview before publishing to production
- Enable GA4 ecommerce in your GA4 tags to capture
itemsdata
Troubleshooting
Events Not Appearing in GTM
- Confirm the Vendo theme block is enabled in your theme
- Verify the container ID in Vendo matches your GTM container
- Use GTM Preview to check for incoming
eventvalues
Missing Ecommerce Data
- Ensure your GTM GA4 Event tags have Send Ecommerce Data enabled
- Confirm the
ecommerceobject is not being overwritten by other scripts
Support
For help with your GTM integration:
- Email: support@vendodata.com
- Documentation: https://docs.vendodata.com
Last updated on