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 likeG-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-”.
2
Modify your Claimr embed script
Add the Make sure you replace
data-ga4 attribute to your Claimr script tag, replacing "GA4-KEY" with your actual Measurement ID: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.- Find your GA4 measurement ID: (Same as Method 1)
- Construct the URL: Add the
ga4parameter to your Claimr campaign URL, replacing"GA4-KEY"with your actual Measurement ID: