Google Tag Manager (GTM) allows you to manage all your marketing and analytics tags from a single platform. This guide covers how to install GTM on your Zyro site and configure it for optimal tracking.
Prerequisites
Before installing GTM on Zyro, you need:
- A Zyro account with a paid plan (Unleash, eCommerce, or eCommerce Plus)
- A Google Tag Manager account - Create one free
- A GTM container for your website
- Published Zyro site (GTM only works on published sites)
Note: GTM requires a paid Zyro plan because custom code access is not available on the free plan.
Step 1: Create a GTM Container
- Go to Google Tag Manager
- Click Create Account
- Fill in account details:
- Account Name: Your name or company
- Country: Your location
- Set up container:
- Container Name: Your Zyro site name or domain
- Target Platform: Select Web
- Click Create
- Accept the Terms of Service
Step 2: Get Your GTM Container Code
After creating your container, you'll see installation instructions with two code snippets:
Head Code
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXXXXX');</script>
<!-- End Google Tag Manager -->
Body Code (Noscript Fallback)
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
Copy both code snippets - you'll need them for Zyro.
Step 3: Add GTM to Your Zyro Site
Method 1: Custom Code (Recommended)
- Log in to your Zyro dashboard
- Select your website
- Click Settings in the left sidebar
- Scroll to Website code section
- Find the Header code field
- Paste both GTM code snippets (head code first, then noscript code)
- Click Save
Combined code to paste:
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXXXXX');</script>
<!-- End Google Tag Manager -->
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
Replace GTM-XXXXXXX with your actual container ID.
Method 2: Built-in Integration (Limited)
Zyro (now part of Hostinger Website Builder) has a built-in code injection area. Go to Settings > Custom Code to add your GTM snippet:
- Go to Settings → Integrations
- Find Google Tag Manager
- Click Connect or Add
- Enter your GTM Container ID (GTM-XXXXXXX)
- Click Save
Note: Custom code method is recommended for full control and compatibility.
Step 4: Publish Your Site
- Click the Publish button (top right corner)
- Wait for Zyro to deploy your changes (usually 1-2 minutes)
- Visit your live site
Step 5: Verify GTM Installation
Using GTM Preview Mode
- Go to Google Tag Manager
- Select your container
- Click Preview in the top right
- Enter your published Zyro site URL
- Click Connect
- A new tab will open showing your site with GTM debug panel
- Verify "Container Loaded" message appears
Using Browser Developer Tools
- Open your published Zyro site
- Press F12 to open Developer Tools
- Go to Console tab
- Type:
google_tag_manager - Press Enter
- You should see an object with your GTM container ID
Using Google Tag Assistant
- Install Google Tag Assistant
- Visit your published Zyro site
- Click the Tag Assistant icon
- Verify Google Tag Manager is detected
- Check that container ID is correct
Step 6: Configure Tags in GTM
Now that GTM is installed, configure your tags.
Add Google Analytics 4
- In GTM, click Tags > New
- Click Tag Configuration
- Select Google Analytics: GA4 Configuration
- Enter your GA4 Measurement ID (
G-XXXXXXXXXX) - Click Triggering
- Select All Pages
- Name the tag "GA4 - Configuration"
- Click Save
Add Meta Pixel
- Click Tags > New
- Click Tag Configuration
- Select Custom HTML
- Paste your Meta Pixel base code
- Click Triggering
- Select All Pages
- Name the tag "Meta Pixel - Base Code"
- Click Save
Step 7: Publish GTM Container
- Click Submit in GTM
- Add Version Name (e.g., "Initial Zyro Setup")
- Add Version Description (optional)
- Click Publish
Your tags are now live on your Zyro site!
Zyro-Specific GTM Configuration
Built-in Variables
Enable these built-in variables for Zyro tracking:
- Go to Variables in GTM
- Click Configure in the Built-In Variables section
- Enable:
Custom Variables for Zyro
Create useful custom variables:
Site Type Variable
- Go to Variables > New
- Click Variable Configuration
- Select Constant
- Set value to describe your site type (e.g.,
ecommerce,business,portfolio) - Name it "Site Type"
- Click Save
Triggers for Zyro
Form Submission Trigger
- Triggers > New
- Trigger Configuration > Form Submission
- This trigger fires on: All Forms
- Name: "All Form Submissions"
- Save
Important: Test thoroughly - some Zyro forms may require custom configuration.
Button Click Trigger
- Triggers > New
- Trigger Configuration > Click - All Elements
- This trigger fires on: Some Clicks
- Add condition: Click Classes contains
zyro-buttonOR Click Element matchesbutton - Name: "Button Clicks"
- Save
Scroll Depth Trigger
- Triggers > New
- Trigger Configuration > Scroll Depth
- Vertical Scroll Depths: 25, 50, 75, 100
- Name: "Scroll Depth"
- Save
Data Layer for Zyro
Zyro doesn't have native data layer support, but you can push custom data.
Push Custom Events
Add to Settings → Website code → Footer code:
<script>
window.dataLayer = window.dataLayer || [];
// Push custom data on page load
dataLayer.push({
'event': 'zyroPageLoad',
'pageType': 'business',
'templateName': 'modern'
});
</script>
Push Form Submission Data
<script>
document.addEventListener('DOMContentLoaded', function() {
var forms = document.querySelectorAll('form');
forms.forEach(function(form) {
form.addEventListener('submit', function() {
window.dataLayer = window.dataLayer || [];
dataLayer.push({
'event': 'formSubmit',
'formId': form.getAttribute('id') || 'contact_form'
});
});
});
});
</script>
Then create a Custom Event trigger in GTM:
- Event name:
formSubmit
Best Practices for Zyro + GTM
1. Performance Optimization
- Use built-in tag templates when available (optimized)
- Avoid excessive custom HTML tags
- Use tag sequencing for dependencies
- Test performance impact with PageSpeed Insights
2. Tag Organization
- Naming convention: Use "Tool - Action" format (e.g., "GA4 - Page View")
- Folders: Group related tags
- Comments: Add notes to complex tags
- Version descriptions: Document changes
3. Testing Workflow
- Make changes in GTM
- Click Preview
- Test on published Zyro site
- Verify tags fire correctly
- Check for JavaScript errors
- Submit and publish
4. Form Tracking Considerations
Test form submissions thoroughly on Zyro:
- Verify form submission trigger fires
- Check that events reach analytics platforms
- Test on mobile devices
- Ensure no JavaScript errors
Troubleshooting
GTM Not Loading
Problem: GTM container doesn't load on Zyro site.
Solutions:
- Verify paid plan: GTM requires Unleash, eCommerce, or eCommerce Plus plan
- Check site is published: GTM doesn't work in preview mode
- Verify container ID: Ensure
GTM-XXXXXXXis correct - Check code placement: Code should be in Header code
- Look for JavaScript errors: Open browser console (F12)
- Clear cache: Hard reload (Ctrl+Shift+R)
Tags Not Firing
Problem: GTM loads but tags don't fire.
Solutions:
- Check triggers: Verify trigger conditions are met
- Use Preview mode: Debug with GTM preview
- Verify IDs: Double-check measurement IDs, pixel IDs
- Test in incognito: Rule out browser extensions
- Check firing order: Some tags depend on others
Form Tracking Not Working
Problem: Form submission tags don't fire.
Solutions:
- Test trigger conditions: May need to adjust form trigger settings
- Check Zyro form structure: Zyro forms may have specific classes
- Use dataLayer push: Manually push form events
- Add delay: Give tags time to fire before redirect
Next Steps
- Configure GA4 Events via GTM
- Set Up Meta Pixel via GTM
- Troubleshoot Tracking Issues