Pixel Placement
Step 1: Log Into Google Tag Manager
- Go to Google Tag Manager.
- Select your GTM container (e.g.,
GTM-XXXXXX
).
Step 2: Create or Update a Tag
- In the Workspace, click on Tags in the left menu.
- Click New (or select an existing tag to update).
- Click Tag Configuration and choose the appropriate tag type:
- Google Analytics 4 (GA4) Configuration
- Google Ads Conversion Tracking
- Facebook Pixel
- Custom HTML (for other tracking codes like TikTok Pixel, LinkedIn, etc.)
Step 3: Configure the Tag
- If using GA4:
- Select Google Analytics: GA4 Configuration.
- Enter your Measurement ID (
G-XXXXXXXX
).
- Choose if you want to Send a Page View Event automatically.
- If using Facebook Pixel:
- Select Custom HTML.
- Paste the Facebook Pixel script.
- Make sure it includes the correct Pixel ID.
- If using Google Ads Conversion Tracking:
- Select Google Ads Conversion Tracking.
- Enter your Conversion ID (
AW-XXXXXXXX
).
- Enter your Conversion Label (from Google Ads).
- If tracking a dynamic value, set up a Data Layer Variable (e.g., transaction value).
Step 4: Add a Trigger
- Click Triggering and choose when the tag should fire.
- Common triggers:
- All Pages (for general tracking like pageviews).
- Click Trigger (for button clicks or link clicks).
- Form Submission (for lead forms).
- Custom Event (for e-commerce events like
purchase
).
Step 5: Save & Publish
- Click Save.
- Click Submit (top-right).
- Enter a Version Name & Description (e.g., “Added Facebook Pixel tracking”).
- Click Publish.
Step 6: Test the Implementation
- Click Preview in GTM to open Tag Assistant.
- Open your website in the Tag Assistant Debug Mode.
- Perform the action (e.g., load a page, click a button).
- Check if the tag fires correctly.
For extra verification:
Use Google Tag Assistant (for Google tags).
Use Facebook Pixel Helper (for Facebook Pixel).
Use Google Analytics Debugger (for GA4).