Skip to main content

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 TagsNewTag ConfigurationCustom 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 TriggeringAll 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

  1. Create a Constant variable for your Site ID
  2. 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:
GTM Tag (Custom HTML):
Trigger: Custom Event = 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:
Trigger: Custom Event = user_logged_in

Wallet Connection

Track wallet connections:
Trigger: Custom Event = wallet_connected

Trigger Configurations

Load Cryptique on every page:
  1. Trigger Type: Page View
  2. Trigger fires on: All Page Views

Specific Pages Only

Load only on certain pages:
  1. Trigger Type: Page View
  2. Trigger fires on: Some Page Views
  3. Condition: Page Path contains /app

Exclude Pages

Exclude admin or internal pages:
  1. Create trigger: Page View - Some Page Views
  2. Condition: Page Path does not contain /admin
  3. AND Page Path does not contain /internal
Load only after consent:
  1. Trigger Type: Custom Event
  2. Event name: consent_granted

Tag Sequencing

Load Order

Ensure Cryptique loads before dependent tags:
  1. Open your Cryptique tag
  2. Go to Advanced SettingsTag Sequencing
  3. Check “Fire a tag before [Cryptique] fires” if needed
  4. Check “Fire a tag after [Cryptique] fires” for dependent tags

Wait for Cryptique

For tags that depend on Cryptique:

Debugging

GTM Preview Mode

  1. Click Preview in GTM
  2. Navigate to your website
  3. 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

  1. Check trigger conditions in GTM Preview
  2. Verify container is published
  3. Check for JavaScript errors in console
  1. Verify Site ID is correct
  2. Check domain is whitelisted in Cryptique
  3. Look for blocked requests (ad blockers)
  4. Verify in Network tab that API calls succeed
  1. Ensure Cryptique is only loaded once
  2. Check for duplicate tags in GTM
  3. Don’t load via both GTM and direct script
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:
  1. Add descriptions to each version
  2. Name versions meaningfully: “Added Cryptique tracking”
  3. Use workspaces for team collaboration

Testing

Always test before publishing:
  1. Use GTM Preview mode
  2. Test on staging environment first
  3. Verify events appear in Cryptique
  4. Check for console errors

Next Steps

Auto-Events

Configure automatic tracking

SDK Reference

Track custom events