⚡
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-ga4 attribute in the embed script
  • Method 2: Passing the GA4 Key in the URL
  • Verifying GA4 integration

Was this helpful?

  1. Widget
  2. claimr widget integrations

Google Analytics integration

Previousclaimr widget integrationsNextGoogle Analytics Client ID

Last updated 3 months ago

Was this helpful?

Claimr supports two methods for integrating with GA4:

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

This is the recommended method for most implementations. You add your GA Measurement ID (which looks like G-XXXXXXXXXX or GA4-KEY) directly to the claimr embed script.

  1. Find your GA measurement ID:

    • Log in to your Google Analytics account.

    • Go to the Admin section.

    • In the Property column, select your GA property.

    • Click on "Data streams," then select your web data stream.

    • Your Measurement ID will be displayed at the top. It typically starts with "G-".

    For detailed instructions, see Google's documentation:

  2. Modify your claimr embed script: Add the data-ga4 attribute to your claimr script tag, replacing "GA4-KEY" with your actual Measurement ID:

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

    Make sure you replace ORGANIZATION_NAME, CAMPAIGN_NAME, and CLAIMR_CONTAINER_ID with your actual values.

Method 2: Passing the GA4 Key in the URL

This method is useful if you cannot directly modify the embed script, or if you need to dynamically change the GA4 Measurement ID.

  1. Find your GA4 measurement ID: (Same as Method 1)

  2. Construct the URL: Add the ga4 parameter to your claimr campaign URL, replacing "GA4-KEY" with your actual Measurement ID:

    https://campaign?ga4=GA4-KEY

Verifying GA4 integration

After implementing either method, you should start seeing events from your claimr widget in your GA4 Realtime reports. It may take a few minutes for data to appear. You can use the Realtime view to test if events are being tracked correctly.

Find your Google tag ID