Installation Guides
Google Tag Manager
Install Jetrack via Google Tag Manager
Google Tag Manager (GTM) provides a flexible way to manage Jetrack alongside other marketing tags.
Why Use GTM?
- Manage all tracking tags in one place
- No code changes needed after initial GTM setup
- Easy to add/remove/update tags
- Advanced trigger and variable options
Prerequisites
You need a Google Tag Manager account and container installed on your website. If you haven't set up GTM yet, create a GTM account first.
Installation Steps
Step 1: Create a New Tag
- Log in to Google Tag Manager
- Select your container
- Click Tags in the left sidebar
- Click New
- Click Tag Configuration
Step 2: Choose Custom HTML
- Select Custom HTML as the tag type
- Name your tag "Jetrack"
Step 3: Add the Tracking Script
Paste your BrandJet tracking script into the HTML box:
<script
async
defer
data-website-id="your-unique-id"
src="https://analytics.brandjet.ai/script.js">
</script>Step 4: Set the Trigger
- Click Triggering
- Select All Pages (or create a custom trigger if needed)
- This ensures the script loads on every page
Step 5: Save and Publish
- Click Save
- Click Submit in the top right
- Add a version name (e.g., "Add Jetrack")
- Click Publish
Advanced Configuration
Custom Triggers
Track specific pages or events:
- Create a new trigger
- Choose trigger type (Page View, Click, Form Submission, etc.)
- Set conditions (e.g., Page URL contains "checkout")
- Apply to your BrandJet tag
Using Data Layer
Pass custom data to BrandJet:
<script>
// In your Custom HTML tag
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event': 'brandjet_pageview',
'page_type': '{{Page Type}}'
});
</script>
<script
async
defer
data-website-id="your-unique-id"
src="https://analytics.brandjet.ai/script.js">
</script>Environment-Specific Loading
Create different tags for different environments:
- Create a Custom JavaScript Variable for environment detection
- Use it as a trigger condition
- Only fire in production
Testing
Preview Mode
- Click Preview in GTM
- Visit your website
- Check Tag Assistant to verify BrandJet tag fires
- Look for the tag in the "Tags Fired" section
Debug Mode
- Open browser Dev Tools (F12)
- Go to Network tab
- Look for
script.jsfromanalytics.brandjet.ai - Should show 200 status code
Troubleshooting
Tag Not Firing
- Check that the trigger is set to "All Pages"
- Verify GTM container is published
- Clear GTM preview cache
Script Loading Multiple Times
- Ensure you only have one BrandJet tag
- Check for duplicate GTM containers on your site
Data Not Appearing
- Wait 30-60 seconds after page load
- Check your BrandJet dashboard
- Verify website ID is correct
Best Practices
- Name tags clearly: Use descriptive names like "Jetrack - All Pages"
- Use folders: Organize tags in GTM folders
- Document changes: Add notes when publishing
- Test before publishing: Always use Preview mode
- Version control: Keep track of GTM versions
Combining with Other Analytics
GTM makes it easy to run multiple analytics tools:
- Jetrack (privacy-focused)
- Google Analytics 4 (comprehensive)
- Facebook Pixel (ad tracking)
- Custom event tracking
All managed from one interface!