⚡
claimr
  • Getting started
    • Create an account
    • Sign in to your account
    • Reset password
    • Edit profile
  • ⚡️claimr core components
  • Team roles and management
  • Campaigns
    • Create new campaign
    • Campaign settings
  • Groups
    • Create new group
    • Group settings
  • Quests
    • Create new quest
    • Quest settings
  • Tasks
    • Create new task
    • Task settings
    • Telegram tasks
    • X (Twitter) tasks
    • TikTok tasks
    • Discord tasks
    • YouTube tasks
    • Web3 tasks
      • Connect a wallet
      • Transactions count
      • Wallet balance
      • Token balance
      • NFT balance
      • Link3 balance
      • Mint an NFT (721)
      • Mint an NFT (1155)
      • Verify transactions
    • PoW tasks
    • HTTP request tasks
    • Referral tasks
    • Form tasks
    • Poll tasks
    • Events tasks
    • API tasks
  • Widget
    • Publish campaign
    • Widget configurations
    • Widget attributes
    • Integrate claimr widget into your website
    • claimr widget integrations
      • Google Analytics integration
      • Google Analytics Client ID
      • Google Tag Manager integration
      • HotJar integration
  • Rewards
    • Reward settings
    • Custom rewards
  • Events
    • Daily check-ins
    • Challenges
    • Ranks
    • KOLs
  • Codes
    • Secret codes
    • Invite codes
      • Enter invite code task
      • Claim invite code task
    • Gift codes
  • Test users
  • Pop-ups
    • Into pop-up
    • Completion pop-up
  • API
    • API token
    • API methods
    • User token
  • Webhooks
    • Set up webhooks
    • Assign webhooks
    • Webhook scopes
  • SDK
  • Forms
    • Create forms
    • Form settings
    • Pages
    • Blocks
    • Quizzes
  • Data analytics
    • Activity
    • PoW analytics
    • User information
    • Failed actions
    • Issues analytics
  • How to
    • Create X campaign
    • Create Discord campaign
    • Integrate claimr widget into dApp
    • Integrating claimr widget into Telegram mini app
    • Customize user experience with tags and attributes
    • Add custom points to users
  • UX requirements
    • Campaign UX requirements
    • Group UX requirements
    • Quest card UX requirements
    • Quest UX requirements
    • Task UX requirements
    • User progress UX requirements
    • Pop-ups UX requirements
    • Interactive components UX requirements
Powered by GitBook
On this page
  • Method 1: Using the data-gtm attribute in the embed script
  • Method 2: Passing the GTM container ID in the URL
  • Verifying GTM Integration

Was this helpful?

  1. Widget
  2. claimr widget integrations

Google Tag Manager integration

Use GTM to manage your claimr tracking and other marketing tags without directly modifying your website's code

PreviousGoogle Analytics Client IDNextHotJar integration

Last updated 3 months ago

Was this helpful?

Google Tag Manager provides a centralized platform for managing tracking codes (tags) for various services, including Google Analytics, advertising platforms, and more.

claimr supports two methods for integrating with GTM:

Method 1: Using the data-gtm attribute in the embed script

This method is the most straightforward and is recommended for most setups. You add your GTM Container ID (which looks like GT-XXXXXXXXX, G-XXXXXXXXX, or AW-XXXXXXXXX) directly to the claimr embed script.

  1. Find Your GTM Container ID:

    • Log in to your Google Tag Manager account.

    • Select the container you want to use for your claimr widget.

    • Your Container ID will be displayed prominently on the container's overview page (e.g., GT-XXXXXXX).

    For more detailed instructions, refer to Google Tag Manager's documentation:

  2. Modify Your claimr Embed Script: Add the data-gtm attribute to your claimr script tag, replacing "GTM-TAG" with your actual GTM Container ID:

    HTML

    <script src="https://widgets.claimr.io/claimr.min.js"
        id="claimr-script"
        data-gtm="GT-XXXXXXX"
        data-organization="ORGANIZATION_NAME"
        data-campaign="CAMPAIGN_NAME"
        data-autoresize="true"
        data-container="CLAIMR_CONTAINER_ID">
    </script>

Replace ORGANIZATION_NAME, CAMPAIGN_NAME, and CLAIMR_CONTAINER_ID with actual values.

Method 2: Passing the GTM container ID in the URL

This method is useful if you can't directly modify the embed script or if you need to dynamically change the GTM Container ID.

  1. Find Your GTM Container ID: (Same as Method 1)

  2. Construct the URL: Add the gtm parameter to your claimr campaign URL, replacing "GTM-TAG" with your actual GTM Container ID:

    https://campaign?gtm=GTM-XXXXXXX

Replace https://campaign with your actual claimr campaign URL.

Verifying GTM Integration

After implementing either method, you'll need to configure your claimr events within Google Tag Manager. This typically involves creating:

  1. Triggers: These define when to fire a tag (e.g., when a specific claimr event occurs).

  2. Tags: These send data to your analytics or marketing platforms (e.g., a Google Analytics 4 event tag).

  3. Variables

View our documentation for the specific event names and data that are available for tracking.

Once your GTM configuration is complete and published, you should start seeing claimr events in your connected platforms (e.g., Google Analytics). Use the Real-time reports in those platforms to verify that data is being received correctly.

Set up and install Tag Manager