Overview
Google Tag Manager (GTM) provides a flexible way to deploy Cryptique without modifying your website’s source code. This guide covers setup, configuration, and best practices.Quick Setup
1
Open Google Tag Manager
Go to tagmanager.google.com and select your container
2
Create New Tag
Click Tags → New → Tag Configuration → Custom HTML
3
Add Cryptique Script
Paste the following code:Replace
YOUR_SITE_ID with your actual Site ID from Cryptique dashboard.4
Set Trigger
Click Triggering → All Pages (or your preferred trigger)
5
Save and Publish
Click Save, then Submit to publish your changes
Configuration Options
Basic Configuration
Full Configuration
Configuration Attributes
Using GTM Variables
You can use GTM variables in your configuration:Site ID from Variable
- Create a Constant variable for your Site ID
- Reference it in the tag:
Environment-Based Configuration
Use GTM’s environment feature for staging vs production:Custom Event Tracking
Via Data Layer
Push events to GTM’s data layer, then forward to Cryptique: On your website:cryptique_event
Direct Tracking
After Cryptique loads, you can track directly:User Identification
Identify Users via GTM
Create a tag to identify users when they log in:user_logged_in
Wallet Connection
Track wallet connections:wallet_connected
Trigger Configurations
All Pages (Recommended)
Load Cryptique on every page:- Trigger Type: Page View
- Trigger fires on: All Page Views
Specific Pages Only
Load only on certain pages:- Trigger Type: Page View
- Trigger fires on: Some Page Views
- Condition:
Page Pathcontains/app
Exclude Pages
Exclude admin or internal pages:- Create trigger: Page View - Some Page Views
- Condition:
Page Pathdoes not contain/admin - AND
Page Pathdoes not contain/internal
Consent-Based Loading
Load only after consent:- Trigger Type: Custom Event
- Event name:
consent_granted
Tag Sequencing
Load Order
Ensure Cryptique loads before dependent tags:- Open your Cryptique tag
- Go to Advanced Settings → Tag Sequencing
- Check “Fire a tag before [Cryptique] fires” if needed
- Check “Fire a tag after [Cryptique] fires” for dependent tags
Wait for Cryptique
For tags that depend on Cryptique:Debugging
GTM Preview Mode
- Click Preview in GTM
- Navigate to your website
- GTM debug panel shows:
- Tag firing status
- Variable values
- Data layer events
Verify Cryptique Loading
In browser console:Network Tab
Check for requests to:cdn.cryptique.io(script load)api.cryptique.io(event tracking)
Common Issues
Tag not firing
Tag not firing
- Check trigger conditions in GTM Preview
- Verify container is published
- Check for JavaScript errors in console
Events not appearing in Cryptique
Events not appearing in Cryptique
- Verify Site ID is correct
- Check domain is whitelisted in Cryptique
- Look for blocked requests (ad blockers)
- Verify in Network tab that API calls succeed
Double tracking
Double tracking
- Ensure Cryptique is only loaded once
- Check for duplicate tags in GTM
- Don’t load via both GTM and direct script
Script blocked by CSP
Script blocked by CSP
Add to your Content Security Policy:
Best Practices
Use Folders
Organize your Cryptique tags:Naming Convention
Use clear, consistent names:Version Control
Use GTM’s built-in versioning:- Add descriptions to each version
- Name versions meaningfully: “Added Cryptique tracking”
- Use workspaces for team collaboration
Testing
Always test before publishing:- Use GTM Preview mode
- Test on staging environment first
- Verify events appear in Cryptique
- Check for console errors
Next Steps
Auto-Events
Configure automatic tracking
SDK Reference
Track custom events