Skip to Content
SourcesShopifyDestinationsGoogle Tag Manager

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

  1. Open Shopify Admin > Themes
  2. Click Customize
  3. Go to App embeds and enable the Vendo block
  4. The GTM container will load automatically based on your Vendo settings

Step 2: Configure in Vendo

  1. Open the Vendo app in your Shopify admin
  2. Navigate to Integrations > Google Tag Manager
  3. Enter your Container ID (e.g., GTM-XXXXXXX)
  4. (Optional) Set a custom Data Layer Name (default: dataLayer)
  5. 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:

  1. In GTM, go to Admin > Import Container
  2. Upload the JSON file (available from Vendo support)
  3. Choose Merge (recommended)
  4. Update the GA4 Measurement ID variable
  5. Publish your container

Data Layer Events

Vendo pushes the following standard events into the data layer:

Vendo EventGTM Event NameDescription
Page Viewedpage_viewStorefront page view
Product Viewedview_itemProduct detail view
Collection Viewedview_item_listCollection/category view
Search SubmittedsearchSite search performed
Product Added To Cartadd_to_cartItem added to cart
Product Removed From Cartremove_from_cartItem removed from cart
Cart Viewedview_cartCart page view
Checkout Startedbegin_checkoutCheckout flow started
Checkout Contact Info Submittedadd_contact_infoContact info submitted
Checkout Address Info Submittedadd_shipping_infoAddress step completed
Checkout Shipping Info Submittedadd_shipping_infoShipping step completed
Payment Info Submittedadd_payment_infoPayment step completed
Checkout CompletedpurchaseOrder 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

  1. Event Capture — Events are sent to the Shopify Web Pixel API
  2. Enrichment — Vendo adds device info, UTM parameters, and user identity
  3. Forwarding — Events are sent to all your connected destinations

Create an HTML Tag in GTM

  1. In your GTM workspace, create a new Custom HTML tag
  2. Add the event snippet:
<script> Shopify.analytics.publish('your_custom_event', { 'property_name': 'property_value' }); </script>
  1. Configure the trigger (e.g., button clicks, form submissions, page views)

Test Using GTM Preview

  1. Preview your changes in GTM’s Preview Mode
  2. Interact with your site to trigger the events
  3. Verify events appear in your connected destinations

See Sending Custom Events for more examples and user identification options.


Best Practices

  1. Use the Vendo theme block to ensure the container loads before events flush
  2. Keep data layer name consistent (dataLayer recommended)
  3. Test in GTM Preview before publishing to production
  4. Enable GA4 ecommerce in your GA4 tags to capture items data

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 event values

Missing Ecommerce Data

  • Ensure your GTM GA4 Event tags have Send Ecommerce Data enabled
  • Confirm the ecommerce object is not being overwritten by other scripts

Support

For help with your GTM integration:

Last updated on